PageSourceSearch

https://aerodrome.finance/assets/index-Chd_Wa1n.js

js aerodrome.finance collected 2026-09-24 19:55:20 UTC 1,988,545 bytes, 714 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DYaoI2BG.js","assets/clsx.m-DHulAg21.js","assets/index-nibyPLVP.js","assets/sha3-Bk1ffKuE.js","assets/index-Bjw-DqL_.js","assets/index-El-zygeg.js","assets/index-BozP5vQt.js","assets/browser-ponyfill-CEp-GVeJ.js","assets/index-pH2snnd-.js","assets/index-BbP3371Q.js","assets/index.es-dyL7u-i3.js","assets/index-DQd1q7wr.js","assets/TokenSelection-BxuvJzwS.js","assets/PoolItem-CIgbu8hh.js","assets/PoolItemPosition-9ykCbsaB.js","assets/epochs-BLEVpsqf.js","assets/Checkbox-BnfyRgQ1.js","assets/index-CJb_CPRb.js","assets/SegmentedControl-BblN701w.js","assets/pair.worker-CjxMmiTd.js","assets/position-CRLzhpx6.js","assets/minus-CoTaElt_.js","assets/NewLock-FJp86rW-.js","assets/LockHeader-DXrFywyr.js","assets/Manage-BYKBaneH.js","assets/VeNFTSelect-NBRKAv6A.js","assets/index-ymOe-DOF.js","assets/relay-RPkeKjyG.js","assets/RelayAvatar-BpGELqY3.js","assets/index-C1neC7uH.js","assets/index-CJCprGQn.js","assets/index-C4ZhxX9g.js","assets/TokenAmountSlider-JMRZdQXt.js","assets/index-yJ8HwGcY.js","assets/index-BrkNMCeJ.js","assets/index-CSeYNOM7.js","assets/index-Bjhr-BUK.js","assets/index-D-16b794.js","assets/dijkstra-COg3n3zL.js","assets/index-CeNp7QU-.js"])))=>i.map(i=>d[i]);
2var Sq=Object.defineProperty;var pC=e=>{throw TypeError(e)};var Tq=(e,t,n)=>t in e?Sq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ti=(e,t,n)=>Tq(e,typeof t!="symbol"?t+"":t,n),T4=(e,t,n)=>t.has(e)||pC("Cannot "+n);var ve=(e,t,n)=>(T4(e,t,"read from private field"),n?n.call(e):t.get(e)),on=(e,t,n)=>t.has(e)?pC("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ct=(e,t,n,r)=>(T4(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Rn=(e,t,n)=>(T4(e,t,"access private method"),n);var D2=(e,t,n,r)=>({set _(i){Ct(e,t,i,n)},get _(){return ve(e,t,r)}});function Aq(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var $2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function va(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function IN(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var A4={exports:{}},Eb={},k4={exports:{}},Ln={};var mC;function kq(){if(mC)return Ln;mC=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.iterator;function g(O){return O===null||typeof O!="object"?null:(O=y&&O[y]||O["@@iterator"],typeof O=="function"?O:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function I(O,j,v){this.props=O,this.context=j,this.refs=S,this.updater=v||x}I.prototype.isReactComponent={},I.prototype.setState=function(O,j){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,j,"setState")},I.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function L(){}L.prototype=I.prototype;function D(O,j,v){this.props=O,this.context=j,this.refs=S,this.updater=v||x}var F=D.prototype=new L;F.constructor=D,_(F,I.prototype),F.isPureReactComponent=!0;var $=Array.isArray,z=Object.prototype.hasOwnProperty,V={current:null},K={key:!0,ref:!0,__self:!0,__source:!0};function te(O,j,v){var k,X={},re=null,ue=null;if(j!=null)for(k in j.ref!==void 0&&(ue=j.ref),j.key!==void 0&&(re=""+j.key),j)z.call(j,k)&&!K.hasOwnProperty(k)&&(X[k]=j[k]);var pe=arguments.length-2;if(pe===1)X.children=v;else if(1<pe){for(var we=Array(pe),Ce=0;Ce<pe;Ce++)we[Ce]=arguments[Ce+2];X.children=we}if(O&&O.defaultProps)for(k in pe=O.defaultProps,pe)X[k]===void 0&&(X[k]=pe[k]);return{$$typeof:e,type:O,key:re,ref:ue,props:X,_owner:V.current}}function Q(O,j){return{$$typeof:e,type:O.type,key:j,ref:O.ref,props:O.props,_owner:O._owner}}function ee(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function ne(O){var j={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(v){return j[v]})}var J=/\/+/g;function M(O,j){return typeof O=="object"&&O!==null&&O.key!=null?ne(""+O.key):j.toString(36)}function m(O,j,v,k,X){var re=typeof O;(re==="undefined"||re==="boolean")&&(O=null);var ue=!1;if(O===null)ue=!0;else switch(re){case"string":case"number":ue=!0;break;case"object":switch(O.$$typeof){case e:case t:ue=!0}}if(ue)return ue=O,X=X(ue),O=k===""?"."+M(ue,0):k,$(X)?(v="",O!=null&&(v=O.replace(J,"$&/")+"/"),m(X,j,v,"",function(Ce){return Ce})):X!=null&&(ee(X)&&(X=Q(X,v+(!X.key||ue&&ue.key===X.key?"":(""+X.key).replace(J,"$&/")+"/")+O)),j.push(X)),1;if(ue=0,k=k===""?".":k+":",$(O))for(var pe=0;pe<O.length;pe++){re=O[pe];var we=k+M(re,pe);ue+=m(re,j,v,we,X)}else if(we=g(O),typeof we=="function")for(O=we.call(O),pe=0;!(re=O.next()).done;)re=re.value,we=k+M(re,pe++),ue+=m(re,j,v,we,X);else if(re==="object")throw j=String(O),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.");return ue}function E(O,j,v){if(O==null)return O;var k=[],X=0;return m(O,k,"","",function(re){return j.call(v,re,X++)}),k}function C(O){if(O._status===-1){var j=O._result;j=j(),j.then(function(v){(O._status===0||O._status===-1)&&(O._status=1,O._result=v)},function(v){(O._status===0||O._status===-1)&&(O._status=2,O._result=v)}),O._status===-1&&(O._status=0,O._result=j)}if(O._status===1)return O._result.default;throw O._result}var N={current:null},P={transition:null},B={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:P,ReactCurrentOwner:V};return Ln.Children={map:E,forEach:function(O,j,v){E(O,function(){j.apply(this,arguments)},v)},count:function(O){var j=0;return E(O,function(){j++}),j},toArray:function(O){return E(O,function(j){return j})||[]},only:function(O){if(!ee(O))throw Error("React.Children.only expected to receive a single React element child.");return O}}
2,Ln.Component=I,Ln.Fragment=n,Ln.Profiler=i,Ln.PureComponent=D,Ln.StrictMode=r,Ln.Suspense=c,Ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,Ln.cloneElement=function(O,j,v){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var k=_({},O.props),X=O.key,re=O.ref,ue=O._owner;if(j!=null){if(j.ref!==void 0&&(re=j.ref,ue=V.current),j.key!==void 0&&(X=""+j.key),O.type&&O.type.defaultProps)var pe=O.type.defaultProps;for(we in j)z.call(j,we)&&!K.hasOwnProperty(we)&&(k[we]=j[we]===void 0&&pe!==void 0?pe[we]:j[we])}var we=arguments.length-2;if(we===1)k.children=v;else if(1<we){pe=Array(we);for(var Ce=0;Ce<we;Ce++)pe[Ce]=arguments[Ce+2];k.children=pe}return{$$typeof:e,type:O.type,key:X,ref:re,props:k,_owner:ue}},Ln.createContext=function(O){return O={$$typeof:o,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:s,_context:O},O.Consumer=O},Ln.createElement=te,Ln.createFactory=function(O){var j=te.bind(null,O);return j.type=O,j},Ln.createRef=function(){return{current:null}},Ln.forwardRef=function(O){return{$$typeof:a,render:O}},Ln.isValidElement=ee,Ln.lazy=function(O){return{$$typeof:h,_payload:{_status:-1,_result:O},_init:C}},Ln.memo=function(O,j){return{$$typeof:d,type:O,compare:j===void 0?null:j}},Ln.startTransition=function(O){var j=P.transition;P.transition={};try{O()}finally{P.transition=j}},Ln.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},Ln.useCallback=function(O,j){return N.current.useCallback(O,j)},Ln.useContext=function(O){return N.current.useContext(O)},Ln.useDebugValue=function(){},Ln.useDeferredValue=function(O){return N.current.useDeferredValue(O)},Ln.useEffect=function(O,j){return N.current.useEffect(O,j)},Ln.useId=function(){return N.current.useId()},Ln.useImperativeHandle=function(O,j,v){return N.current.useImperativeHandle(O,j,v)},Ln.useInsertionEffect=function(O,j){return N.current.useInsertionEffect(O,j)},Ln.useLayoutEffect=function(O,j){return N.current.useLayoutEffect(O,j)},Ln.useMemo=function(O,j){return N.current.useMemo(O,j)},Ln.useReducer=function(O,j,v){return N.current.useReducer(O,j,v)},Ln.useRef=function(O){return N.current.useRef(O)},Ln.useState=function(O){return N.current.useState(O)},Ln.useSyncExternalStore=function(O,j,v){return N.current.useSyncExternalStore(O,j,v)},Ln.useTransition=function(){return N.current.useTransition()},Ln.version="18.2.0",Ln}var yC;function Tg(){return yC||(yC=1,k4.exports=kq()),k4.exports}var gC;function Cq(){if(gC)return Eb;gC=1;var e=Tg(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,c,d){var h,y={},g=null,x=null;d!==void 0&&(g=""+d),c.key!==void 0&&(g=""+c.key),c.ref!==void 0&&(x=c.ref);for(h in c)r.call(c,h)&&!s.hasOwnProperty(h)&&(y[h]=c[h]);if(a&&a.defaultProps)for(h in c=a.defaultProps,c)y[h]===void 0&&(y[h]=c[h]);return{$$typeof:t,type:a,key:g,ref:x,props:y,_owner:i.current}}return Eb.Fragment=n,Eb.jsx=o,Eb.jsxs=o,Eb}var bC;function Iq(){return bC||(bC=1,A4.exports=Cq()),A4.exports}var u=Iq();const Rq="modulepreload",Mq=function(e){return"/"+e},xC={},hr=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let c=function(d){return Promise.all(d.map(h=>Promise.resolve(h).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=o?.nonce||o?.getAttribute("nonce");i=c(n.map(d=>{if(d=Mq(d),d in xC)return;xC[d]=!0;const h=d.endsWith(".css"),y=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${y}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":Rq,h||(g.as="script"),g.crossOrigin="",g.href=d,a&&g.setAttribute("nonce",a),document.head.appendChild(g),h)return new Promise((x,_)=>{g.addEventListener("load",x),g.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${d}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};const RN=Symbol("Comlink.proxy"),Nq=Symbol("Comlink.endpoint"),jq=Symbol("Comlink.releaseProxy"),C4=Symbol("Comlink.finalizer"),S5=Symbol("Comlink.thrown"),MN=e=>typeof e=="object"&&e!==null||typeof e=="function",Pq={canHandle:e=>MN(e)&&e[RN],serialize(e){const{port1:t,port2:n}=new MessageChannel;return jN(e,t),[n,[n]]},deserialize(e){return e.start(),Wy(e)}},Oq={canHandle:e=>MN(e)&&S5 in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},NN=new Map([["proxy",Pq],["throw",Oq]]);function Lq(e,t){for(const n of e)if(t===n||n==="*"||n instanceof RegExp&&n.test(t))return!0;return!1}function jN(e,t=globalThis,n=["*"]){t.addEventListener("message",function r(i){if(!i||!i.data)return;if(!Lq(n,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:s,type:o,path:a}=Object.assign({path:[]},i.data),c=(i.data.argumentList||[]).map(lp);let d;try{const h=a.slice(0,-1).reduce((g,x)=>g[x],e),y=a.reduce((g,x)=>g[x],e);switch(o){case"GET":d=y;break;case"SET":h[a.slice(-1)[0]]=lp(i.data.value),d=!0;break;case"APPLY":d=y.apply(h,c);break;case"CONSTRUCT":{const g=new y(...c);d=zq(g)}break;case"ENDPOINT":{const{port1:g,port2:x}=new MessageChannel;jN(e,x),d=Uq(g,[g])}break;case"RELEASE":d=void 0;break;default:return}}catch(h){d={value:h,[S5]:0}}
vendor: 5,092 bytes, line 2
2Promise.resolve(d).catch(h=>({value:h,[S5]:0})).then(h=>{const[y,g]=W5(h);t.postMessage(Object.assign(Object.assign({},y),{id:s}),g),o==="RELEASE"&&(t.removeEventListener("message",r),PN(t),C4 in e&&typeof e[C4]=="function"&&e[C4]())}).catch(h=>{const[y,g]=W5({value:new TypeError("Unserializable return value"),[S5]:0});t.postMessage(Object.assign(Object.assign({},y),{id:s}),g)})}),t.start&&t.start()}function Bq(e){return e.constructor.name==="MessagePort"}function PN(e){Bq(e)&&e.close()}function Wy(e,t){const n=new Map;return e.addEventListener("message",function(i){const{data:s}=i;if(!s||!s.id)return;const o=n.get(s.id);if(o)try{o(s)}finally{n.delete(s.id)}}),D_(e,n,[],t)}function U2(e){if(e)throw new Error("Proxy has been released and is not useable")}function ON(e){return sy(e,new Map,{type:"RELEASE"}).then(()=>{PN(e)})}const q5=new WeakMap,H5="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const t=(q5.get(e)||0)-1;q5.set(e,t),t===0&&ON(e)});function Fq(e,t){const n=(q5.get(t)||0)+1;q5.set(t,n),H5&&H5.register(e,t,e)}function Dq(e){H5&&H5.unregister(e)}function D_(e,t,n=[],r=function(){}){let i=!1;const s=new Proxy(r,{get(o,a){if(U2(i),a===jq)return()=>{Dq(s),ON(e),t.clear(),i=!0};if(a==="then"){if(n.length===0)return{then:()=>s};const c=sy(e,t,{type:"GET",path:n.map(d=>d.toString())}).then(lp);return c.then.bind(c)}return D_(e,t,[...n,a])},set(o,a,c){U2(i);const[d,h]=W5(c);return sy(e,t,{type:"SET",path:[...n,a].map(y=>y.toString()),value:d},h).then(lp)},apply(o,a,c){U2(i);const d=n[n.length-1];if(d===Nq)return sy(e,t,{type:"ENDPOINT"}).then(lp);if(d==="bind")return D_(e,t,n.slice(0,-1));const[h,y]=vC(c);return sy(e,t,{type:"APPLY",path:n.map(g=>g.toString()),argumentList:h},y).then(lp)},construct(o,a){U2(i);const[c,d]=vC(a);return sy(e,t,{type:"CONSTRUCT",path:n.map(h=>h.toString()),argumentList:c},d).then(lp)}});return Fq(s,e),s}function $q(e){return Array.prototype.concat.apply([],e)}function vC(e){const t=e.map(W5);return[t.map(n=>n[0]),$q(t.map(n=>n[1]))]}const LN=new WeakMap;function Uq(e,t){return LN.set(e,t),e}function zq(e){return Object.assign(e,{[RN]:!0})}function Vq(e,t=globalThis,n="*"){return{postMessage:(r,i)=>e.postMessage(r,n,i),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function W5(e){for(const[t,n]of NN)if(n.canHandle(e)){const[r,i]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},i]}return[{type:"RAW",value:e},LN.get(e)||[]]}function lp(e){switch(e.type){case"HANDLER":return NN.get(e.name).deserialize(e.value);case"RAW":return e.value}}function sy(e,t,n,r){return new Promise(i=>{const s=qq();t.set(s,i),e.start&&e.start(),e.postMessage(Object.assign({id:s},n),r)})}function qq(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var Gb={exports:{}};var Hq=Gb.exports,wC;function Wq(){return wC||(wC=1,(function(e,t){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,h="__lodash_placeholder__",y=1,g=2,x=4,_=1,S=2,I=1,L=2,D=4,F=8,$=16,z=32,V=64,K=128,te=256,Q=512,ee=30,ne="...",J=800,M=16,m=1,E=2,C=3,N=1/0,P=9007199254740991,B=17976931348623157e292,O=NaN,j=4294967295,v=j-1,k=j>>>1,X=[["ary",K],["bind",I],["bindKey",L],["curry",F],["curryRight",$],["flip",Q],["partial",z],["partialRight",V],["rearg",te]],re="[object Arguments]",ue="[object Array]",pe="[object AsyncFunction]",we="[object Boolean]",Ce="[object Date]",St="[object DOMException]",Ve="[object Error]",et="[object Function]",lt="[object GeneratorFunction]",tt="[object Map]",ut="[object Number]",nr="[object Null]",Rt="[object Object]",Qt="[object Promise]",Ls="[object Proxy]",Ft="[object RegExp]",Mt="[object Set]",Dn="[object String]",At="[object Symbol]",Wt="[object Undefined]",xr="[object WeakMap]",Yt="[object WeakSet]",Ut="[object ArrayBuffer]",pr="[object DataView]",$t="[object Float32Array]",se="[object Float64Array]",H="[object Int8Array]",Y="[object Int16Array]",le="[object Int32Array]",xe="[object Uint8Array]",Se="[object Uint8ClampedArray]",Re="[object Uint16Array]",Zt="[object Uint32Array]",ht=/\b__p \+= '';/g,pt=/\b(__p \+=) '' \+/g,$n=/(__e\(.*?\)|\b__t\)) \+\n'';/g,at=/&(?:amp|lt|gt|quot|#39);/g,zt=/[&<>"']/g,si=RegExp(at.source),tn=RegExp(zt.source),un=/<%-([\s\S]+?)%>/g,Mi=/<%([\s\S]+?)%>/g,an=/<%=([\s\S]+?)%>/g,oe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G=/^\w*$/,Z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,de=/[\\^$.*+?()[\]{}|]/g,Ee=RegExp(de.source),Te=/^\s+/,Me=/\s/,nn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wt=/\{\n\/\* \[wrapped with (.+)\] \*/,xt=/,? & /,rr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yt=/[()=,{}\[\]\/\s]/,bn=/\\(\\)?/g,Bs=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,hn=/\w*$/,mn=/^[-+]0x[0-9a-f]+$/i,lc=/^0b[01]+$/i,Ta=/^\[object .+?Constructor\]$/,Aa=/^0o[0-7]+$/i,ka=/^(?:0|[1-9]\d*)$/,Ca=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 65,631 bytes, lines 2-21
27f]/g,uo=/($^)/,dc=/['\n\r\u2028\u2029\\]/g,Wn="\\ud800-\\udfff",fc="\\u0300-\\u036f",$o="\\ufe20-\\ufe2f",Ia="\\u20d0-\\u20ff",Fs=fc+$o+Ia,Ra="\\u2700-\\u27bf",Uo="a-z\\xdf-\\xf6\\xf8-\\xff",lo="\\xac\\xb1\\xd7\\xf7",Ei="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hc="\\u2000-\\u206f",oi=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ma="A-Z\\xc0-\\xd6\\xd8-\\xde",yw="\\ufe0e\\ufe0f",gw=lo+Ei+hc+oi,Ed="['’]",E0="["+Wn+"]",_d="["+gw+"]",il="["+Fs+"]",bw="\\d+",IE="["+Ra+"]",_0="["+Uo+"]",n1="[^"+Wn+gw+bw+Ra+Uo+Ma+"]",bh="\\ud83c[\\udffb-\\udfff]",xh="(?:"+il+"|"+bh+")",xw="[^"+Wn+"]",vh="(?:\\ud83c[\\udde6-\\uddff]){2}",Qn="[\\ud800-\\udbff][\\udc00-\\udfff]",sl="["+Ma+"]",r1="\\u200d",S0="(?:"+_0+"|"+n1+")",vw="(?:"+sl+"|"+n1+")",i1="(?:"+Ed+"(?:d|ll|m|re|s|t|ve))?",s1="(?:"+Ed+"(?:D|LL|M|RE|S|T|VE))?",T0=xh+"?",wh="["+yw+"]?",Gc="(?:"+r1+"(?:"+[xw,vh,Qn].join("|")+")"+wh+T0+")*",Kc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Sd=wh+T0+Gc,Eh="(?:"+[IE,vh,Qn].join("|")+")"+Sd,Zc="(?:"+[xw+il+"?",il,vh,Qn,E0].join("|")+")",RE=RegExp(Ed,"g"),ww=RegExp(il,"g"),ol=RegExp(bh+"(?="+bh+")|"+Zc+Sd,"g"),ME=RegExp([sl+"?"+_0+"+"+i1+"(?="+[_d,sl,"$"].join("|")+")",vw+"+"+s1+"(?="+[_d,sl+S0,"$"].join("|")+")",sl+"?"+S0+"+"+i1,sl+"+"+s1,Yc,Kc,bw,Eh].join("|"),"g"),Ew=RegExp("["+r1+Wn+Fs+yw+"]"),A0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_w=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],NE=-1,ar={};ar[$t]=ar[se]=ar[H]=ar[Y]=ar[le]=ar[xe]=ar[Se]=ar[Re]=ar[Zt]=!0,ar[re]=ar[ue]=ar[Ut]=ar[we]=ar[pr]=ar[Ce]=ar[Ve]=ar[et]=ar[tt]=ar[ut]=ar[Rt]=ar[Ft]=ar[Mt]=ar[Dn]=ar[xr]=!1;var ir={};ir[re]=ir[ue]=ir[Ut]=ir[pr]=ir[we]=ir[Ce]=ir[$t]=ir[se]=ir[H]=ir[Y]=ir[le]=ir[tt]=ir[ut]=ir[Rt]=ir[Ft]=ir[Mt]=ir[Dn]=ir[At]=ir[xe]=ir[Se]=ir[Re]=ir[Zt]=!0,ir[Ve]=ir[et]=ir[xr]=!1;var Td={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},k0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},jE={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},PE={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},o1=parseFloat,C0=parseInt,I0=typeof $2=="object"&&$2&&$2.Object===Object&&$2,Sw=typeof self=="object"&&self&&self.Object===Object&&self,Mr=I0||Sw||Function("return this")(),_h=t&&!t.nodeType&&t,Na=_h&&!0&&e&&!e.nodeType&&e,a1=Na&&Na.exports===_h,Ad=a1&&I0.process,es=(function(){try{var Ae=Na&&Na.require&&Na.require("util").types;return Ae||Ad&&Ad.binding&&Ad.binding("util")}catch{}})(),c1=es&&es.isArrayBuffer,gs=es&&es.isDate,al=es&&es.isMap,R0=es&&es.isRegExp,kd=es&&es.isSet,Tw=es&&es.isTypedArray;function ts(Ae,De,Pe){switch(Pe.length){case 0:return Ae.call(De);case 1:return Ae.call(De,Pe[0]);case 2:return Ae.call(De,Pe[0],Pe[1]);case 3:return Ae.call(De,Pe[0],Pe[1],Pe[2])}return Ae.apply(De,Pe)}function u1(Ae,De,Pe,gt){for(var pn=-1,Gn=Ae==null?0:Ae.length;++pn<Gn;){var Yr=Ae[pn];De(gt,Yr,Pe(Yr),Ae)}return gt}function Li(Ae,De){for(var Pe=-1,gt=Ae==null?0:Ae.length;++Pe<gt&&De(Ae[Pe],Pe,Ae)!==!1;);return Ae}function M0(Ae,De){for(var Pe=Ae==null?0:Ae.length;Pe--&&De(Ae[Pe],Pe,Ae)!==!1;);return Ae}function l1(Ae,De){for(var Pe=-1,gt=Ae==null?0:Ae.length;++Pe<gt;)if(!De(Ae[Pe],Pe,Ae))return!1;return!0}function Xc(Ae,De){for(var Pe=-1,gt=Ae==null?0:Ae.length,pn=0,Gn=[];++Pe<gt;){var Yr=Ae[Pe];De(Yr,Pe,Ae)&&(Gn[pn++]=Yr)}return Gn}function N0(Ae,De){var Pe=Ae==null?0:Ae.length;return!!Pe&&Cd(Ae,De,0)>-1}function d1(Ae,De,Pe){for(var gt=-1,pn=Ae==null?0:Ae.length;++gt<pn;)if(Pe(De,Ae[gt]))return!0;return!1}function vr(Ae,De){for(var Pe=-1,gt=Ae==null?0:Ae.length,pn=Array(gt);++Pe<gt;)pn[Pe]=De(Ae[Pe],Pe,Ae);return pn}function Qc(Ae,De){for(var Pe=-1,gt=De.length,pn=Ae.length;++Pe<gt;)Ae[pn+Pe]=De[Pe];return Ae}function f1(Ae,De,Pe,gt){var pn=-1,Gn=Ae==null?0:Ae.length;for(gt&&Gn&&(Pe=Ae[++pn]);++pn<Gn;)Pe=De(Pe,Ae[pn],pn,Ae);return Pe}function OE(Ae,De,Pe,gt){var pn=Ae==null?0:Ae.length;for(gt&&pn&&(Pe=Ae[--pn]);pn--;)Pe=De(Pe,Ae[pn],pn,Ae);return Pe}function h1(Ae,De){for(var Pe=-1,gt=Ae==null?0:Ae.length;++Pe<gt;)if(De(Ae[Pe],Pe,Ae))return!0;return!1}var LE=m1("length");function Aw(Ae){return Ae.split("")}function BE(Ae){return Ae.match(rr)||[]}function kw(Ae,De,Pe){var gt;return Pe(Ae,function(pn,Gn,Yr){if(De(pn,Gn,Yr))return gt=Gn,!1}),gt}function j0(Ae,De,Pe,gt){for(var pn=Ae.length,Gn=Pe+(gt?1:-1);gt?Gn--:++Gn<pn;)if(De(Ae[Gn],Gn,Ae))return Gn;return-1}function Cd(Ae,De,Pe){return De===De?L0(Ae,De,Pe):j0(Ae,Cw,Pe)}function p1(Ae,De,Pe,gt){for(var pn=Pe-1,Gn=Ae.length;++pn<Gn;)if(gt(Ae[pn],De))return pn;return-1}function Cw(Ae){return Ae!==Ae}function Iw(Ae,De){var Pe=Ae==null?0:Ae.length;return Pe?y1(Ae,De)/Pe:O}function m1(Ae){return function(De){return De==null?n:De[Ae]}}function P0(Ae){return function(De){return Ae==null?n:Ae[De]}}function Rw(Ae,De,Pe,gt,pn){return pn(Ae,function(Gn,Yr,ur){Pe=gt?(gt=!1,Gn):De(Pe,Gn,Yr,ur)}),Pe}function FE(Ae,De){var Pe=Ae.length;for(Ae.sort(De);Pe--;)Ae[Pe]=Ae[Pe].value;return Ae}function y1(Ae,De){for(var Pe,gt=-1,pn=Ae.length;++gt<pn;){var Gn=De(Ae[gt]);Gn!==n&&(Pe=Pe===n?Gn:Pe+Gn)}return Pe}function g1(Ae,De){for(var Pe=-1,gt=Array(Ae);++Pe<Ae;)gt[Pe]=De(Pe);return gt}function DE(Ae,De){return vr(De,function(Pe){return[Pe,Ae[Pe]]})}function Mw(Ae){return Ae&&Ae.slice(0,B0(Ae)+1).replace(Te,"")}function Ds(Ae){return function(De){return Ae(De)}}function Sh(Ae,De){return vr(De,function(Pe){return Ae[Pe]})}function pc(Ae,De){return Ae.has(De)}function Nw(Ae,De){for(var Pe=-1,gt=Ae.length;++Pe<gt&&Cd(De,Ae[Pe],0)>-1;);return Pe}function b1(Ae,De){for(var Pe=Ae.length;Pe--&&Cd(De,Ae[Pe],0)>-1;);return Pe}function jw(Ae,De){for(var Pe=Ae.length,gt=0;Pe--;)Ae[Pe]===De&&++gt;return gt}var Pw=P0(Td),Ow=P0(k0);function Lw(Ae){return"\\"+PE[Ae]}function Id(Ae,De){return Ae==null?n:Ae[De]}function Rd(Ae){return Ew.test(Ae)}function $E(Ae){return A0.test(Ae)}function UE(Ae){for(var De,Pe=[];!(De=Ae.next()).done;)Pe.push(De.value);return Pe}function O0(Ae){var De=-1,Pe=Array(Ae.size);return Ae.forEach(function(gt,pn){Pe[++De]=[pn,gt]}),Pe}function x1(Ae,De){return function(Pe){return Ae(De(Pe))}}function fo(Ae,De){for(var Pe=-1,gt=Ae.length,pn=0,Gn=[];++Pe<gt;){var Yr=Ae[Pe];(Yr===De||Yr===h)&&(Ae[Pe]=h,Gn[pn++]=Pe)}return Gn}function Jc(Ae){var De=-1,Pe=Array(Ae.size);return Ae.forEach(function(gt){Pe[++De]=gt}),Pe}function zE(Ae){var De=-1,Pe=Array(Ae.size);return Ae.forEach(function(gt){Pe[++De]=[gt,gt]}),Pe}function L0(Ae,De,Pe){for(var gt=Pe-1,pn=Ae.length;++gt<pn;)if(Ae[gt]===De)return gt;return-1}function VE(Ae,De,Pe){for(var gt=Pe+1;gt--;)if(Ae[gt]===De)return gt;return gt}function cl(Ae){return Rd(Ae)?Fw(Ae):LE(Ae)}function $s(Ae){return Rd(Ae)?Dw(Ae):Aw(Ae)}function B0(Ae){for(var De=Ae.length;De--&&Me.test(Ae.charAt(De)););return De}var Bw=P0(jE);function Fw(Ae){for(var De=ol.lastIndex=0;ol.test(Ae);)++De;return De}function Dw(Ae){return Ae.match(ol)||[]}function qE(Ae){return Ae.match(ME)||[]}var HE=(function Ae(De){De=De==null?Mr:Md.defaults(Mr.Object(),De,Md.pick(Mr,_w));var Pe=De.Array,gt=De.Date,pn=De.Error,Gn=De.Function,Yr=De.Math,ur=De.Object,Th=De.RegExp,WE=De.String,ho=De.TypeError,mc=Pe.prototype,v1=Gn.prototype,ja=ur.prototype,Nd=De["__core-js_shared__"],Ah=v1.toString,Kn=ja.hasOwnProperty,jd=0,F0=(function(){var p=/[^.]+$/.exec(Nd&&Nd.keys&&Nd.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""})(),kh=ja.toString,D0=Ah.call(ur),$w=Mr._,Uw=Th("^"+Ah.call(Kn).replace(de,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ch=a1?De.Buffer:n,yc=De.Symbol,Ih=De.Uint8Array,w1=Ch?Ch.allocUnsafe:n,zo=x1(ur.getPrototypeOf,ur),$0=ur.create,U0=ja.propertyIsEnumerable,z0=mc.splice,zw=yc?yc.isConcatSpreadable:n,gc=yc?yc.iterator:n,ul=yc?yc.toStringTag:n,Rh=(function(){try{var p=_c(ur,"defineProperty");return p({},"",{}),p}catch{}})(),Vw=De.clearTimeout!==Mr.clearTimeout&&De.clearTimeout,Ar=gt&&gt.now!==Mr.Date.now&&gt.now,E1=De.setTimeout!==Mr.setTimeout&&De.setTimeout,ll=Yr.ceil,eu=Yr.floor,V0=ur.getOwnPropertySymbols,_1=Ch?Ch.isBuffer:n,Pd=De.isFinite,q0=mc.join,Od=x1(ur.keys,ur),Zr=Yr.max,Bi=Yr.min,GE=gt.now,qw=De.parseInt,Mh=Yr.random,H0=mc.reverse,Nh=_c(De,"DataView"),dl=_c(De,"Map"),jh=_c(De,"Promise"),tu=_c(De,"Set"),Ph=_c(De,"WeakMap"),Ld=_c(ur,"create"),W0=Ph&&new Ph,Bd={},S1=mu(Nh),nu=mu(dl),Hw=mu(jh),Fd=mu(tu),Pa=mu(Ph),ru=yc?yc.prototype:n,Us=ru?ru.valueOf:n,G0=ru?ru.toString:n;function ce(p){if(Qr(p)&&!Tn(p)&&!(p instanceof _n)){if(p instanceof Fi)return p;if(Kn.call(p,"__wrapped__"))return rb(p)}return new Fi(p)}var Dd=(function(){function p(){}return function(b){if(!qr(b))return{};if($0)return $0(b);p.prototype=b;var R=new p;return p.prototype=n,R}})();function Oa(){}function Fi(p,b){this.__wrapped__=p,this.__actions__=[],this.__chain__=!!b,this.__index__=0,this.__values__=n}ce.templateSettings={escape:un,evaluate:Mi,interpolate:an,variable:"",imports:{_:ce}},ce.prototype=Oa.prototype,ce.prototype.constructor=ce,Fi.prototype=Dd(Oa.prototype),Fi.prototype.constructor=Fi;function _n(p){this.__wrapped__=p,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=j,this.__views__=[]}function K0(){var p=new _n(this.__wrapped__);return p.__actions__=is(this.__actions__),p.__dir__=this.__dir__,p.__filtered__=this.__filtered__,p.__iteratees__=is(this.__iteratees__),p.__takeCount__=this.__takeCount__,p.__views__=is(this.__views__),p}function T1(){if(this.__filtered__){var p=new _n(this);p.__dir__=-1,p.__filtered__=!0}else p=this.clone(),p.__dir__*=-1;return p}function $d(){var p=this.__wrapped__.value(),b=this.__dir__,R=Tn(p),W=b<0,ie=R?p.length:0,fe=m2(0,ie,this.__views__),me=fe.start,be=fe.end,ke=be-me,Ue=W?be:me-1,ze=this.__iteratees__,Ze=ze.length,dt=0,Lt=Bi(ke,this.__takeCount__);if(!R||!W&&ie==ke&&Lt==ke)return B1(p,this.__actions__);var rn=[];e:for(;ke--&&dt<Lt;){Ue+=b;for(var In=-1,sn=p[Ue];++In<Ze;){var On=ze[In],zn=On.iteratee,Qo=On.type,Ks=zn(sn);if(Qo==E)sn=Ks;else if(!Ks){if(Qo==m)continue e;break e}}rn[dt++]=sn}return rn}_n.prototype=Dd(Oa.prototype),_n.prototype.constructor=_n;function bs(p){var b=-1,R=p==null?0:p.length;for(this.clear();++b<R;){var W=p[b];this.set(W[0],W[1])}}function kr(){this.__data__=Ld?Ld(null):{},this.size=0}function wr(p){var b=this.has(p)&&delete this.__data__[p];return this.size-=b?1:0,b}function iu(p){var b=this.__data__;if(Ld){var R=b[p];return R===c?n:R}return Kn.call(b,p)?b[p]:n}function Di(p){var b=this.__data__;return Ld?b[p]!==n:Kn.call(b,p)}function xs(p,b){var R=this.__data__;return this.size+=this.has(p)?0:1,R[p]=Ld&&b===n?c:b,this}bs.prototype.clear=kr,bs.prototype.delete=wr,bs.prototype.get=iu,bs.prototype.has=Di,bs.prototype.set=xs;function ns(p){var b=-1,R=p==null?0:p.length;for(this.clear();++b<R;){var W=p[b];this.set(W[0],W[1])}}function Ud(){this.__data__=[],this.size=0}function vs(p){var b=this.__data__,R=Ui(b,p);if(R<0)return!1;var W=b.length-1;return R==W?b.pop():z0.call(b,R,1),--this.size,!0}function Y0(p){var b=this.__data__,R=Ui(b,p);return R<0?n:b[R][1]}function Ww(p){return Ui(this.__data__,p)>-1}function Gw(p,b){var R=this.__data__,W=Ui(R,p);return W<0?(++this.size,R.push([p,b])):R[W][1]=b,this}ns.prototype.clear=Ud,ns.prototype.delete=vs,ns.prototype.get=Y0,ns.prototype.has=Ww,ns.prototype.set=Gw;function po(p){var b=-1,R=p==null?0:p.length;for(this.clear();++b<R;){var W=p[b];this.set(W[0],W[1])}}function Kw(){this.size=0,this.__data__={hash:new bs,map:new(dl||ns),string:new bs}}function bc(p){var b=Em(this,p).delete(p);return this.size-=b?1:0,b}function Z0(p){return Em(this,p).get(p)}function A1(p){return Em(this,p).has(p)}function Yw(p,b){var R=Em(this,p),W=R.size;return R.set(p,b),this.size+=R.size==W?0:1,this}po.prototype.clear=Kw,po.prototype.delete=bc,po.prototype.get=Z0,po.prototype.has=A1,po.prototype.set=Yw;function fl(p){var b=-1,R=p==null?0:p.length;for(this.__data__=new po;++b<R;)this.add(p[b])}function su(p){return this.__data__.set(p,c),this}function zd(p){return this.__data__.has(p)}fl.prototype.add=fl.prototype.push=su,fl.prototype.has=zd;function $i(p){var b=this.__data__=new ns(p);this.size=b.size}function X0(){this.__data__=new ns,this.size=0}function Q0(p){var b=this.__data__,R=b.delete(p);return this.size=b.size,R}function mo(p){return this.__data__.get(p)}function yo(p){return this.__data__.has(p)}function hl(p,b){var R=this.__data__;if(R instanceof ns){var W=R.__data__;if(!dl||W.length<i-1)return W.push([p,b]),this.size=++R.size,this;R=this.__data__=new po(W)}return R.set(p,b),this.size=R.size,this}$i.prototype.clear=X0,$i.prototype.delete=Q0,$i.prototype.get=mo,$i.prototype.has=yo,$i.prototype.set=hl;function La(p,b){var R=Tn(p),W=!R&&sp(p),ie=!R&&!W&&of(p),fe=!R&&!W&&!ie&&Hm(p),me=R||W||ie||fe,be=me?g1(p.length,WE):[],ke=be.length;for(var Ue in p)(b||Kn.call(p,Ue))&&!(me&&(Ue=="length"||ie&&(Ue=="offset"||Ue=="parent")||fe&&(Ue=="buffer"||Ue=="byteLength"||Ue=="byteOffset")||bo(Ue,ke)))&&be.push(Ue);return be}function Ba(p){var b=p.length;return b?p[zh(0,b-1)]:n}function pl(p,b){return Hs(is(p),xc(b,0,p.length))}function Zw(p){return Hs(is(p))}function Oh(p,b,R){(R!==n&&!Ac(p[b],R)||R===n&&!(b in p))&&Fa(p,b,R)}function ml(p,b,R){var W=p[b];(!(Kn.call(p,b)&&Ac(W,R))||R===n&&!(b in p))&&Fa(p,b,R)}function Ui(p,b){for(var R=p.length;R--;)if(Ac(p[R][0],b))return R;return-1}function zs(p,b,R,W){return $a(p,function(ie,fe,me){b(W,ie,R(ie),me)}),W}function Cr(p,b){return p&&Ko(b,Ki(b),p)}function Vo(p,b){return p&&Ko(b,Eo(b),p)}function Fa(p,b,R){b=="__proto__"&&Rh?Rh(p,b,{configurable:!0,enumerable:!0,value:R,writable:!0}):p[b]=R}function J0(p,b){for(var R=-1,W=b.length,ie=Pe(W),fe=p==null;++R<W;)ie[R]=fe?n:y4(p,b[R]);return ie}function xc(p,b,R){return p===p&&(R!==n&&(p=p<=R?p:R),b!==n&&(p=p>=b?p:b)),p}function ws(p,b,R,W,ie,fe){var me,be=b&y,ke=b&g,Ue=b&x;if(R&&(me=ie?R(p,W,ie,fe):R(p)),me!==n)return me;if(!qr(p))return p;var ze=Tn(p);if(ze){if(me=y2(p),!be)return is(p,me)}else{var Ze=Hi(p),dt=Ze==et||Ze==lt;if(of(p))return D1(p,be);if(Ze==Rt||Ze==re||dt&&!ie){if(me=ke||dt?{}:Jd(p),!be)return ke?YE(p,Vo(me,p)):o2(p,Cr(me,p))}else{if(!ir[Ze])return ie?p:{};me=Wi(p,Ze,be)}}fe||(fe=new $i);var Lt=fe.get(p);if(Lt)return Lt;fe.set(p,me),Jk(p)?p.forEach(function(sn){me.add(ws(sn,b,R,sn,p,fe))}):Xk(p)&&p.forEach(function(sn,On){me.set(On,ws(sn,b,R,On,p,fe))});var rn=Ue?ke?Yh:wm:ke?Eo:Ki,In=ze?n:rn(p);return Li(In||p,function(sn,On){In&&(On=sn,sn=p[On]),ml(me,On,ws(sn,b,R,On,p,fe))}),me}function Xw(p){var b=Ki(p);return function(R){return Lh(R,p,b)}}function Lh(p,b,R){var W=R.length;if(p==null)return!W;for(p=ur(p);W--;){var ie=R[W],fe=b[ie],me=p[ie];if(me===n&&!(ie in p)||!fe(me))return!1}return!0}function k1(p,b,R){if(typeof p!="function")throw new ho(o);return tf(function(){p.apply(n,R)},b)}function Da(p,b,R,W){var ie=-1,fe=N0,me=!0,be=p.length,ke=[],Ue=b.length;if(!be)return ke;R&&(b=vr(b,Ds(R))),W?(fe=d1,me=!1):b.length>=i&&(fe=pc,me=!1,b=new fl(b));e:for(;++ie<be;){var ze=p[ie],Ze=R==null?ze:R(ze);if(ze=W||ze!==0?ze:0,me&&Ze===Ze){for(var dt=Ue;dt--;)if(b[dt]===Ze)continue e;ke.push(ze)}else fe(b,Ze,W)||ke.push(ze)}return ke}var $a=a2(go),Qw=a2(ou,!0);function qo(p,b){var R=!0;return $a(p,function(W,ie,fe){return R=!!b(W,ie,fe),R}),R}function yl(p,b,R){for(var W=-1,ie=p.length;++W<ie;){var fe=p[W],me=b(fe);if(me!=null&&(be===n?me===me&&!Xo(me):R(me,be)))var be=me,ke=fe}return ke}function em(p,b,R,W){var ie=p.length;for(R=An(R),R<0&&(R=-R>ie?0:ie+R),W=W===n||W>ie?ie:An(W),W<0&&(W+=ie),W=R>W?0:tC(W);R<W;)p[R++]=b;return p}function gl(p,b){var R=[];return $a(p,function(W,ie,fe){b(W,ie,fe)&&R.push(W)}),R}function ai(p,b,R,W,ie){var fe=-1,me=p.length;for(R||(R=QE),ie||(ie=[]);++fe<me;){var be=p[fe];b>0&&R(be)?b>1?ai(be,b-1,R,W,ie):Qc(ie,be):W||(ie[ie.length]=be)}return ie}var Bh=q1(),tm=q1(!0);function go(p,b){return p&&Bh(p,b,Ki)}function ou(p,b){return p&&tm(p,b,Ki)}function rs(p,b){return Xc(b,function(R){return Tl(p[R])})}function Vs(p,b){b=vc(b,p);for(var R=0,W=b.length;p!=null&&R<W;)p=p[Yo(b[R++])];return R&&R==W?p:n}function nm(p,b,R){var W=b(p);return Tn(p)?W:Qc(W,R(p))}function zi(p){return p==null?p===n?Wt:nr:ul&&ul in ur(p)?p2(p):v2(p)}function Ho(p,b){return p>b}function au(p,b){return p!=null&&Kn.call(p,b)}function C1(p,b){return p!=null&&b in ur(p)}function Jw(p,b,R){return p>=Bi(b,R)&&p<Zr(b,R)}function Wo(p,b,R){for(var W=R?d1:N0,ie=p[0].length,fe=p.length,me=fe,be=Pe(fe),ke=1/0,Ue=[];me--;){var ze=p[me];me&&b&&(ze=vr(ze,Ds(b))),ke=Bi(ze.length,ke),be[me]=!R&&(b||ie>=120&&ze.length>=120)?new fl(me&&ze):n}ze=p[0];var Ze=-1,dt=be[0];e:for(;++Ze<ie&&Ue.length<ke;){var Lt=ze[Ze],rn=b?b(Lt):Lt;if(Lt=R||Lt!==0?Lt:0,!(dt?pc(dt,rn):W(Ue,rn,R))){for(me=fe;--me;){var In=be[me];if(!(In?pc(In,rn):W(p[me],rn,R)))continue e}dt&&dt.push(rn),Ue.push(Lt)}}return Ue}function cu(p,b,R,W){return go(p,function(ie,fe,me){b(W,R(ie),fe,me)}),W}function uu(p,b,R){b=vc(b,p),p=Tm(p,b);var W=p==null?p:p[Yo(fi(b))];return W==null?n:ts(W,p,R)}function I1(p){return Qr(p)&&zi(p)==re}function rm(p){return Qr(p)&&zi(p)==Ut}function e2(p){return Qr(p)&&zi(p)==Ce}function Vd(p,b,R,W,ie){return p===b?!0:p==null||b==null||!Qr(p)&&!Qr(b)?p!==p&&b!==b:R1(p,b,R,W,Vd,ie)}function R1(p,b,R,W,ie,fe){var me=Tn(p),be=Tn(b),ke=me?ue:Hi(p),Ue=be?ue:Hi(b);ke=ke==re?Rt:ke,Ue=Ue==re?Rt:Ue;var ze=ke==Rt,Ze=Ue==Rt,dt=ke==Ue;if(dt&&of(p)){if(!of(b))return!1;me=!0,ze=!1}if(dt&&!ze)return fe||(fe=new $i),me||Hm(p)?vm(p,b,R,W,ie,fe):h2(p,b,ke,R,W,ie,fe);if(!(R&_)){var Lt=ze&&Kn.call(p,"__wrapped__"),rn=Ze&&Kn.call(b,"__wrapped__");if(Lt||rn){var In=Lt?p.value():p,sn=rn?b.value():b;return fe||(fe=new $i),ie(In,sn,R,W,fe)}}return dt?(fe||(fe=new $i),Z1(p,b,R,W,ie,fe)):!1}function im(p){return Qr(p)&&Hi(p)==tt}function sm(p,b,R,W){var ie=R.length,fe=ie,me=!W;if(p==null)return!fe;for(p=ur(p);ie--;){var be=R[ie];if(me&&be[2]?be[1]!==p[be[0]]:!(be[0]in p))return!1}for(;++ie<fe;){be=R[ie];var ke=be[0],Ue=p[ke],ze=be[1];if(me&&be[2]){if(Ue===n&&!(ke in p))return!1}else{var Ze=new $i;if(W)var dt=W(Ue,ze,ke,p,b,Ze);if(!(dt===n?Vd(ze,Ue,_|S,W,Ze):dt))return!1}}return!0}function M1(p){if(!qr(p)||eb(p))return!1;var b=Tl(p)?Uw:Ta;return b.test(mu(p))}function t2(p){return Qr(p)&&zi(p)==Ft}function N1(p){return Qr(p)&&Hi(p)==Mt}function Fh(p){return Qr(p)&&L2(p.length)&&!!ar[zi(p)]}function Dh(p){return typeof p=="function"?p:p==null?_o:typeof p=="object"?Tn(p)?Go(p[0],p[1]):qd(p):fC(p)}function om(p){if(!Qh(p))return Od(p);var b=[];for(var R in ur(p))Kn.call(p,R)&&R!="constructor"&&b.push(R);return b}function n2(p){if(!qr(p))return x2(p);var b=Qh(p),R=[];for(var W in p)W=="constructor"&&(b||!Kn.call(p,W))||R.push(W);return R}function lu(p,b){return p<b}function j1(p,b){var R=-1,W=wo(p)?Pe(p.length):[];return $a(p,function(ie,fe,me){W[++R]=b(ie,fe,me)}),W}function qd(p){var b=_m(p);return b.length==1&&b[0][2]?Jh(b[0][0],b[0][1]):function(R){return R===p||sm(R,p,b)}}function Go(p,b){return J1(p)&&ef(b)?Jh(Yo(p),b):function(R){var W=y4(R,p);return W===n&&W===b?g4(R,p):Vd(b,W,_|S)}}function du(p,b,R,W,ie){p!==b&&Bh(b,function(fe,me){if(ie||(ie=new $i),qr(fe))$h(p,b,me,R,du,W,ie);else{var be=W?W(qs(p,me),fe,me+"",p,b,ie):n;be===n&&(be=fe),Oh(p,me,be)}},Eo)}function $h(p,b,R,W,ie,fe,me){var be=qs(p,R),ke=qs(b,R),Ue=me.get(ke);if(Ue){Oh(p,R,Ue);return}var ze=fe?fe(be,ke,R+"",p,b,me):n,Ze=ze===n;if(Ze){var dt=Tn(ke),Lt=!dt&&of(ke),rn=!dt&&!Lt&&Hm(ke);ze=ke,dt||Lt||rn?Tn(be)?ze=be:hi(be)?ze=is(be):Lt?(Ze=!1,ze=D1(ke,!0)):rn?(Ze=!1,ze=U1(ke,!0)):ze=[]:wb(ke)||sp(ke)?(ze=be,sp(be)?ze=nC(be):(!qr(be)||Tl(be))&&(ze=Jd(ke))):Ze=!1}Ze&&(me.set(ke,ze),ie(ze,ke,W,fe,me),me.delete(ke)),Oh(p,R,ze)}function fu(p,b){var R=p.length;if(R)return b+=b<0?R:0,bo(b,R)?p[b]:n}function am(p,b,R){b.length?b=vr(b,function(fe){return Tn(fe)?function(me){return Vs(me,fe.length===1?fe[0]:fe)}:fe}):b=[_o];var W=-1;b=vr(b,Ds(Vt()));var ie=j1(p,function(fe,me,be){var ke=vr(b,function(Ue){return Ue(fe)});return{criteria:ke,index:++W,value:fe}});return FE(ie,function(fe,me){return s2(fe,me,R)})}function Hd(p,b){return P1(p,b,function(R,W){return g4(p,W)})}function P1(p,b,R){for(var W=-1,ie=b.length,fe={};++W<ie;){var me=b[W],be=Vs(p,me);R(be,me)&&Or(fe,vc(me,p),be)}return fe}function O1(p){return function(b){return Vs(b,p)}}function Ir(p,b,R,W){var ie=W?p1:Cd,fe=-1,me=b.length,be=p;for(p===b&&(b=is(b)),R&&(be=vr(p,Ds(R)));++fe<me;)for(var ke=0,Ue=b[fe],ze=R?R(Ue):Ue;(ke=ie(be,ze,ke,W))>-1;)be!==p&&z0.call(be,ke,1),z0.call(p,ke,1);return p}function Uh(p,b){for(var R=p?b.length:0,W=R-1;R--;){var ie=b[R];if(R==W||ie!==fe){var fe=ie;bo(ie)?z0.call(p,ie,1):xl(p,ie)}}return p}function zh(p,b){return p+eu(Mh()*(b-p+1))}function L1(p,b,R,W){for(var ie=-1,fe=Zr(ll((b-p)/(R||1)),0),me=Pe(fe);fe--;)me[W?fe:++ie]=p,p+=R;return me}function Wd(p,b){var R="";if(!p||b<1||b>P)return R;do b%2&&(R+=p),b=eu(b/2),b&&(p+=p);while(b);return R}function Sn(p,b){return Am(Sm(p,b,_o),p+"")}function bl(p){return Ba(Wm(p))}function Pr(p,b){var R=Wm(p);return Hs(R,xc(b,0,R.length))}function Or(p,b,R,W){if(!qr(p))return p;b=vc(b,p);for(var ie=-1,fe=b.length,me=fe-1,be=p;be!=null&&++ie<fe;){var ke=Yo(b[ie]),Ue=R;if(ke==="__proto__"||ke==="constructor"||ke==="prototype")return p;if(ie!=me){var ze=be[ke];Ue=W?W(ze,ke,be):n,Ue===n&&(Ue=qr(ze)?ze:bo(b[ie+1])?[]:{})}ml(be,ke,Ue),be=be[ke]}return p}var ci=W0?function(p,b){return W0.set(p,b),p}:_o,cm=Rh?function(p,b){return Rh(p,"toString",{configurable:!0,enumerable:!1,value:x4(b),writable:!0})}:_o;function Vh(p){return Hs(Wm(p))}function Vi(p,b,R){var W=-1,ie=p.length;b<0&&(b=-b>ie?0:ie+b),R=R>ie?ie:R,R<0&&(R+=ie),ie=b>R?0:R-b>>>0,b>>>=0;for(var fe=Pe(ie);++W<ie;)fe[W]=p[W+b];return fe}function KE(p,b){var R;return $a(p,function(W,ie,fe){return R=b(W,ie,fe),!R}),!!R}function ui(p,b,R){var W=0,ie=p==null?W:p.length;if(typeof b=="number"&&b===b&&ie<=k){for(;W<ie;){var fe=W+ie>>>1,me=p[fe];me!==null&&!Xo(me)&&(R?me<=b:me<b)?W=fe+1:ie=fe}return ie}return qh(p,b,_o,R)}function qh(p,b,R,W){var ie=0,fe=p==null?0:p.length;if(fe===0)return 0;b=R(b);for(var me=b!==b,be=b===null,ke=Xo(b),Ue=b===n;ie<fe;){var ze=eu((ie+fe)/2),Ze=R(p[ze]),dt=Ze!==n,Lt=Ze===null,rn=Ze===Ze,In=Xo(Ze);if(me)var sn=W||rn;else Ue?sn=rn&&(W||dt):be?sn=rn&&dt&&(W||!Lt):ke?sn=rn&&dt&&!Lt&&(W||!In):Lt||In?sn=!1:sn=W?Ze<=b:Ze<b;sn?ie=ze+1:fe=ze}return Bi(fe,v)}function um(p,b){for(var R=-1,W=p.length,ie=0,fe=[];++R<W;){var me=p[R],be=b?b(me):me;if(!R||!Ac(be,ke)){var ke=be;fe[ie++]=me===0?0:me}}return fe}function lm(p){return typeof p=="number"?p:Xo(p)?O:+p}function Dr(p){if(typeof p=="string")return p;if(Tn(p))return vr(p,Dr)+"";if(Xo(p))return G0?G0.call(p):"";var b=p+"";return b=="0"&&1/p==-N?"-0":b}function li(p,b,R){var W=-1,ie=N0,fe=p.length,me=!0,be=[],ke=be;if(R)me=!1,ie=d1;else if(fe>=i){var Ue=b?null:ss(p);if(Ue)return Jc(Ue);me=!1,ie=pc,ke=new fl}else ke=b?[]:be;e:for(;++W<fe;){var ze=p[W],Ze=b?b(ze):ze;if(ze=R||ze!==0?ze:0,me&&Ze===Ze){for(var dt=ke.length;dt--;)if(ke[dt]===Ze)continue e;b&&ke.push(Ze),be.push(ze)}else ie(ke,Ze,R)||(ke!==be&&ke.push(Ze),be.push(ze))}return be}function xl(p,b){return b=vc(b,p),p=Tm(p,b),p==null||delete p[Yo(fi(b))]}function dm(p,b,R,W){return Or(p,b,R(Vs(p,b)),W)}function Gd(p,b,R,W){for(var ie=p.length,fe=W?ie:-1;(W?fe--:++fe<ie)&&b(p[fe],fe,p););return R?Vi(p,W?0:fe,W?fe+1:ie):Vi(p,W?fe+1:0,W?ie:fe)}function B1(p,b){var R=p;return R instanceof _n&&(R=R.value()),f1(b,function(W,ie){return ie.func.apply(ie.thisArg,Qc([W],ie.args))},R)}function fm(p,b,R){var W=p.length;if(W<2)return W?li(p[0]):[];for(var ie=-1,fe=Pe(W);++ie<W;)for(var me=p[ie],be=-1;++be<W;)be!=ie&&(fe[ie]=Da(fe[ie]||me,p[be],b,R));return li(ai(fe,1),b,R)}function F1(p,b,R){for(var W=-1,ie=p.length,fe=b.length,me={};++W<ie;){var be=W<fe?b[W]:n;R(me,p[W],be)}return me}function hm(p){return hi(p)?p:[]}function pm(p){return typeof p=="function"?p:_o}function vc(p,b){return Tn(p)?p:J1(p,b)?[p]:w2(lr(p))}var r2=Sn;function wc(p,b,R){var W=p.length;return R=R===n?W:R,!b&&R>=W?p:Vi(p,b,R)}var Kd=Vw||function(p){return Mr.clearTimeout(p)};function D1(p,b){if(b)return p.slice();var R=p.length,W=w1?w1(R):new p.constructor(R);return p.copy(W),W}function Yd(p){var b=new p.constructor(p.byteLength);return new Ih(b).set(new Ih(p)),b}function mm(p,b){var R=b?Yd(p.buffer):p.buffer;return new p.constructor(R,p.byteOffset,p.byteLength)}function i2(p){var b=new p.constructor(p.source,hn.exec(p));return b.lastIndex=p.lastIndex,b}function $1(p){return Us?ur(Us.call(p)):{}}function U1(p,b){var R=b?Yd(p.buffer):p.buffer;return new p.constructor(R,p.byteOffset,p.length)}function z1(p,b){if(p!==b){var R=p!==n,W=p===null,ie=p===p,fe=Xo(p),me=b!==n,be=b===null,ke=b===b,Ue=Xo(b);if(!be&&!Ue&&!fe&&p>b||fe&&me&&ke&&!be&&!Ue||W&&me&&ke||!R&&ke||!ie)return 1;if(!W&&!fe&&!Ue&&p<b||Ue&&R&&ie&&!W&&!fe||be&&R&&ie||!me&&ie||!ke)return-1}return 0}function s2(p,b,R){for(var W=-1,ie=p.criteria,fe=b.criteria,me=ie.length,be=R.length;++W<me;){var ke=z1(ie[W],fe[W]);if(ke){if(W>=be)return ke;var Ue=R[W];return ke*(Ue=="desc"?-1:1)}}return p.index-b.index}function V1(p,b,R,W){for(var ie=-1,fe=p.length,me=R.length,be=-1,ke=b.length,Ue=Zr(fe-me,0),ze=Pe(ke+Ue),Ze=!W;++be<ke;)ze[be]=b[be];for(;++ie<me;)(Ze||ie<fe)&&(ze[R[ie]]=p[ie]);for(;Ue--;)ze[be++]=p[ie++];return ze}function ym(p,b,R,W){for(var ie=-1,fe=p.length,me=-1,be=R.length,ke=-1,Ue=b.length,ze=Zr(fe-be,0),Ze=Pe(ze+Ue),dt=!W;++ie<ze;)Ze[ie]=p[ie];for(var Lt=ie;++ke<Ue;)Ze[Lt+ke]=b[ke];for(;++me<be;)(dt||ie<fe)&&(Ze[Lt+R[me]]=p[ie++]);return Ze}function is(p,b){var R=-1,W=p.length;for(b||(b=Pe(W));++R<W;)b[R]=p[R];return b}function Ko(p,b,R,W){var ie=!R;R||(R={});for(var fe=-1,me=b.length;++fe<me;){var be=b[fe],ke=W?W(R[be],p[be],be,R,p):n;ke===n&&(ke=p[be]),ie?Fa(R,be,ke):ml(R,be,ke)}return R}function o2(p,b){return Ko(p,Qd(p),b)}function YE(p,b){return Ko(p,Va(p),b)}function Hh(p,b){return function(R,W){var ie=Tn(R)?u1:zs,fe=b?b():{};return ie(R,p,Vt(W,2),fe)}}function Zd(p){return Sn(function(b,R){var W=-1,ie=R.length,fe=ie>1?R[ie-1]:n,me=ie>2?R[2]:n;for(fe=p.length>3&&typeof fe=="function"?(ie--,fe):n,me&&sr(R[0],R[1],me)&&(fe=ie<3?n:fe,ie=1),b=ur(b);++W<ie;){var be=R[W];be&&p(b,be,W,fe)}return b})}function a2(p,b){return function(R,W){if(R==null)return R;if(!wo(R))return p(R,W);for(var ie=R.length,fe=b?ie:-1,me=ur(R);(b?fe--:++fe<ie)&&W(me[fe],fe,me)!==!1;);return R}}function q1(p){return function(b,R,W){for(var ie=-1,fe=ur(b),me=W(b),be=me.length;be--;){var ke=me[p?be:++ie];if(R(fe[ke],ke,fe)===!1)break}return b}}function c2(p,b,R){var W=b&I,ie=Wh(p);function fe(){var me=this&&this!==Mr&&this instanceof fe?ie:p;return me.apply(W?R:this,arguments)}return fe}function H1(p){return function(b){b=lr(b);var R=Rd(b)?$s(b):n,W=R?R[0]:b.charAt(0),ie=R?wc(R,1).join(""):b.slice(1);return W[p]()+ie}}function Ec(p){return function(b){return f1(lC(uC(b).replace(RE,"")),p,"")}}function Wh(p){return function(){var b=arguments;switch(b.length){case 0:return new p;case 1:return new p(b[0]);case 2:return new p(b[0],b[1]);case 3:return new p(b[0],b[1],b[2]);case 4:return new p(b[0],b[1],b[2],b[3]);case 5:return new p(b[0],b[1],b[2],b[3],b[4]);case 6:return new p(b[0],b[1],b[2],b[3],b[4],b[5]);case 7:return new p(b[0],b[1],b[2],b[3],b[4],b[5],b[6])}var R=Dd(p.prototype),W=p.apply(R,b);return qr(W)?W:R}}function ZE(p,b,R){var W=Wh(p);function ie(){for(var fe=arguments.length,me=Pe(fe),be=fe,ke=hu(ie);be--;)me[be]=arguments[be];var Ue=fe<3&&me[0]!==ke&&me[fe-1]!==ke?[]:fo(me,ke);if(fe-=Ue.length,fe<R)return d2(p,b,Xd,ie.placeholder,n,me,Ue,n,n,R-fe);var ze=this&&this!==Mr&&this instanceof ie?W:p;return ts(ze,this,me)}return ie}function u2(p){return function(b,R,W){var ie=ur(b);if(!wo(b)){var fe=Vt(R,3);b=Ki(b),R=function(be){return fe(ie[be],be,ie)}}var me=p(b,R,W);return me>-1?ie[fe?b[me]:me]:n}}function vl(p){return za(function(b){var R=b.length,W=R,ie=Fi.prototype.thru;for(p&&b.reverse();W--;){var fe=b[W];if(typeof fe!="function")throw new ho(o);if(ie&&!me&&Xh(fe)=="wrapper")var me=new Fi([],!0)}for(W=me?W:R;++W<R;){fe=b[W];var be=Xh(fe),ke=be=="wrapper"?Zh(fe):n;ke&&pu(ke[0])&&ke[1]==(K|F|z|te)&&!ke[4].length&&ke[9]==1?me=me[Xh(ke[0])].apply(me,ke[3]):me=fe.length==1&&pu(fe)?me[be]():me.thru(fe)}return function(){var Ue=arguments,ze=Ue[0];if(me&&Ue.length==1&&Tn(ze))return me.plant(ze).value();for(var Ze=0,dt=R?b[Ze].apply(this,Ue):ze;++Ze<R;)dt=b[Ze].call(this,dt);return dt}})}function Xd(p,b,R,W,ie,fe,me,be,ke,Ue){var ze=b&K,Ze=b&I,dt=b&L,Lt=b&(F|$),rn=b&Q,In=dt?n:Wh(p);function sn(){for(var On=arguments.length,zn=Pe(On),Qo=On;Qo--;)zn[Qo]=arguments[Qo];if(Lt)var Ks=hu(sn),Jo=jw(zn,Ks);if(W&&(zn=V1(zn,W,ie,Lt)),fe&&(zn=ym(zn,fe,me,Lt)),On-=Jo,Lt&&On<Ue){var pi=fo(zn,Ks);return d2(p,b,Xd,sn.placeholder,R,zn,pi,be,ke,Ue-On)}var kc=Ze?R:this,kl=dt?kc[p]:p;return On=zn.length,be?zn=Ni(zn,be):rn&&On>1&&zn.reverse(),ze&&ke<On&&(zn.length=ke),this&&this!==Mr&&this instanceof sn&&(kl=In||Wh(kl)),kl.apply(kc,zn)}return sn}function gm(p,b){return function(R,W){return cu(R,p,b(W),{})}}function bm(p,b){return function(R,W){var ie;if(R===n&&W===n)return b;if(R!==n&&(ie=R),W!==n){if(ie===n)return W;typeof R=="string"||typeof W=="string"?(R=Dr(R),W=Dr(W)):(R=lm(R),W=lm(W)),ie=p(R,W)}return ie}}function xm(p){return za(function(b){return b=vr(b,Ds(Vt())),Sn(function(R){var W=this;return p(b,function(ie){return ts(ie,W,R)})})})}function Gh(p,b){b=b===n?" ":Dr(b);var R=b.length;if(R<2)return R?Wd(b,p):b;var W=Wd(b,ll(p/cl(b)));return Rd(b)?wc($s(W),0,p).join(""):W.slice(0,p)}function l2(p,b,R,W){var ie=b&I,fe=Wh(p);function me(){for(var be=-1,ke=arguments.length,Ue=-1,ze=W.length,Ze=Pe(ze+ke),dt=this&&this!==Mr&&this instanceof me?fe:p;++Ue<ze;)Ze[Ue]=W[Ue];for(;ke--;)Ze[Ue++]=arguments[++be];return ts(dt,ie?R:this,Ze)}return me}function W1(p){return function(b,R,W){return W&&typeof W!="number"&&sr(b,R,W)&&(R=W=n),b=Al(b),R===n?(R=b,b=0):R=Al(R),W=W===n?b<R?1:-1:Al(W),L1(b,R,W,p)}}function Kh(p){return function(b,R){return typeof b=="string"&&typeof R=="string"||(b=qa(b),R=qa(R)),p(b,R)}}function d2(p,b,R,W,ie,fe,me,be,ke,Ue){var ze=b&F,Ze=ze?me:n,dt=ze?n:me,Lt=ze?fe:n,rn=ze?n:fe;b|=ze?z:V,b&=~(ze?V:z),b&D||(b&=-4);var In=[p,b,ie,Lt,Ze,rn,dt,be,ke,Ue],sn=R.apply(n,In);return pu(p)&&Sc(sn,In),sn.placeholder=W,xo(sn,p,b)}function qi(p){var b=Yr[p];return function(R,W){if(R=qa(R),W=W==null?0:Bi(An(W),292),W&&Pd(R)){var ie=(lr(R)+"e").split("e"),fe=b(ie[0]+"e"+(+ie[1]+W));return ie=(lr(fe)+"e").split("e"),+(ie[0]+"e"+(+ie[1]-W))}return b(R)}}var ss=tu&&1/Jc(new tu([,-0]))[1]==N?function(p){return new tu(p)}:E4;function G1(p){return function(b){var R=Hi(b);return R==tt?O0(b):R==Mt?zE(b):DE(b,p(b))}}function Ua(p,b,R,W,ie,fe,me,be){var ke=b&L;if(!ke&&typeof p!="function")throw new ho(o);var Ue=W?W.length:0;if(Ue||(b&=-97,W=ie=n),me=me===n?me:Zr(An(me),0),be=be===n?be:An(be),Ue-=ie?ie.length:0,b&V){var ze=W,Ze=ie;W=ie=n}var dt=ke?n:Zh(p),Lt=[p,b,R,W,ie,ze,Ze,fe,me,be];if(dt&&b2(Lt,dt),p=Lt[0],b=Lt[1],R=Lt[2],W=Lt[3],ie=Lt[4],be=Lt[9]=Lt[9]===n?ke?0:p.length:Zr(Lt[9]-Ue,0),!be&&b&(F|$)&&(b&=-25),!b||b==I)var rn=c2(p,b,R);else b==F||b==$?rn=ZE(p,b,be):(b==z||b==(I|z))&&!ie.length?rn=l2(p,b,R,W):rn=Xd.apply(n,Lt);var In=dt?ci:Sc;return xo(In(rn,Lt),p,b)}function K1(p,b,R,W){return p===n||Ac(p,ja[R])&&!Kn.call(W,R)?b:p}function Y1(p,b,R,W,ie,fe){return qr(p)&&qr(b)&&(fe.set(b,p),du(p,b,n,Y1,fe),fe.delete(b)),p}function f2(p){return wb(p)?n:p}function vm(p,b,R,W,ie,fe){var me=R&_,be=p.length,ke=b.length;if(be!=ke&&!(me&&ke>be))return!1;var Ue=fe.get(p),ze=fe.get(b);if(Ue&&ze)return Ue==b&&ze==p;var Ze=-1,dt=!0,Lt=R&S?new fl:n;for(fe.set(p,b),fe.set(b,p);++Ze<be;){var rn=p[Ze],In=b[Ze];if(W)var sn=me?W(In,rn,Ze,b,p,fe):W(rn,In,Ze,p,b,fe);if(sn!==n){if(sn)continue;dt=!1;break}if(Lt){if(!h1(b,function(On,zn){if(!pc(Lt,zn)&&(rn===On||ie(rn,On,R,W,fe)))return Lt.push(zn)})){dt=!1;break}}else if(!(rn===In||ie(rn,In,R,W,fe))){dt=!1;break}}return fe.delete(p),fe.delete(b),dt}function h2(p,b,R,W,ie,fe,me){switch(R){case pr:if(p.byteLength!=b.byteLength||p.byteOffset!=b.byteOffset)return!1;p=p.buffer,b=b.buffer;case Ut:return!(p.byteLength!=b.byteLength||!fe(new Ih(p),new Ih(b)));case we:case Ce:case ut:return Ac(+p,+b);case Ve:return p.name==b.name&&p.message==b.message;case Ft:case Dn:return p==b+"";case tt:var be=O0;case Mt:var ke=W&_;if(be||(be=Jc),p.size!=b.size&&!ke)return!1;var Ue=me.get(p);if(Ue)return Ue==b;W|=S,me.set(p,b);var ze=vm(be(p),be(b),W,ie,fe,me);return me.delete(p),ze;case At:if(Us)return Us.call(p)==Us.call(b)}return!1}function Z1(p,b,R,W,ie,fe){var me=R&_,be=wm(p),ke=be.length,Ue=wm(b),ze=Ue.length;if(ke!=ze&&!me)return!1;for(var Ze=ke;Ze--;){var dt=be[Ze];if(!(me?dt in b:Kn.call(b,dt)))return!1}var Lt=fe.get(p),rn=fe.get(b);if(Lt&&rn)return Lt==b&&rn==p;var In=!0;fe.set(p,b),fe.set(b,p);for(var sn=me;++Ze<ke;){dt=be[Ze];var On=p[dt],zn=b[dt];if(W)var Qo=me?W(zn,On,dt,b,p,fe):W(On,zn,dt,p,b,fe);if(!(Qo===n?On===zn||ie(On,zn,R,W,fe):Qo)){In=!1;break}sn||(sn=dt=="constructor")}if(In&&!sn){var Ks=p.constructor,Jo=b.constructor;Ks!=Jo&&"constructor"in p&&"constructor"in b&&!(typeof Ks=="function"&&Ks instanceof Ks&&typeof Jo=="function"&&Jo instanceof Jo)&&(In=!1)}return fe.delete(p),fe.delete(b),In}function za(p){return Am(Sm(p,n,ep),p+"")}function wm(p){return nm(p,Ki,Qd)}function Yh(p){return nm(p,Eo,Va)}var Zh=W0?function(p){return W0.get(p)}:E4;function Xh(p){for(var b=p.name+"",R=Bd[b],W=Kn.call(Bd,b)?R.length:0;W--;){var ie=R[W],fe=ie.func;if(fe==null||fe==p)return ie.name}return b}function hu(p){var b=Kn.call(ce,"placeholder")?ce:p;return b.placeholder}function Vt(){var p=ce.iteratee||v4;return p=p===v4?Dh:p,arguments.length?p(arguments[0],arguments[1]):p}function Em(p,b){var R=p.__data__;return Tt(b)?R[typeof b=="string"?"string":"hash"]:R.map}function _m(p){for(var b=Ki(p),R=b.length;R--;){var W=b[R],ie=p[W];b[R]=[W,ie,ef(ie)]}return b}function _c(p,b){var R=Id(p,b);return M1(R)?R:n}function p2(p){var b=Kn.call(p,ul),R=p[ul];try{p[ul]=n;var W=!0}catch{}var ie=kh.call(p);return W&&(b?p[ul]=R:delete p[ul]),ie}var Qd=V0?function(p){return p==null?[]:(p=ur(p),Xc(V0(p),function(b){return U0.call(p,b)}))}:_4,Va=V0?function(p){for(var b=[];p;)Qc(b,Qd(p)),p=zo(p);return b}:_4,Hi=zi;(Nh&&Hi(new Nh(new ArrayBuffer(1)))!=pr||dl&&Hi(new dl)!=tt||jh&&Hi(jh.resolve())!=Qt||tu&&Hi(new tu)!=Mt||Ph&&Hi(new Ph)!=xr)&&(Hi=function(p){var b=zi(p),R=b==Rt?p.constructor:n,W=R?mu(R):"";if(W)switch(W){case S1:return pr;case nu:return tt;case Hw:return Qt;case Fd:return Mt;case Pa:return xr}return b});function m2(p,b,R){for(var W=-1,ie=R.length;++W<ie;){var fe=R[W],me=fe.size;switch(fe.type){case"drop":p+=me;break;case"dropRight":b-=me;break;case"take":b=Bi(b,p+me);break;case"takeRight":p=Zr(p,b-me);break}}return{start:p,end:b}}function X1(p){var b=p.match(wt);return b?b[1].split(xt):[]}function Q1(p,b,R){b=vc(b,p);for(var W=-1,ie=b.length,fe=!1;++W<ie;){var me=Yo(b[W]);if(!(fe=p!=null&&R(p,me)))break;p=p[me]}return fe||++W!=ie?fe:(ie=p==null?0:p.length,!!ie&&L2(ie)&&bo(me,ie)&&(Tn(p)||sp(p)))}function y2(p){var b=p.length,R=new p.constructor(b);return b&&typeof p[0]=="string"&&Kn.call(p,"index")&&(R.index=p.index,R.input=p.input),R}function Jd(p){return typeof p.constructor=="function"&&!Qh(p)?Dd(zo(p)):{}}function Wi(p,b,R){var W=p.constructor;switch(b){case Ut:return Yd(p);case we:case Ce:return new W(+p);case pr:return mm(p,R);case $t:case se:case H:case Y:case le:case xe:case Se:case Re:case Zt:return U1(p,R);case tt:return new W;case ut:case Dn:return new W(p);case Ft:return i2(p);case Mt:return new W;case At:return $1(p)}}function XE(p,b){var R=b.length;if(!R)return p;var W=R-1;return b[W]=(R>1?"& ":"")+b[W],b=b.join(R>2?", ":" "),p.replace(nn,`{
3/* [wrapped with `+b+`] */
4`)}function QE(p){return Tn(p)||sp(p)||!!(zw&&p&&p[zw])}function bo(p,b){var R=typeof p;return b=b??P,!!b&&(R=="number"||R!="symbol"&&ka.test(p))&&p>-1&&p%1==0&&p<b}function sr(p,b,R){if(!qr(R))return!1;var W=typeof b;return(W=="number"?wo(R)&&bo(b,R.length):W=="string"&&b in R)?Ac(R[b],p):!1}function J1(p,b){if(Tn(p))return!1;var R=typeof p;return R=="number"||R=="symbol"||R=="boolean"||p==null||Xo(p)?!0:G.test(p)||!oe.test(p)||b!=null&&p in ur(b)}function Tt(p){var b=typeof p;return b=="string"||b=="number"||b=="symbol"||b=="boolean"?p!=="__proto__":p===null}function pu(p){var b=Xh(p),R=ce[b];if(typeof R!="function"||!(b in _n.prototype))return!1;if(p===R)return!0;var W=Zh(R);return!!W&&p===W[0]}function eb(p){return!!F0&&F0 in p}var g2=Nd?Tl:S4;function Qh(p){var b=p&&p.constructor,R=typeof b=="function"&&b.prototype||ja;return p===R}function ef(p){return p===p&&!qr(p)}function Jh(p,b){return function(R){return R==null?!1:R[p]===b&&(b!==n||p in ur(R))}}function tb(p){var b=_e(p,function(W){return R.size===d&&R.clear(),W}),R=b.cache;return b}function b2(p,b){var R=p[1],W=b[1],ie=R|W,fe=ie<(I|L|K),me=W==K&&R==F||W==K&&R==te&&p[7].length<=b[8]||W==(K|te)&&b[7].length<=b[8]&&R==F;if(!(fe||me))return p;W&I&&(p[2]=b[2],ie|=R&I?0:D);var be=b[3];if(be){var ke=p[3];p[3]=ke?V1(ke,be,b[4]):be,p[4]=ke?fo(p[3],h):b[4]}return be=b[5],be&&(ke=p[5],p[5]=ke?ym(ke,be,b[6]):be,p[6]=ke?fo(p[5],h):b[6]),be=b[7],be&&(p[7]=be),W&K&&(p[8]=p[8]==null?b[8]:Bi(p[8],b[8])),p[9]==null&&(p[9]=b[9]),p[0]=b[0],p[1]=ie,p}function x2(p){var b=[];if(p!=null)for(var R in ur(p))b.push(R);return b}function v2(p){return kh.call(p)}function Sm(p,b,R){return b=Zr(b===n?p.length-1:b,0),function(){for(var W=arguments,ie=-1,fe=Zr(W.length-b,0),me=Pe(fe);++ie<fe;)me[ie]=W[b+ie];ie=-1;for(var be=Pe(b+1);++ie<b;)be[ie]=W[ie];return be[b]=R(me),ts(p,this,be)}}function Tm(p,b){return b.length<2?p:Vs(p,Vi(b,0,-1))}function Ni(p,b){for(var R=p.length,W=Bi(b.length,R),ie=is(p);W--;){var fe=b[W];p[W]=bo(fe,R)?ie[fe]:n}return p}function qs(p,b){if(!(b==="constructor"&&typeof p[b]=="function")&&b!="__proto__")return p[b]}var Sc=nb(ci),tf=E1||function(p,b){return Mr.setTimeout(p,b)},Am=nb(cm);function xo(p,b,R){var W=b+"";return Am(p,XE(W,E2(X1(W),R)))}function nb(p){var b=0,R=0;return function(){var W=GE(),ie=M-(W-R);if(R=W,ie>0){if(++b>=J)return arguments[0]}else b=0;return p.apply(n,arguments)}}function Hs(p,b){var R=-1,W=p.length,ie=W-1;for(b=b===n?W:b;++R<b;){var fe=zh(R,ie),me=p[fe];p[fe]=p[R],p[R]=me}return p.length=b,p}var w2=tb(function(p){var b=[];return p.charCodeAt(0)===46&&b.push(""),p.replace(Z,function(R,W,ie,fe){b.push(ie?fe.replace(bn,"$1"):W||R)}),b});function Yo(p){if(typeof p=="string"||Xo(p))return p;var b=p+"";return b=="0"&&1/p==-N?"-0":b}function mu(p){if(p!=null){try{return Ah.call(p)}catch{}try{return p+""}catch{}}return""}function E2(p,b){return Li(X,function(R){var W="_."+R[0];b&R[1]&&!N0(p,W)&&p.push(W)}),p.sort()}function rb(p){if(p instanceof _n)return p.clone();var b=new Fi(p.__wrapped__,p.__chain__);return b.__actions__=is(p.__actions__),b.__index__=p.__index__,b.__values__=p.__values__,b}function JE(p,b,R){(R?sr(p,b,R):b===n)?b=1:b=Zr(An(b),0);var W=p==null?0:p.length;if(!W||b<1)return[];for(var ie=0,fe=0,me=Pe(ll(W/b));ie<W;)me[fe++]=Vi(p,ie,ie+=b);return me}function km(p){for(var b=-1,R=p==null?0:p.length,W=0,ie=[];++b<R;){var fe=p[b];fe&&(ie[W++]=fe)}return ie}function ib(){var p=arguments.length;if(!p)return[];for(var b=Pe(p-1),R=arguments[0],W=p;W--;)b[W-1]=arguments[W];return Qc(Tn(R)?is(R):[R],ai(b,1))}var vo=Sn(function(p,b){return hi(p)?Da(p,ai(b,1,hi,!0)):[]}),Un=Sn(function(p,b){var R=fi(b);return hi(R)&&(R=n),hi(p)?Da(p,ai(b,1,hi,!0),Vt(R,2)):[]}),_i=Sn(function(p,b){var R=fi(b);return hi(R)&&(R=n),hi(p)?Da(p,ai(b,1,hi,!0),n,R):[]});function Xr(p,b,R){var W=p==null?0:p.length;return W?(b=R||b===n?1:An(b),Vi(p,b<0?0:b,W)):[]}function ji(p,b,R){var W=p==null?0:p.length;return W?(b=R||b===n?1:An(b),b=W-b,Vi(p,0,b<0?0:b)):[]}function Ws(p,b){return p&&p.length?Gd(p,Vt(b,3),!0,!0):[]}function nf(p,b){return p&&p.length?Gd(p,Vt(b,3),!0):[]}function di(p,b,R,W){var ie=p==null?0:p.length;return ie?(R&&typeof R!="number"&&sr(p,b,R)&&(R=0,W=ie),em(p,b,R,W)):[]}function rf(p,b,R){var W=p==null?0:p.length;if(!W)return-1;var ie=R==null?0:An(R);return ie<0&&(ie=Zr(W+ie,0)),j0(p,Vt(b,3),ie)}function yu(p,b,R){var W=p==null?0:p.length;if(!W)return-1;var ie=W-1;return R!==n&&(ie=An(R),ie=R<0?Zr(W+ie,0):Bi(ie,W-1)),j0(p,Vt(b,3),ie,!0)}function ep(p){var b=p==null?0:p.length;return b?ai(p,1):[]}function sb(p){var b=p==null?0:p.length;return b?ai(p,N):[]}function tp(p,b){var R=p==null?0:p.length;return R?(b=b===n?1:An(b),ai(p,b)):[]}function Es(p){for(var b=-1,R=p==null?0:p.length,W={};++b<R;){var ie=p[b];W[ie[0]]=ie[1]}return W}function Cm(p){return p&&p.length?p[0]:n}function sf(p,b,R){var W=p==null?0:p.length;if(!W)return-1;var ie=R==null?0:An(R);return ie<0&&(ie=Zr(W+ie,0)),Cd(p,b,ie)}function Tc(p){var b=p==null?0:p.length;return b?Vi(p,0,-1):[]}var Im=Sn(function(p){var b=vr(p,hm);return b.length&&b[0]===p[0]?Wo(b):[]}),ob=Sn(function(p){var b=fi(p),R=vr(p,hm);return b===fi(R)?b=n:R.pop(),R.length&&R[0]===p[0]?Wo(R,Vt(b,2)):[]}),gu=Sn(function(p){var b=fi(p),R=vr(p,hm);return b=typeof b=="function"?b:n,b&&R.pop(),R.length&&R[0]===p[0]?Wo(R,n,b):[]});function Rm(p,b){return p==null?"":q0.call(p,b)}function fi(p){var b=p==null?0:p.length;return b?p[b-1]:n}function Mm(p,b,R){var W=p==null?0:p.length;if(!W)return-1;var ie=W;return R!==n&&(ie=An(R),ie=ie<0?Zr(W+ie,0):Bi(ie,W-1)),b===b?VE(p,b,ie):j0(p,Cw,ie,!0)}function np(p,b){return p&&p.length?fu(p,An(b)):n}var ab=Sn(rp);function rp(p,b){return p&&p.length&&b&&b.length?Ir(p,b):p}function Nm(p,b,R){return p&&p.length&&b&&b.length?Ir(p,b,Vt(R,2)):p}function os(p,b,R){return p&&p.length&&b&&b.length?Ir(p,b,n,R):p}var bu=za(function(p,b){var R=p==null?0:p.length,W=J0(p,b);return Uh(p,vr(b,function(ie){return bo(ie,R)?+ie:ie}).sort(z1)),W});function Zo(p,b){var R=[];if(!(p&&p.length))return R;var W=-1,ie=[],fe=p.length;for(b=Vt(b,3);++W<fe;){var me=p[W];b(me,W,p)&&(R.push(me),ie.push(W))}return Uh(p,ie),R}function Gi(p){return p==null?p:H0.call(p)}function _2(p,b,R){var W=p==null?0:p.length;return W?(R&&typeof R!="number"&&sr(p,b,R)?(b=0,R=W):(b=b==null?0:An(b),R=R===n?W:An(R)),Vi(p,b,R)):[]}function cb(p,b){return ui(p,b)}function ub(p,b,R){return qh(p,b,Vt(R,2))}function e4(p,b){var R=p==null?0:p.length;if(R){var W=ui(p,b);if(W<R&&Ac(p[W],b))return W}return-1}function xu(p,b){return ui(p,b,!0)}function S2(p,b,R){return qh(p,b,Vt(R,2),!0)}function lb(p,b){var R=p==null?0:p.length;if(R){var W=ui(p,b,!0)-1;if(Ac(p[W],b))return W}return-1}function wl(p){return p&&p.length?um(p):[]}function db(p,b){return p&&p.length?um(p,Vt(b,2)):[]}function El(p){var b=p==null?0:p.length;return b?Vi(p,1,b):[]}function T2(p,b,R){return p&&p.length?(b=R||b===n?1:An(b),Vi(p,0,b<0?0:b)):[]}function A2(p,b,R){var W=p==null?0:p.length;return W?(b=R||b===n?1:An(b),b=W-b,Vi(p,b<0?0:b,W)):[]}function fb(p,b){return p&&p.length?Gd(p,Vt(b,3),!1,!0):[]}function jm(p,b){return p&&p.length?Gd(p,Vt(b,3)):[]}var t4=Sn(function(p){return li(ai(p,1,hi,!0))}),n4=Sn(function(p){var b=fi(p);return hi(b)&&(b=n),li(ai(p,1,hi,!0),Vt(b,2))}),k2=Sn(function(p){var b=fi(p);return b=typeof b=="function"?b:n,li(ai(p,1,hi,!0),n,b)});function C2(p){return p&&p.length?li(p):[]}function _l(p,b){return p&&p.length?li(p,Vt(b,2)):[]}function r4(p,b){return b=typeof b=="function"?b:n,p&&p.length?li(p,n,b):[]}function vu(p){if(!(p&&p.length))return[];var b=0;return p=Xc(p,function(R){if(hi(R))return b=Zr(R.length,b),!0}),g1(b,function(R){return vr(p,m1(R))})}function hb(p,b){if(!(p&&p.length))return[];var R=vu(p);return b==null?R:vr(R,function(W){return ts(b,n,W)})}var $r=Sn(function(p,b){return hi(p)?Da(p,b):[]}),i4=Sn(function(p){return fm(Xc(p,hi))}),I2=Sn(function(p){var b=fi(p);return hi(b)&&(b=n),fm(Xc(p,hi),Vt(b,2))}),s4=Sn(function(p){var b=fi(p);return b=typeof b=="function"?b:n,fm(Xc(p,hi),n,b)}),o4=Sn(vu);function R2(p,b){return F1(p||[],b||[],ml)}function M2(p,b){return F1(p||[],b||[],Or)}var a4=Sn(function(p){var b=p.length,R=b>1?p[b-1]:n;return R=typeof R=="function"?(p.pop(),R):n,hb(p,R)});function Gs(p){var b=ce(p);return b.__chain__=!0,b}function pb(p,b){return b(p),p}function Pm(p,b){return b(p)}var wu=za(function(p){var b=p.length,R=b?p[0]:0,W=this.__wrapped__,ie=function(fe){return J0(fe,p)};return b>1||this.__actions__.length||!(W instanceof _n)||!bo(R)?this.thru(ie):(W=W.slice(R,+R+(b?1:0)),W.__actions__.push({func:Pm,args:[ie],thisArg:n}),new Fi(W,this.__chain__).thru(function(fe){return b&&!fe.length&&fe.push(n),fe}))});function Om(){return Gs(this)}function Sl(){return new Fi(this.value(),this.__chain__)}function Lm(){this.__values__===n&&(this.__values__=eC(this.value()));var p=this.__index__>=this.__values__.length,b=p?n:this.__values__[this.__index__++];return{done:p,value:b}}function mb(){return this}function yb(p){for(var b,R=this;R instanceof Oa;){var W=rb(R);W.__index__=0,W.__values__=n,b?ie.__wrapped__=W:b=W;var ie=W;R=R.__wrapped__}return ie.__wrapped__=p,b}function c4(){var p=this.__wrapped__;if(p instanceof _n){var b=p;return this.__actions__.length&&(b=new _n(this)),b=b.reverse(),b.__actions__.push({func:Pm,args:[Gi],thisArg:n}),new Fi(b,this.__chain__)}return this.thru(Gi)}function gb(){return B1(this.__wrapped__,this.__actions__)}var u4=Hh(function(p,b,R){Kn.call(p,R)?++p[R]:Fa(p,R,1)});function N2(p,b,R){var W=Tn(p)?l1:qo;return R&&sr(p,b,R)&&(b=n),W(p,Vt(b,3))}function j2(p,b){var R=Tn(p)?Xc:gl;return R(p,Vt(b,3))}var Bm=u2(rf),Fm=u2(yu);function P2(p,b){return ai(zm(p,b),1)}function bb(p,b){return ai(zm(p,b),N)}function l4(p,b,R){return R=R===n?1:An(R),ai(zm(p,b),R)}function xb(p,b){var R=Tn(p)?Li:$a;return R(p,Vt(b,3))}function Dm(p,b){var R=Tn(p)?M0:Qw;return R(p,Vt(b,3))}var $m=Hh(function(p,b,R){Kn.call(p,R)?p[R].push(b):Fa(p,R,[b])});function vb(p,b,R,W){p=wo(p)?p:Wm(p),R=R&&!W?An(R):0;var ie=p.length;return R<0&&(R=Zr(ie+R,0)),B2(p)?R<=ie&&p.indexOf(b,R)>-1:!!ie&&Cd(p,b,R)>-1}var Um=Sn(function(p,b,R){var W=-1,ie=typeof b=="function",fe=wo(p)?Pe(p.length):[];return $a(p,function(me){fe[++W]=ie?ts(b,me,R):uu(me,b,R)}),fe}),O2=Hh(function(p,b,R){Fa(p,R,b)});function zm(p,b){var R=Tn(p)?vr:j1;return R(p,Vt(b,3))}function Vm(p,b,R,W){return p==null?[]:(Tn(b)||(b=b==null?[]:[b]),R=W?n:R,Tn(R)||(R=R==null?[]:[R]),am(p,b,R))}var d4=Hh(function(p,b,R){p[R?0:1].push(b)},function(){return[[],[]]});function ip(p,b,R){var W=Tn(p)?f1:Rw,ie=arguments.length<3;return W(p,Vt(b,4),R,ie,$a)}function f4(p,b,R){var W=Tn(p)?OE:Rw,ie=arguments.length<3;return W(p,Vt(b,4),R,ie,Qw)}function qm(p,b){var R=Tn(p)?Xc:gl;return R(p,Ne(Vt(b,3)))}function l(p){var b=Tn(p)?Ba:bl;return b(p)}function f(p,b,R){(R?sr(p,b,R):b===n)?b=1:b=An(b);var W=Tn(p)?pl:Pr;return W(p,b)}function w(p){var b=Tn(p)?Zw:Vh;return b(p)}function T(p){if(p==null)return 0;if(wo(p))return B2(p)?cl(p):p.length;var b=Hi(p);return b==tt||b==Mt?p.size:om(p).length}function U(p,b,R){var W=Tn(p)?h1:KE;return R&&sr(p,b,R)&&(b=n),W(p,Vt(b,3))}var q=Sn(function(p,b){if(p==null)return[];var R=b.length;return R>1&&sr(p,b[0],b[1])?b=[]:R>2&&sr(b[0],b[1],b[2])&&(b=[b[0]]),am(p,ai(b,1),[])}),ae=Ar||function(){return Mr.Date.now()};function he(p,b){if(typeof b!="function")throw new ho(o);return p=An(p),function(){if(--p<1)return b.apply(this,arguments)}}function ge(p,b,R){return b=R?n:b,b=p&&b==null?p.length:b,Ua(p,K,n,n,n,n,b)}function Le(p,b){var R;if(typeof b!="function")throw new ho(o);return p=An(p),function(){return--p>0&&(R=b.apply(this,arguments)),p<=1&&(b=n),R}}var Ge=Sn(function(p,b,R){var W=I;if(R.length){var ie=fo(R,hu(Ge));W|=z}return Ua(p,W,b,R,ie)}),Je=Sn(function(p,b,R){var W=I|L;if(R.length){var ie=fo(R,hu(Je));W|=z}return Ua(b,W,p,R,ie)});function He(p,b,R){b=R?n:b;var W=Ua(p,F,n,n,n,n,n,b);return W.placeholder=He.placeholder,W}function bt(p,b,R){b=R?n:b;var W=Ua(p,$,n,n,n,n,n,b);return W.placeholder=bt.placeholder,W}function kt(p,b,R){var W,ie,fe,me,be,ke,Ue=0,ze=!1,Ze=!1,dt=!0;if(typeof p!="function")throw new ho(o);b=qa(b)||0,qr(R)&&(ze=!!R.leading,Ze="maxWait"in R,fe=Ze?Zr(qa(R.maxWait)||0,b):fe,dt="trailing"in R?!!R.trailing:dt);function Lt(pi){var kc=W,kl=ie;return W=ie=n,Ue=pi,me=p.apply(kl,kc),me}function rn(pi){return Ue=pi,be=tf(On,b),ze?Lt(pi):me}function In(pi){var kc=pi-ke,kl=pi-Ue,hC=b-kc;return Ze?Bi(hC,fe-kl):hC}function sn(pi){var kc=pi-ke,kl=pi-Ue;return ke===n||kc>=b||kc<0||Ze&&kl>=fe}function On(){var pi=ae();if(sn(pi))return zn(pi);be=tf(On,In(pi))}function zn(pi){return be=n,dt&&W?Lt(pi):(W=ie=n,me)}function Qo(){be!==n&&Kd(be),Ue=0,W=ke=ie=be=n}function Ks(){return be===n?me:zn(ae())}function Jo(){var pi=ae(),kc=sn(pi);if(W=arguments,ie=this,ke=pi,kc){if(be===n)return rn(ke);if(Ze)return Kd(be),be=tf(On,b),Lt(ke)}return be===n&&(be=tf(On,b)),me}return Jo.cancel=Qo,Jo.flush=Ks,Jo}var Nt=Sn(function(p,b){return k1(p,1,b)}),Vr=Sn(function(p,b,R){return k1(p,qa(b)||0,R)});function Ie(p){return Ua(p,Q)}function _e(p,b){if(typeof p!="function"||b!=null&&typeof b!="function")throw new ho(o);var R=function(){var W=arguments,ie=b?b.apply(this,W):W[0],fe=R.cache;if(fe.has(ie))return fe.get(ie);var me=p.apply(this,W);return R.cache=fe.set(ie,me)||fe,me};return R.cache=new(_e.Cache||po),R}_e.Cache=po;function Ne(p){if(typeof p!="function")throw new ho(o);return function(){var b=arguments;switch(b.length){case 0:return!p.call(this);case 1:return!p.call(this,b[0]);case 2:return!p.call(this,b[0],b[1]);case 3:return!p.call(this,b[0],b[1],b[2])}return!p.apply(this,b)}}function nt(p){return Le(2,p)}var Ot=r2(function(p,b){b=b.length==1&&Tn(b[0])?vr(b[0],Ds(Vt())):vr(ai(b,1),Ds(Vt()));var R=b.length;return Sn(function(W){for(var ie=-1,fe=Bi(W.length,R);++ie<fe;)W[ie]=b[ie].call(this,W[ie]);return ts(p,this,W)})}),qt=Sn(function(p,b){var R=fo(b,hu(qt));return Ua(p,z,n,b,R)}),Ht=Sn(function(p,b){var R=fo(b,hu(Ht));return Ua(p,V,n,b,R)}),cn=za(function(p,b){return Ua(p,te,n,n,n,b)});function Si(p,b){if(typeof p!="function")throw new ho(o);return b=b===n?b:An(b),Sn(p,b)}function Yn(p,b){if(typeof p!="function")throw new ho(o);return b=b==null?0:Zr(An(b),0),Sn(function(R){var W=R[b],ie=wc(R,0,b);return W&&Qc(ie,W),ts(p,this,ie)})}function Eu(p,b,R){var W=!0,ie=!0;if(typeof p!="function")throw new ho(o);return qr(R)&&(W="leading"in R?!!R.leading:W,ie="trailing"in R?!!R.trailing:ie),kt(p,b,{leading:W,maxWait:b,trailing:ie})}function h4(p){return ge(p,1)}function nz(p,b){return qt(pm(b),p)}function rz(){if(!arguments.length)return[];var p=arguments[0];return Tn(p)?p:[p]}function iz(p){return ws(p,x)}function sz(p,b){return b=typeof b=="function"?b:n,ws(p,x,b)}function oz(p){return ws(p,y|x)}function az(p,b){return b=typeof b=="function"?b:n,ws(p,y|x,b)}function cz(p,b){return b==null||Lh(p,b,Ki(b))}function Ac(p,b){return p===b||p!==p&&b!==b}var uz=Kh(Ho),lz=Kh(function(p,b){return p>=b}),sp=I1((function(){return arguments})())?I1:function(p){return Qr(p)&&Kn.call(p,"callee")&&!U0.call(p,"callee")},Tn=Pe.isArray,dz=c1?Ds(c1):rm;function wo(p){return p!=null&&L2(p.length)&&!Tl(p)}function hi(p){return Qr(p)&&wo(p)}function fz(p){return p===!0||p===!1||Qr(p)&&zi(p)==we}var of=_1||S4,hz=gs?Ds(gs):e2;function pz(p){return Qr(p)&&p.nodeType===1&&!wb(p)}function mz(p){if(p==null)return!0;if(wo(p)&&(Tn(p)||typeof p=="string"||typeof p.splice=="function"||of(p)||Hm(p)||sp(p)))return!p.length;var b=Hi(p);if(b==tt||b==Mt)return!p.size;if(Qh(p))return!om(p).length;for(var R in p)if(Kn.call(p,R))return!1;return!0}function yz(p,b){return Vd(p,b)}function gz(p,b,R){R=typeof R=="function"?R:n;var W=R?R(p,b):n;return W===n?Vd(p,b,n,R):!!W}function p4(p){if(!Qr(p))return!1;var b=zi(p);return b==Ve||b==St||typeof p.message=="string"&&typeof p.name=="string"&&!wb(p)}function bz(p){return typeof p=="number"&&Pd(p)}function Tl(p){if(!qr(p))return!1;var b=zi(p);return b==et||b==lt||b==pe||b==Ls}function Zk(p){return typeof p=="number"&&p==An(p)}function L2(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=P}function qr(p){var b=typeof p;return p!=null&&(b=="object"||b=="function")}function Qr(p){return p!=null&&typeof p=="object"}var Xk=al?Ds(al):im;function xz(p,b){return p===b||sm(p,b,_m(b))}function vz(p,b,R){return R=typeof R=="function"?R:n,sm(p,b,_m(b),R)}function wz(p){return Qk(p)&&p!=+p}function Ez(p){if(g2(p))throw new pn(s);return M1(p)}function _z(p){return p===null}function Sz(p){return p==null}function Qk(p){return typeof p=="number"||Qr(p)&&zi(p)==ut}function wb(p){if(!Qr(p)||zi(p)!=Rt)return!1;var b=zo(p);if(b===null)return!0;var R=Kn.call(b,"constructor")&&b.constructor;return typeof R=="function"&&R instanceof R&&Ah.call(R)==D0}var m4=R0?Ds(R0):t2;function Tz(p){return Zk(p)&&p>=-P&&p<=P}var Jk=kd?Ds(kd):N1;function B2(p){return typeof p=="string"||!Tn(p)&&Qr(p)&&zi(p)==Dn}function Xo(p){return typeof p=="symbol"||Qr(p)&&zi(p)==At}var Hm=Tw?Ds(Tw):Fh;function Az(p){return p===n}function kz(p){return Qr(p)&&Hi(p)==xr}function Cz(p){return Qr(p)&&zi(p)==Yt}var Iz=Kh(lu),Rz=Kh(function(p,b){return p<=b});function eC(p){if(!p)return[];if(wo(p))return B2(p)?$s(p):is(p);if(gc&&p[gc])return UE(p[gc]());var b=Hi(p),R=b==tt?O0:b==Mt?Jc:Wm;return R(p)}function Al(p){if(!p)return p===0?p:0;if(p=qa(p),p===N||p===-N){var b=p<0?-1:1;return b*B}return p===p?p:0}function An(p){var b=Al(p),R=b%1;return b===b?R?b-R:b:0}function tC(p){return p?xc(An(p),0,j):0}function qa(p){if(typeof p=="number")return p;if(Xo(p))return O;if(qr(p)){var b=typeof p.valueOf=="function"?p.valueOf():p;p=qr(b)?b+"":b}if(typeof p!="string")return p===0?p:+p;p=Mw(p);var R=lc.test(p);return R||Aa.test(p)?C0(p.slice(2),R?2:8):mn.test(p)?O:+p}function nC(p){return Ko(p,Eo(p))}function Mz(p){return p?xc(An(p),-P,P):p===0?p:0}function lr(p){return p==null?"":Dr(p)}var Nz=Zd(function(p,b){if(Qh(b)||wo(b)){Ko(b,Ki(b),p);return}for(var R in b)Kn.call(b,R)&&ml(p,R,b[R])}),rC=Zd(function(p,b){Ko(b,Eo(b),p)}),F2=Zd(function(p,b,R,W){Ko(b,Eo(b),p,W)}),jz=Zd(function(p,b,R,W){Ko(b,Ki(b),p,W)}),Pz=za(J0);function Oz(p,b){var R=Dd(p);return b==null?R:Cr(R,b)}var Lz=Sn(function(p,b){p=ur(p);var R=-1,W=b.length,ie=W>2?b[2]:n;for(ie&&sr(b[0],b[1],ie)&&(W=1);++R<W;)for(var fe=b[R],me=Eo(fe),be=-1,ke=me.length;++be<ke;){var Ue=me[be],ze=p[Ue];(ze===n||Ac(ze,ja[Ue])&&!Kn.call(p,Ue))&&(p[Ue]=fe[Ue])}return p}),Bz=Sn(function(p){return p.push(n,Y1),ts(iC,n,p)});function Fz(p,b){return kw(p,Vt(b,3),go)}function Dz(p,b){return kw(p,Vt(b,3),ou)}function $z(p,b){return p==null?p:Bh(p,Vt(b,3),Eo)}function Uz(p,b){return p==null?p:tm(p,Vt(b,3),Eo)}function zz(p,b){return p&&go(p,Vt(b,3))}function Vz(p,b){return p&&ou(p,Vt(b,3))}function qz(p){return p==null?[]:rs(p,Ki(p))}function Hz(p){return p==null?[]:rs(p,Eo(p))}function y4(p,b,R){var W=p==null?n:Vs(p,b);return W===n?R:W}function Wz(p,b){return p!=null&&Q1(p,b,au)}function g4(p,b){return p!=null&&Q1(p,b,C1)}var Gz=gm(function(p,b,R){b!=null&&typeof b.toString!="function"&&(b=kh.call(b)),p[b]=R},x4(_o)),Kz=gm(function(p,b,R){b!=null&&typeof b.toString!="function"&&(b=kh.call(b)),Kn.call(p,b)?p[b].push(R):p[b]=[R]},Vt),Yz=Sn(uu);function Ki(p){return wo(p)?La(p):om(p)}function Eo(p){return wo(p)?La(p,!0):n2(p)}function Zz(p,b){var R={};return b=Vt(b,3),go(p,function(W,ie,fe){Fa(R,b(W,ie,fe),W)}),R}function Xz(p,b){var R={};return b=Vt(b,3),go(p,function(W,ie,fe){Fa(R,ie,b(W,ie,fe))}),R}var Qz=Zd(function(p,b,R){du(p,b,R)}),iC=Zd(function(p,b,R,W){du(p,b,R,W)}),Jz=za(function(p,b){var R={};if(p==null)return R;var W=!1;b=vr(b,function(fe){return fe=vc(fe,p),W||(W=fe.length>1),fe}),Ko(p,Yh(p),R),W&&(R=ws(R,y|g|x,f2));for(var ie=b.length;ie--;)xl(R,b[ie]);return R});function eV(p,b){return sC(p,Ne(Vt(b)))}var tV=za(function(p,b){return p==null?{}:Hd(p,b)});function sC(p,b){if(p==null)return{};var R=vr(Yh(p),function(W){return[W]});return b=Vt(b),P1(p,R,function(W,ie){return b(W,ie[0])})}function nV(p,b,R){b=vc(b,p);var W=-1,ie=b.length;for(ie||(ie=1,p=n);++W<ie;){var fe=p==null?n:p[Yo(b[W])];fe===n&&(W=ie,fe=R),p=Tl(fe)?fe.call(p):fe}return p}function rV(p,b,R){return p==null?p:Or(p,b,R)}function iV(p,b,R,W){return W=typeof W=="function"?W:n,p==null?p:Or(p,b,R,W)}var oC=G1(Ki),aC=G1(Eo);function sV(p,b,R){var W=Tn(p),ie=W||of(p)||Hm(p);if(b=Vt(b,4),R==null){var fe=p&&p.constructor;ie?R=W?new fe:[]:qr(p)?R=Tl(fe)?Dd(zo(p)):{}:R={}}return(ie?Li:go)(p,function(me,be,ke){return b(R,me,be,ke)}),R}function oV(p,b){return p==null?!0:xl(p,b)}function aV(p,b,R){return p==null?p:dm(p,b,pm(R))}function cV(p,b,R,W){return W=typeof W=="function"?W:n,p==null?p:dm(p,b,pm(R),W)}function Wm(p){return p==null?[]:Sh(p,Ki(p))}function uV(p){return p==null?[]:Sh(p,Eo(p))}function lV(p,b,R){return R===n&&(R=b,b=n),R!==n&&(R=qa(R),R=R===R?R:0),b!==n&&(b=qa(b),b=b===b?b:0),xc(qa(p),b,R)}function dV(p,b,R){return b=Al(b),R===n?(R=b,b=0):R=Al(R),p=qa(p),Jw(p,b,R)}function fV(p,b,R){if(R&&typeof R!="boolean"&&sr(p,b,R)&&(b=R=n),R===n&&(typeof b=="boolean"?(R=b,b=n):typeof p=="boolean"&&(R=p,p=n)),p===n&&b===n?(p=0,b=1):(p=Al(p),b===n?(b=p,p=0):b=Al(b)),p>b){var W=p;p=b,b=W}if(R||p%1||b%1){var ie=Mh();return Bi(p+ie*(b-p+o1("1e-"+((ie+"").length-1))),b)}return zh(p,b)}var hV=Ec(function(p,b,R){return b=b.toLowerCase(),p+(R?cC(b):b)});function cC(p){return b4(lr(p).toLowerCase())}function uC(p){return p=lr(p),p&&p.replace(Ca,Pw).replace(ww,"")}function pV(p,b,R){p=lr(p),b=Dr(b);var W=p.length;R=R===n?W:xc(An(R),0,W);var ie=R;return R-=b.length,R>=0&&p.slice(R,ie)==b}function mV(p){return p=lr(p),p&&tn.test(p)?p.replace(zt,Ow):p}function yV(p){return p=lr(p),p&&Ee.test(p)?p.replace(de,"\\$&"):p}var gV=Ec(function(p,b,R){return p+(R?"-":"")+b.toLowerCase()}),bV=Ec(function(p,b,R){return p+(R?" ":"")+b.toLowerCase()}),xV=H1("toLowerCase");function vV(p,b,R){p=lr(p),b=An(b);var W=b?cl(p):0;if(!b||W>=b)return p;var ie=(b-W)/2;return Gh(eu(ie),R)+p+Gh(ll(ie),R)}function wV(p,b,R){p=lr(p),b=An(b);var W=b?cl(p):0;return b&&W<b?p+Gh(b-W,R):p}function EV(p,b,R){p=lr(p),b=An(b);var W=b?cl(p):0;return b&&W<b?Gh(b-W,R)+p:p}function _V(p,b,R){return R||b==null?b=0:b&&(b=+b),qw(lr(p).replace(Te,""),b||0)}function SV(p,b,R){return(R?sr(p,b,R):b===n)?b=1:b=An(b),Wd(lr(p),b)}function TV(){var p=arguments,b=lr(p[0]);return p.length<3?b:b.replace(p[1],p[2])}var AV=Ec(function(p,b,R){return p+(R?"_":"")+b.toLowerCase()});function kV(p,b,R){return R&&typeof R!="number"&&sr(p,b,R)&&(b=R=n),R=R===n?j:R>>>0,R?(p=lr(p),p&&(typeof b=="string"||b!=null&&!m4(b))&&(b=Dr(b),!b&&Rd(p))?wc($s(p),0,R):p.split(b,R)):[]}var CV=Ec(function(p,b,R){return p+(R?" ":"")+b4(b)});function IV(p,b,R){return p=lr(p),R=R==null?0:xc(An(R),0,p.length),b=Dr(b),p.slice(R,R+b.length)==b}function RV(p,b,R){var W=ce.templateSettings;R&&sr(p,b,R)&&(b=n),p=lr(p),b=F2({},b,W,K1);var ie=F2({},b.imports,W.imports,K1),fe=Ki(ie),me=Sh(ie,fe),be,ke,Ue=0,ze=b.interpolate||uo,Ze="__p += '",dt=Th((b.escape||uo).source+"|"+ze.source+"|"+(ze===an?Bs:uo).source+"|"+(b.evaluate||uo).source+"|$","g"),Lt="//# sourceURL="+(Kn.call(b,"sourceURL")?(b.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++NE+"]")+`
5`;p.replace(dt,function(sn,On,zn,Qo,Ks,Jo){return zn||(zn=Qo),Ze+=p.slice(Ue,Jo).replace(dc,Lw),On&&(be=!0,Ze+=`' +
6__e(`+On+`) +
7'`),Ks&&(ke=!0,Ze+=`';
8`+Ks+`;
9__p += '`),zn&&(Ze+=`' +
10((__t = (`+zn+`)) == null ? '' : __t) +
11'`),Ue=Jo+sn.length,sn}),Ze+=`';
12`;var rn=Kn.call(b,"variable")&&b.variable;if(!rn)Ze=`with (obj) {
13`+Ze+`
14}
15`;else if(yt.test(rn))throw new pn(a);Ze=(ke?Ze.replace(ht,""):Ze).replace(pt,"$1").replace($n,"$1;"),Ze="function("+(rn||"obj")+`) {
16`+(rn?"":`obj || (obj = {});
17`)+"var __t, __p = ''"+(be?", __e = _.escape":"")+(ke?`, __j = Array.prototype.join;
18function print() { __p += __j.call(arguments, '') }
19`:`;
20`)+Ze+`return __p
21}`;var In=dC(function(){return Gn(fe,Lt+"return "+Ze).apply(n,me)});if(In.source=Ze,p4(In))throw In;return In}function MV(p){return lr(p).toLowerCase()}function NV(p){return lr(p).toUpperCase()}function jV(p,b,R){if(p=lr(p),p&&(R||b===n))return Mw(p);if(!p||!(b=Dr(b)))return p;var W=$s(p),ie=$s(b),fe=Nw(W,ie),me=b1(W,ie)+1;return wc(W,fe,me).join("")}function PV(p,b,R){if(p=lr(p),p&&(R||b===n))return p.slice(0,B0(p)+1);if(!p||!(b=Dr(b)))return p;var W=$s(p),ie=b1(W,$s(b))+1;return wc(W,0,ie).join("")}function OV(p,b,R){if(p=lr(p),p&&(R||b===n))return p.replace(Te,"");if(!p||!(b=Dr(b)))return p;var W=$s(p),ie=Nw(W,$s(b));return wc(W,ie).join("")}function LV(p,b){var R=ee,W=ne;if(qr(b)){var ie="separator"in b?b.separator:ie;R="length"in b?An(b.length):R,W="omission"in b?Dr(b.omission):W}p=lr(p);var fe=p.length;if(Rd(p)){var me=$s(p);fe=me.length}if(R>=fe)return p;var be=R-cl(W);if(be<1)return W;var ke=me?wc(me,0,be).join(""):p.slice(0,be);if(ie===n)return ke+W;if(me&&(be+=ke.length-be),m4(ie)){if(p.slice(be).search(ie)){var Ue,ze=ke;for(ie.global||(ie=Th(ie.source,lr(hn.exec(ie))+"g")),ie.lastIndex=0;Ue=ie.exec(ze);)var Ze=Ue.index;ke=ke.slice(0,Ze===n?be:Ze)}}else if(p.indexOf(Dr(ie),be)!=be){var dt=ke.lastIndexOf(ie);dt>-1&&(ke=ke.slice(0,dt))}return ke+W}function BV(p){return p=lr(p),p&&si.test(p)?p.replace(at,Bw):p}var FV=Ec(function(p,b,R){return p+(R?" ":"")+b.toUpperCase()}),b4=H1("toUpperCase");function lC(p,b,R){return p=lr(p),b=R?n:b,b===n?$E(p)?qE(p):BE(p):p.match(b)||[]}var dC=Sn(function(p,b){try{return ts(p,n,b)}catch(R){return p4(R)?R:new pn(R)}}),DV=za(function(p,b){return Li(b,function(R){R=Yo(R),Fa(p,R,Ge(p[R],p))}),p});function $V(p){var b=p==null?0:p.length,R=Vt();return p=b?vr(p,function(W){if(typeof W[1]!="function")throw new ho(o);return[R(W[0]),W[1]]}):[],Sn(function(W){for(var ie=-1;++ie<b;){var fe=p[ie];if(ts(fe[0],this,W))return ts(fe[1],this,W)}})}function UV(p){return Xw(ws(p,y))}function x4(p){return function(){return p}}function zV(p,b){return p==null||p!==p?b:p}var VV=vl(),qV=vl(!0);function _o(p){return p}function v4(p){return Dh(typeof p=="function"?p:ws(p,y))}function HV(p){return qd(ws(p,y))}function WV(p,b){return Go(p,ws(b,y))}var GV=Sn(function(p,b){return function(R){return uu(R,p,b)}}),KV=Sn(function(p,b){return function(R){return uu(p,R,b)}});function w4(p,b,R){var W=Ki(b),ie=rs(b,W);R==null&&!(qr(b)&&(ie.length||!W.length))&&(R=b,b=p,p=this,ie=rs(b,Ki(b)));var fe=!(qr(R)&&"chain"in R)||!!R.chain,me=Tl(p);return Li(ie,function(be){var ke=b[be];p[be]=ke,me&&(p.prototype[be]=function(){var Ue=this.__chain__;if(fe||Ue){var ze=p(this.__wrapped__),Ze=ze.__actions__=is(this.__actions__);return Ze.push({func:ke,args:arguments,thisArg:p}),ze.__chain__=Ue,ze}return ke.apply(p,Qc([this.value()],arguments))})}),p}function YV(){return Mr._===this&&(Mr._=$w),this}function E4(){}function ZV(p){return p=An(p),Sn(function(b){return fu(b,p)})}var XV=xm(vr),QV=xm(l1),JV=xm(h1);function fC(p){return J1(p)?m1(Yo(p)):O1(p)}function eq(p){return function(b){return p==null?n:Vs(p,b)}}var tq=W1(),nq=W1(!0);function _4(){return[]}function S4(){return!1}function rq(){return{}}function iq(){return""}function sq(){return!0}function oq(p,b){if(p=An(p),p<1||p>P)return[];var R=j,W=Bi(p,j);b=Vt(b),p-=j;for(var ie=g1(W,b);++R<p;)b(R);return ie}function aq(p){return Tn(p)?vr(p,Yo):Xo(p)?[p]:is(w2(lr(p)))}function cq(p){var b=++jd;return lr(p)+b}var uq=bm(function(p,b){return p+b},0),lq=qi("ceil"),dq=bm(function(p,b){return p/b},1),fq=qi("floor");function hq(p){return p&&p.length?yl(p,_o,Ho):n}function pq(p,b){return p&&p.length?yl(p,Vt(b,2),Ho):n}function mq(p){return Iw(p,_o)}function yq(p,b){return Iw(p,Vt(b,2))}function gq(p){return p&&p.length?yl(p,_o,lu):n}function bq(p,b){return p&&p.length?yl(p,Vt(b,2),lu):n}var xq=bm(function(p,b){return p*b},1),vq=qi("round"),wq=bm(function(p,b){return p-b},0);function Eq(p){return p&&p.length?y1(p,_o):0}function _q(p,b){return p&&p.length?y1(p,Vt(b,2)):0}return ce.after=he,ce.ary=ge,ce.assign=Nz,ce.assignIn=rC,ce.assignInWith=F2,ce.assignWith=jz,ce.at=Pz,ce.before=Le,ce.bind=Ge,ce.bindAll=DV,ce.bindKey=Je,ce.castArray=rz,ce.chain=Gs,ce.chunk=JE,ce.compact=km,ce.concat=ib,ce.cond=$V,ce.conforms=UV,ce.constant=x4,ce.countBy=u4,ce.create=Oz,ce.curry=He,ce.curryRight=bt,ce.debounce=kt,ce.defaults=Lz,ce.defaultsDeep=Bz,ce.defer=Nt,ce.delay=Vr,ce.difference=vo,ce.differenceBy=Un,ce.differenceWith=_i,ce.drop=Xr,ce.dropRight=ji,ce.dropRightWhile=Ws,ce.dropWhile=nf,ce.fill=di,ce.filter=j2,ce.flatMap=P2,ce.flatMapDeep=bb,ce.flatMapDepth=l4,ce.flatten=ep,ce.flatten
vendor: 4,673 bytes, line 21
21Deep=sb,ce.flattenDepth=tp,ce.flip=Ie,ce.flow=VV,ce.flowRight=qV,ce.fromPairs=Es,ce.functions=qz,ce.functionsIn=Hz,ce.groupBy=$m,ce.initial=Tc,ce.intersection=Im,ce.intersectionBy=ob,ce.intersectionWith=gu,ce.invert=Gz,ce.invertBy=Kz,ce.invokeMap=Um,ce.iteratee=v4,ce.keyBy=O2,ce.keys=Ki,ce.keysIn=Eo,ce.map=zm,ce.mapKeys=Zz,ce.mapValues=Xz,ce.matches=HV,ce.matchesProperty=WV,ce.memoize=_e,ce.merge=Qz,ce.mergeWith=iC,ce.method=GV,ce.methodOf=KV,ce.mixin=w4,ce.negate=Ne,ce.nthArg=ZV,ce.omit=Jz,ce.omitBy=eV,ce.once=nt,ce.orderBy=Vm,ce.over=XV,ce.overArgs=Ot,ce.overEvery=QV,ce.overSome=JV,ce.partial=qt,ce.partialRight=Ht,ce.partition=d4,ce.pick=tV,ce.pickBy=sC,ce.property=fC,ce.propertyOf=eq,ce.pull=ab,ce.pullAll=rp,ce.pullAllBy=Nm,ce.pullAllWith=os,ce.pullAt=bu,ce.range=tq,ce.rangeRight=nq,ce.rearg=cn,ce.reject=qm,ce.remove=Zo,ce.rest=Si,ce.reverse=Gi,ce.sampleSize=f,ce.set=rV,ce.setWith=iV,ce.shuffle=w,ce.slice=_2,ce.sortBy=q,ce.sortedUniq=wl,ce.sortedUniqBy=db,ce.split=kV,ce.spread=Yn,ce.tail=El,ce.take=T2,ce.takeRight=A2,ce.takeRightWhile=fb,ce.takeWhile=jm,ce.tap=pb,ce.throttle=Eu,ce.thru=Pm,ce.toArray=eC,ce.toPairs=oC,ce.toPairsIn=aC,ce.toPath=aq,ce.toPlainObject=nC,ce.transform=sV,ce.unary=h4,ce.union=t4,ce.unionBy=n4,ce.unionWith=k2,ce.uniq=C2,ce.uniqBy=_l,ce.uniqWith=r4,ce.unset=oV,ce.unzip=vu,ce.unzipWith=hb,ce.update=aV,ce.updateWith=cV,ce.values=Wm,ce.valuesIn=uV,ce.without=$r,ce.words=lC,ce.wrap=nz,ce.xor=i4,ce.xorBy=I2,ce.xorWith=s4,ce.zip=o4,ce.zipObject=R2,ce.zipObjectDeep=M2,ce.zipWith=a4,ce.entries=oC,ce.entriesIn=aC,ce.extend=rC,ce.extendWith=F2,w4(ce,ce),ce.add=uq,ce.attempt=dC,ce.camelCase=hV,ce.capitalize=cC,ce.ceil=lq,ce.clamp=lV,ce.clone=iz,ce.cloneDeep=oz,ce.cloneDeepWith=az,ce.cloneWith=sz,ce.conformsTo=cz,ce.deburr=uC,ce.defaultTo=zV,ce.divide=dq,ce.endsWith=pV,ce.eq=Ac,ce.escape=mV,ce.escapeRegExp=yV,ce.every=N2,ce.find=Bm,ce.findIndex=rf,ce.findKey=Fz,ce.findLast=Fm,ce.findLastIndex=yu,ce.findLastKey=Dz,ce.floor=fq,ce.forEach=xb,ce.forEachRight=Dm,ce.forIn=$z,ce.forInRight=Uz,ce.forOwn=zz,ce.forOwnRight=Vz,ce.get=y4,ce.gt=uz,ce.gte=lz,ce.has=Wz,ce.hasIn=g4,ce.head=Cm,ce.identity=_o,ce.includes=vb,ce.indexOf=sf,ce.inRange=dV,ce.invoke=Yz,ce.isArguments=sp,ce.isArray=Tn,ce.isArrayBuffer=dz,ce.isArrayLike=wo,ce.isArrayLikeObject=hi,ce.isBoolean=fz,ce.isBuffer=of,ce.isDate=hz,ce.isElement=pz,ce.isEmpty=mz,ce.isEqual=yz,ce.isEqualWith=gz,ce.isError=p4,ce.isFinite=bz,ce.isFunction=Tl,ce.isInteger=Zk,ce.isLength=L2,ce.isMap=Xk,ce.isMatch=xz,ce.isMatchWith=vz,ce.isNaN=wz,ce.isNative=Ez,ce.isNil=Sz,ce.isNull=_z,ce.isNumber=Qk,ce.isObject=qr,ce.isObjectLike=Qr,ce.isPlainObject=wb,ce.isRegExp=m4,ce.isSafeInteger=Tz,ce.isSet=Jk,ce.isString=B2,ce.isSymbol=Xo,ce.isTypedArray=Hm,ce.isUndefined=Az,ce.isWeakMap=kz,ce.isWeakSet=Cz,ce.join=Rm,ce.kebabCase=gV,ce.last=fi,ce.lastIndexOf=Mm,ce.lowerCase=bV,ce.lowerFirst=xV,ce.lt=Iz,ce.lte=Rz,ce.max=hq,ce.maxBy=pq,ce.mean=mq,ce.meanBy=yq,ce.min=gq,ce.minBy=bq,ce.stubArray=_4,ce.stubFalse=S4,ce.stubObject=rq,ce.stubString=iq,ce.stubTrue=sq,ce.multiply=xq,ce.nth=np,ce.noConflict=YV,ce.noop=E4,ce.now=ae,ce.pad=vV,ce.padEnd=wV,ce.padStart=EV,ce.parseInt=_V,ce.random=fV,ce.reduce=ip,ce.reduceRight=f4,ce.repeat=SV,ce.replace=TV,ce.result=nV,ce.round=vq,ce.runInContext=Ae,ce.sample=l,ce.size=T,ce.snakeCase=AV,ce.some=U,ce.sortedIndex=cb,ce.sortedIndexBy=ub,ce.sortedIndexOf=e4,ce.sortedLastIndex=xu,ce.sortedLastIndexBy=S2,ce.sortedLastIndexOf=lb,ce.startCase=CV,ce.startsWith=IV,ce.subtract=wq,ce.sum=Eq,ce.sumBy=_q,ce.template=RV,ce.times=oq,ce.toFinite=Al,ce.toInteger=An,ce.toLength=tC,ce.toLower=MV,ce.toNumber=qa,ce.toSafeInteger=Mz,ce.toString=lr,ce.toUpper=NV,ce.trim=jV,ce.trimEnd=PV,ce.trimStart=OV,ce.truncate=LV,ce.unescape=BV,ce.uniqueId=cq,ce.upperCase=FV,ce.upperFirst=b4,ce.each=xb,ce.eachRight=Dm,ce.first=Cm,w4(ce,(function(){var p={};return go(ce,function(b,R){Kn.call(ce.prototype,R)||(p[R]=b)}),p})(),{chain:!1}),ce.VERSION=r,Li(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){ce[p].placeholder=ce}),Li(["drop","take"],function(p,b){_n.prototype[p]=function(R){R=R===n?1:Zr(An(R),0);var W=this.__filtered__&&!b?new _n(this):this.clone();return W.__filtered__?W.__takeCount__=Bi(R,W.__takeCount__):W.__views__.push({size:Bi(R,j),type:p+(W.__dir__<0?"Right":"")}),W},_n.prototype[p+"Right"]=function(R){return this.reverse()[p](R).reverse()}}),Li(["filter","map","takeWhile"],function(p,b){var R=b+1,W=R==m||R==C;_n.prototype[p]=function(ie){var fe=this.clone();return fe.__iteratees__.push({iteratee:Vt(ie,3),type:R}),fe.__filtered__=fe.__filtered__||W,fe}}),Li(["head","last"],function(p,b){var R="take"+(b?"Right":"");
21_n.prototype[p]=function(){return this[R](1).value()[0]}}),Li(["initial","tail"],function(p,b){var R="drop"+(b?"":"Right");_n.prototype[p]=function(){return this.__filtered__?new _n(this):this[R](1)}}),_n.prototype.compact=function(){return this.filter(_o)},_n.prototype.find=function(p){return this.filter(p).head()},_n.prototype.findLast=function(p){return this.reverse().find(p)},_n.prototype.invokeMap=Sn(function(p,b){return typeof p=="function"?new _n(this):this.map(function(R){return uu(R,p,b)})}),_n.prototype.reject=function(p){return this.filter(Ne(Vt(p)))},_n.prototype.slice=function(p,b){p=An(p);var R=this;return R.__filtered__&&(p>0||b<0)?new _n(R):(p<0?R=R.takeRight(-p):p&&(R=R.drop(p)),b!==n&&(b=An(b),R=b<0?R.dropRight(-b):R.take(b-p)),R)},_n.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},_n.prototype.toArray=function(){return this.take(j)},go(_n.prototype,function(p,b){var R=/^(?:filter|find|map|reject)|While$/.test(b),W=/^(?:head|last)$/.test(b),ie=ce[W?"take"+(b=="last"?"Right":""):b],fe=W||/^find/.test(b);ie&&(ce.prototype[b]=function(){var me=this.__wrapped__,be=W?[1]:arguments,ke=me instanceof _n,Ue=be[0],ze=ke||Tn(me),Ze=function(On){var zn=ie.apply(ce,Qc([On],be));return W&&dt?zn[0]:zn};ze&&R&&typeof Ue=="function"&&Ue.length!=1&&(ke=ze=!1);var dt=this.__chain__,Lt=!!this.__actions__.length,rn=fe&&!dt,In=ke&&!Lt;if(!fe&&ze){me=In?me:new _n(this);var sn=p.apply(me,be);return sn.__actions__.push({func:Pm,args:[Ze],thisArg:n}),new Fi(sn,dt)}return rn&&In?p.apply(this,be):(sn=this.thru(Ze),rn?W?sn.value()[0]:sn.value():sn)})}),Li(["pop","push","shift","sort","splice","unshift"],function(p){var b=mc[p],R=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",W=/^(?:pop|shift)$/.test(p);ce.prototype[p]=function(){var ie=arguments;if(W&&!this.__chain__){var fe=this.value();return b.apply(Tn(fe)?fe:[],ie)}return this[R](function(me){return b.apply(Tn(me)?me:[],ie)})}}),go(_n.prototype,function(p,b){var R=ce[b];if(R){var W=R.name+"";Kn.call(Bd,W)||(Bd[W]=[]),Bd[W].push({name:b,func:R})}}),Bd[Xd(n,L).name]=[{name:"wrapper",func:n}],_n.prototype.clone=K0,_n.prototype.reverse=T1,_n.prototype.value=$d,ce.prototype.at=wu,ce.prototype.chain=Om,ce.prototype.commit=Sl,ce.prototype.next=Lm,ce.prototype.plant=yb,ce.prototype.reverse=c4,ce.prototype.toJSON=ce.prototype.valueOf=ce.prototype.value=gb,ce.prototype.first=ce.prototype.head,gc&&(ce.prototype[gc]=mb),ce}),Md=HE();Na?((Na.exports=Md)._=Md,_h._=Md):Mr._=Md}).call(Hq)})(Gb,Gb.exports)),Gb.exports}var en=Wq();const Gq=va(en),Kq="1.1.0";let wa=class $_ extends Error{constructor(t,n={}){const r=n.cause instanceof $_?n.cause.details:n.cause?.message?n.cause.message:n.details,i=n.cause instanceof $_&&n.cause.docsPath||n.docsPath,s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${Kq}`].join(`
22`);super(s),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}};function ld(e,t){return e.exec(t)?.groups}const BN=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,FN=/^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)?$/,DN=/^\(.+?\).*?$/,EC=/^tuple(?<array>(\[(\d*)\])*)$/;function U_(e){let t=e.type;if(EC.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let i=0;i<n;i++){const s=e.components[i];t+=U_(s),i<n-1&&(t+=", ")}const r=ld(EC,e.type);return t+=`)${r?.array??""}`,U_({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function _b(e){let t="";const n=e.length;for(let r=0;r<n;r++){const i=e[r];t+=U_(i),r!==n-1&&(t+=", ")}return t}function Yq(e){return e.type==="function"?`function ${e.name}
22(${_b(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${_b(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${_b(e.inputs)})`:e.type==="error"?`error ${e.name}(${_b(e.inputs)})`:e.type==="constructor"?`constructor(${_b(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const $N=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Zq(e){return $N.test(e)}function Xq(e){return ld($N,e)}const UN=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Qq(e){return UN.test(e)}function Jq(e){return ld(UN,e)}const zN=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function eH(e){return zN.test(e)}function tH(e){return ld(zN,e)}const VN=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function qT(e){return VN.test(e)}function nH(e){return ld(VN,e)}const qN=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function rH(e){return qN.test(e)}function iH(e){return ld(qN,e)}const HN=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function sH(e){return HN.test(e)}function oH(e){return ld(HN,e)}const aH=/^receive\(\) external payable$/;function cH(e){return aH.test(e)}const _C=new Set(["memory","indexed","storage","calldata"]),uH=new Set(["indexed"]),z_=new Set(["calldata","memory","storage"]);let lH=class extends wa{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}},dH=class extends wa{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}},fH=class extends wa{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}},hH=class extends wa{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},pH=class extends wa{constructor({param:t,name:n}
22){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}},mH=class extends wa{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}},yH=class extends wa{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}},gH=class extends wa{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}},Ag=class extends wa{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},bH=class extends wa{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},xH=class extends wa{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}},vH=class extends wa{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}},wH=class extends wa{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}};function EH(e,t,n){let r="";if(n)for(const i of Object.entries(n)){if(!i)continue;let s="";for(const o of i[1])s+=`[${o.type}${o.name?`:${o.name}`:""}]`;r+=`(${i[0]}{${s}})`}return t?`${t}:${e}${r}`:e}const I4=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function _H(e,t={}){if(eH(e))return SH(e,t);if(Qq(e))return TH(e,t);if(Zq(e))return AH(e,t);if(rH(e))return kH(e,t);if(sH(e))return CH(e);if(cH(e))return{type:"receive",stateMutability:"payable"};throw new bH({signature:e})}function SH(e,t={}){const n=tH(e);if(!n)throw new Ag({signature:e,type:"function"});const r=oa(n.parameters),i=[],s=r.length;for(let a=0;a<s;a++)i.push(td(r[a],{modifiers:z_,structs:t,type:"function"}));const o=[];if(n.returns){const a=oa(n.returns),c=a.length;for(let d=0;d<c;d++)o.push(td(a[d],{modifiers:z_,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:i,outputs:o}}function TH(e,t={}){const n=Jq(e);if(!n)throw new Ag({signature:e,type:"event"});const r=oa(n.parameters),i=[],s=r.length;for(let o=0;o<s;o++)i.push(td(r[o],{modifiers:uH,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:i}}function AH(e,t={}){const n=Xq(e);if(!n)throw new Ag({signature:e,type:"error"});const r=oa(n.parameters),i=[],s=r.length;for(let o=0;o<s;o++)i.push(td(r[o],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:i}}function kH(e,t={}){const n=iH(e);if(!n)throw new Ag({signature:e,type:"constructor"});const r=oa(n.parameters),i=[],s=r.length;for(let o=0;o<s;o++)i.push(td(r[o],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:i}}function CH(e){const t=oH(e);if(!t)throw new Ag({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const IH=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,RH=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,MH=/^u?int$/;
22function td(e,t){const n=EH(e,t?.type,t?.structs);if(I4.has(n))return I4.get(n);const r=DN.test(e),i=ld(r?RH:IH,e);if(!i)throw new hH({param:e});if(i.name&&jH(i.name))throw new pH({param:e,name:i.name});const s=i.name?{name:i.name}:{},o=i.modifier==="indexed"?{indexed:!0}:{},a=t?.structs??{};let c,d={};if(r){c="tuple";const y=oa(i.type),g=[],x=y.length;for(let _=0;_<x;_++)g.push(td(y[_],{structs:a}));d={components:g}}else if(i.type in a)c="tuple",d={components:a[i.type]};else if(MH.test(i.type))c=`${i.type}256`;else if(i.type==="address payable")c="address";else if(c=i.type,t?.type!=="struct"&&!WN(c))throw new dH({type:c});if(i.modifier){if(!t?.modifiers?.has?.(i.modifier))throw new mH({param:e,type:t?.type,modifier:i.modifier});if(z_.has(i.modifier)&&!PH(c,!!i.array))throw new yH({param:e,type:t?.type,modifier:i.modifier})}const h={type:`${c}${i.array??""}`,...s,...o,...d};return I4.set(n,h),h}function oa(e,t=[],n="",r=0){const i=e.trim().length;for(let s=0;s<i;s++){const o=e[s],a=e.slice(s+1);switch(o){case",":return r===0?oa(a,[...t,n.trim()]):oa(a,t,`${n}${o}`,r);case"(":return oa(a,t,`${n}${o}`,r+1);case")":return oa(a,t,`${n}${o}`,r-1);default:return oa(a,t,`${n}${o}`,r)}}if(n==="")return t;if(r!==0)throw new wH({current:n,depth:r});return t.push(n.trim()),t}function WN(e){return e==="address"||e==="bool"||e==="function"||e==="string"||BN.test(e)||FN.test(e)}const NH=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function jH(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||BN.test(e)||FN.test(e)||NH.test(e)}function PH(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function GN(e){const t={},n=e.length;for(let o=0;o<n;o++){const a=e[o];if(!qT(a))continue;const c=nH(a);if(!c)throw new Ag({signature:a,type:"struct"});const d=c.properties.split(";"),h=[],y=d.length;for(let g=0;g<y;g++){const _=d[g].trim();if(!_)continue;const S=td(_,{type:"struct"});h.push(S)}if(!h.length)throw new xH({signature:a});t[c.name]=h}const r={},i=Object.entries(t),s=i.length;for(let o=0;o<s;o++){const[a,c]=i[o];r[a]=KN(c,t)}return r}const OH=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function KN(e,t,n=new Set){const r=[],i=e.length;for(let s=0;s<i;s++){const o=e[s];if(DN.test(o.type))r.push(o);else{const c=ld(OH,o.type);if(!c?.type)throw new gH({abiParameter:o});const{array:d,type:h}=c;if(h in t){if(n.has(h))throw new vH({type:h});r.push({...o,type:`tuple${d??""}`,components:KN(t[h]??[],t,new Set([...n,h]))})}else if(WN(h))r.push(o);else throw new lH({type:h})}}return r}function Cn(e){const t=GN(e),n=[],r=e.length;for(let i=0;i<r;i++){const s=e[i];qT(s)||n.push(_H(s,t))}return n}function To(e){const t=[];if(typeof e=="string"){const n=oa(e),r=n.length;for(let i=0;i<r;i++)t.push(td(n[i],{modifiers:_C}))}else{const n=GN(e),r=e.length;for(let i=0;i<r;i++){const s=e[i];if(qT(s))continue;const o=oa(s),a=o.length;for(let c=0;c<a;c++)t.push(td(o[c],{modifiers:_C,structs:n}
22))}}if(t.length===0)throw new fH({params:e});return t}function cr(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const i=e[n];return typeof i=="function"?i:s=>t(e,s)}function Gy(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new GH(e.type);return`${e.name}(${HT(e.inputs,{includeName:t})})`}function HT(e,{includeName:t=!1}={}){return e?e.map(n=>LH(n,{includeName:t})).join(t?", ":","):""}function LH(e,{includeName:t}){return e.type.startsWith("tuple")?`(${HT(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function nd(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function bi(e){return nd(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const YN="2.38.6";let R4={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${YN}`},Ye=class V_ extends Error{constructor(t,n={}){const r=n.cause instanceof V_?n.cause.details:n.cause?.message?n.cause.message:n.details,i=n.cause instanceof V_&&n.cause.docsPath||n.docsPath,s=R4.getDocsUrl?.({...n,docsPath:i}),o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...r?[`Details: ${r}`]:[],...R4.version?[`Version: ${R4.version}`]:[]].join(`
23`);super(o,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=YN}walk(t){return ZN(this,t)}};function ZN(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?ZN(e.cause,t):t?null:e}class BH extends Ye{constructor({docsPath:t}){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(`
24`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class SC extends Ye{constructor({docsPath:t}){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(`
25`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class FH extends Ye{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
26`),{metaMessages:[`Params: (${HT(n,{includeName:!0})})`,`Data:   ${t} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class mv extends Ye{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class DH extends Ye{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
27`),{name:"AbiEncodingArrayLengthMismatchError"})}}class $H extends Ye{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${bi(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class XN extends Ye{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
28`),{name:"AbiEncodingLengthMismatchError"})}}class c6e extends Ye{constructor(t,{docsPath:n}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
29`),{docsPath:n,name:"AbiErrorInputsNotFoundError"})}}class u6e extends Ye{constructor(t,{docsPath:n}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
30`),{docsPath:n,name:"AbiErrorNotFoundError"})}}class QN extends Ye{constructor(t,{docsPath:n}){super([`Encoded error signature "${t}" 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=${t}.`].join(`
31`),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class G5 extends Ye{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
32`),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class UH extends Ye{constructor(t,{docsPath:n}){super([`Function "${t}" 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(`
33`),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class l6e extends Ye{constructor(t,{docsPath:n}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
34`),{docsPath:n,name:"AbiFunctionSignatureNotFoundError"})}}class zH extends Ye{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${Gy(t.abiItem)}\`, and`,`\`${n.type}\` in \`${Gy(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}let VH=class extends Ye{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}};class qH extends Ye{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
35`),{docsPath:n,name:"InvalidAbiEncodingType"})}}class HH extends Ye{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
36`),{docsPath:n,name:"InvalidAbiDecodingType"})}}let WH=class extends Ye{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
37`),{name:"InvalidArrayError"})}};class GH extends Ye{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
38`),{name:"InvalidDefinitionTypeError"})}}class KH extends Ye{constructor(t){super(`Type "${t}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}let JN=class extends Ye{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},ej=class extends Ye{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}};class TC extends Ye{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}}function ec(e,{dir:t,size:n=32}={}){return typeof e=="string"?qf(e,{dir:t,size:n}):YH(e,{dir:t,size:n})}function qf(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new ej({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function YH(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new ej({size:e.length,targetSize:n,type:"bytes"});
38const r=new Uint8Array(n);for(let i=0;i<n;i++){const s=t==="right";r[s?i:n-i-1]=e[s?i:e.length-i-1]}return r}let tj=class extends Ye{constructor({max:t,min:n,signed:r,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}},ZH=class extends Ye{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}};class XH extends Ye{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let QH=class extends Ye{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function io(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,r=0;for(let i=0;i<n.length-1&&n[t==="left"?i:n.length-i-1].toString()==="0";i++)r++;return n=t==="left"?n.slice(r):n.slice(0,n.length-r),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function sc(e,{size:t}){if(bi(e)>t)throw new QH({givenSize:bi(e),maxSize:t})}function ni(e,t={}){const{signed:n}=t;t.size&&sc(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,s=(1n<<BigInt(i)*8n-1n)-1n;return r<=s?r:r-BigInt(`0x${"f".padStart(i*2,"f")}`)-1n}function JH(e,t={}){let n=e;if(t.size&&(sc(n,{size:t.size}),n=io(n)),io(n)==="0x00")return!1;if(io(n)==="0x01")return!0;throw new XH(n)}function qu(e,t={}){return Number(ni(e,t))}function nj(e,t={}){let n=Oc(e);return t.size&&(sc(n,{size:t.size}),n=io(n,{dir:"right"})),new TextDecoder().decode(n)}const eW=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function eo(e,t={}){return typeof e=="number"||typeof e=="bigint"?ot(e,t):typeof e=="string"?jp(e,t):typeof e=="boolean"?WT(e,t):hs(e,t)}function WT(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(sc(n,{size:t.size}),ec(n,{size:t.size})):n}function hs(e,t={}){let n="";for(let i=0;i<e.length;i++)n+=eW[e[i]];const r=`0x${n}`;return typeof t.size=="number"?(sc(r,{size:t.size}),ec(r,{dir:"right",size:t.size})):r}function ot(e,t={}){const{signed:n,size:r}=t,i=BigInt(e);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&n?-s-1n:0;if(s&&i>s||i<o){const c=typeof e=="bigint"?"n":"";throw new tj({max:s?`${s}${c}`:void 0,min:`${o}${c}`,signed:n,size:r,value:`${e}${c}`})}const a=`0x${(n&&i<0?(1n<<BigInt(r*8))+BigInt(i):i).toString(16)}`;return r?ec(a,{size:r}):a}const tW=new TextEncoder;function jp(e,t={}){const n=tW.encode(e);return hs(n,t)}const nW=new TextEncoder;function GT(e,t={}){return typeof e=="number"||typeof e=="bigint"?iW(e,t):typeof e=="boolean"?rW(e,t):nd(e)?Oc(e,t):rj(e,t)}function rW(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(sc(n,{size:t.size}),ec(n,{size:t.size})):n}const Cl={zero:48,nine:57,A:65,F:70,a:97,f:102};function AC(e){if(e>=Cl.zero&&e<=Cl.nine)return e-Cl.zero;if(e>=Cl.A&&e<=Cl.F)return e-(Cl.A-10);if(e>=Cl.a&&e<=Cl.f)return e-(Cl.a-10)}function Oc(e,t={}){let n=e;t.size&&(sc(n,{size:t.size}),n=ec(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,s=new Uint8Array(i);for(let o=0,a=0;o<i;o++){const c=AC(r.charCodeAt(a++)),d=AC(r.charCodeAt(a++));if(c===void 0||d===void 0)throw new Ye(`Invalid byte sequence ("${r[a-2]}${r[a-1]}" in "${r}").`);s[o]=c*16+d}return s}function iW(e,t){const n=ot(e,t);return Oc(n)}function rj(e,t={}){const n=nW.encode(e);return typeof t.size=="number"?(sc(n,{size:t.size}),ec(n,{dir:"right",size:t.size})):n}const z2=BigInt(2**32-1),kC=BigInt(32);function sW(e,t=!1){return t?{h:Number(e&z2),l:Number(e>>kC&z2)}:{h:Number(e>>kC&z2)|0,l:Number(e&z2)|0}}function oW(e,t=!1){const n=e.length;let r=new Uint32Array(n),i=new Uint32Array(n);for(let s=0;s<n;s++){const{h:o,l:a}=sW(e[s],t);[r[s],i[s]]=[o,a]}return[r,i]}
38const aW=(e,t,n)=>e<<n|t>>>32-n,cW=(e,t,n)=>t<<n|e>>>32-n,uW=(e,t,n)=>t<<n-32|e>>>64-n,lW=(e,t,n)=>e<<n-32|t>>>64-n,Gm=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function dW(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function lx(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Pp(e,...t){if(!dW(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function fW(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");lx(e.outputLen),lx(e.blockLen)}function Ky(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function ij(e,t){Pp(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function hW(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Yy(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function M4(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function _u(e,t){return e<<32-t|e>>>t}const pW=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function mW(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function yW(e){for(let t=0;t<e.length;t++)e[t]=mW(e[t]);return e}const CC=pW?e=>e:yW;function gW(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function X6(e){return typeof e=="string"&&(e=gW(e)),Pp(e),e}function bW(...e){let t=0;for(let r=0;r<e.length;r++){const i=e[r];Pp(i),t+=i.length}const n=new Uint8Array(t);for(let r=0,i=0;r<e.length;r++){const s=e[r];n.set(s,i),i+=s.length}return n}let KT=class{};function sj(e){const t=r=>e().update(X6(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function xW(e=32){if(Gm&&typeof Gm.getRandomValues=="function")return Gm.getRandomValues(new Uint8Array(e));if(Gm&&typeof Gm.randomBytes=="function")return Uint8Array.from(Gm.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const vW=BigInt(0),Sb=BigInt(1),wW=BigInt(2),EW=BigInt(7),_W=BigInt(256),SW=BigInt(113),oj=[],aj=[],cj=[];for(let e=0,t=Sb,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],oj.push(2*(5*r+n)),aj.push((e+1)*(e+2)/2%64);let i=vW;for(let s=0;s<7;s++)t=(t<<Sb^(t>>EW)*SW)%_W,t&wW&&(i^=Sb<<(Sb<<BigInt(s))-Sb);cj.push(i)}const uj=oW(cj,!0),TW=uj[0],AW=uj[1],IC=(e,t,n)=>n>32?uW(e,t,n):aW(e,t,n),RC=(e,t,n)=>n>32?lW(e,t,n):cW(e,t,n);function kW(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,d=n[c],h=n[c+1],y=IC(d,h,1)^n[a],g=RC(d,h,1)^n[a+1];for(let x=0;x<50;x+=10)e[o+x]^=y,e[o+x+1]^=g}let i=e[2],s=e[3];for(let o=0;o<24;o++){const a=aj[o],c=IC(i,s,a),d=RC(i,s,a),h=oj[o];i=e[h],s=e[h+1],e[h]=c,e[h+1]=d}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=e[o+a];for(let a=0;a<10;a++)e[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=TW[r],e[1]^=AW[r]}Yy(n)}class YT extends KT{constructor(t,n,r,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=s,lx(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=hW(this.state)}clone(){return this._cloneInto()}keccak(){CC(this.state32),kW(this.state32,this.rounds),CC(this.state32),this.posOut=0,this.pos=0}update(t){Ky(this),t=X6(t),Pp(t);const{blockLen:n,state:r}=this,i=t.length;for(let s=0;s<i;){const o=Math.min(n-this.pos,i-s);for(let a=0;a<o;a++)r[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:i}=this;t[r]^=n,(n&128)!==0&&r===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){Ky(this,!1),Pp(t),this.finish();const n=this.state,{blockLen:r}=this;for(let i=0,s=t.length;i<s;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,s-i);t.set(n.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return lx(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(ij(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Yy(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:i,rounds:s,enableXOF:o}=this;return t||(t=new YT(n,r,i,o,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=r,t.outputLen=i,t.enableXOF=o,t.destroyed=this.destroyed,t}}
38const CW=(e,t,n)=>sj(()=>new YT(t,e,n)),lj=CW(1,136,256/8);function kg(e,t){const n=t||"hex",r=lj(nd(e,{strict:!1})?GT(e):e);return n==="bytes"?r:eo(r)}const IW=e=>kg(GT(e));function RW(e){return IW(e)}function MW(e){let t=!0,n="",r=0,i="",s=!1;for(let o=0;o<e.length;o++){const a=e[o];if(["(",")",","].includes(a)&&(t=!0),a==="("&&r++,a===")"&&r--,!!t){if(r===0){if(a===" "&&["event","function",""].includes(i))i="";else if(i+=a,a===")"){s=!0;break}continue}if(a===" "){e[o-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}i+=a,n+=a}}if(!s)throw new Ye("Unable to normalize signature.");return i}const NW=e=>{const t=typeof e=="string"?e:Yq(e);return MW(t)};function dj(e){return RW(NW(e))}const jW=dj;let Ps=class extends Ye{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}},Q6=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}};const N4=new Q6(8192);function J6(e,t){if(N4.has(`${e}.${t}`))return N4.get(`${e}.${t}`);const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=kg(rj(n),"bytes"),i=(t?n.substring(`${t}0x`.length):n).split("");for(let o=0;o<40;o+=2)r[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(r[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());const s=`0x${i.join("")}`;return N4.set(`${e}.${t}`,s),s}function Qi(e,t){if(!Sr(e,{strict:!1}))throw new Ps({address:e});return J6(e,t)}const PW=/^0x[a-fA-F0-9]{40}$/,j4=new Q6(8192);function Sr(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(j4.has(r))return j4.get(r);const i=PW.test(e)?e.toLowerCase()===e?!0:n?J6(e)===e:!0:!1;return j4.set(r,i),i}function Hu(e){return typeof e[0]=="string"?Ea(e):OW(e)}function OW(e){let t=0;for(const i of e)t+=i.length;const n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function Ea(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Zy(e,t,n,{strict:r}={}){return nd(e,{strict:!1})?q_(e,t,n,{strict:r}):pj(e,t,n,{strict:r})}function fj(e,t){if(typeof t=="number"&&t>0&&t>bi(e)-1)throw new JN({offset:t,position:"start",size:bi(e)})}function hj(e,t,n){if(typeof t=="number"&&typeof n=="number"&&bi(e)!==n-t)throw new JN({offset:n,position:"end",size:bi(e)})}function pj(e,t,n,{strict:r}={}){fj(e,t);const i=e.slice(t,n);return r&&hj(i,t,n),i}function q_(e,t,n,{strict:r}={}){fj(e,t);const i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&hj(i,t,n),i}const LW=/^(.*)\[([0-9]*)\]$/,BW=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,mj=/^(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 Dl(e,t){if(e.length!==t.length)throw new XN({expectedLength:e.length,givenLength:t.length});const n=FW({params:e,values:t}),r=XT(n);return r.length===0?"0x":r}function FW({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(ZT({param:e[r],value:t[r]}));return n}function ZT({param:e,value:t}){const n=QT(e.type);if(n){const[r,i]=n;return $W(t,{length:r,param:{...e,type:i}})}if(e.type==="tuple")return HW(t,{param:e});if(e.type==="address")return DW(t);if(e.type==="bool")return zW(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const r=e.type.startsWith("int"),[,,i="256"]=mj.exec(e.type)??[];return VW(t,{signed:r,size:Number(i)})}if(e.type.startsWith("bytes"))return UW(t,{param:e});if(e.type==="string")return qW(t);throw new qH(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function XT(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:o,encoded:a}=e[s];o?t+=32:t+=bi(a)}const n=[],r=[];let i=0;for(let s=0;s<e.length;s++){const{dynamic:o,encoded:a}=e[s];o?(n.push(ot(t+i,{size:32})),r.push(a),i+=bi(a)):n.push(a)}return Hu([...n,...r])}function DW(e){if(!Sr(e))throw new Ps({address:e});return{dynamic:!1,encoded:qf(e.toLowerCase())}}function $W(e,{length:t,param:n}){const r=t===null;if(!Array.isArray(e))throw new WH(e);if(!r&&e.length!==t)throw new DH({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let i=!1;const s=[];for(let o=0;o<e.length;o++){const a=ZT({param:n,value:e[o]});a.dynamic&&(i=!0),s.push(a)}if(r||i){const o=XT(s);if(r){const a=ot(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?Hu([a,o]):a}}if(i)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:Hu(s.map(({encoded:o})=>o))}}function UW(e,{param:t}){const[,n]=t.type.split("bytes"),r=bi(e);if(!n){let i=e;return r%32!==0&&(i=qf(i,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:Hu([qf(ot(r,{size:32})),i])}}if(r!==Number.parseInt(n,10))throw new $H({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:qf(e,{dir:"right"})}}function zW(e){if(typeof e!="boolean")throw new Ye(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:qf(WT(e))}}function VW(e,{signed:t,size:n=256}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,i=t?-r-1n:0n;if(e>r||e<i)throw new tj({max:r.toString(),min:i.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:ot(e,{size:32,signed:t})}}function qW(e){const t=jp(e),n=Math.ceil(bi(t)/32),r=[];for(let i=0;i<n;
38i++)r.push(qf(Zy(t,i*32,(i+1)*32),{dir:"right"}));return{dynamic:!0,encoded:Hu([qf(ot(bi(t),{size:32})),...r])}}function HW(e,{param:t}){let n=!1;const r=[];for(let i=0;i<t.components.length;i++){const s=t.components[i],o=Array.isArray(e)?i:s.name,a=ZT({param:s,value:e[o]});r.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?XT(r):Hu(r.map(({encoded:i})=>i))}}function QT(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const JT=e=>Zy(dj(e),0,4);function e9(e){const{abi:t,args:n=[],name:r}=e,i=nd(r,{strict:!1}),s=t.filter(a=>i?a.type==="function"?JT(a)===r:a.type==="event"?jW(a)===r:!1:"name"in a&&a.name===r);if(s.length===0)return;if(s.length===1)return s[0];let o;for(const a of s){if(!("inputs"in a))continue;if(!n||n.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==n.length)continue;if(n.every((d,h)=>{const y="inputs"in a&&a.inputs[h];return y?H_(d,y):!1})){if(o&&"inputs"in o&&o.inputs){const d=yj(a.inputs,o.inputs,n);if(d)throw new zH({abiItem:a,type:d[0]},{abiItem:o,type:d[1]})}o=a}}return o||s[0]}function H_(e,t){const n=typeof e,r=t.type;switch(r){case"address":return Sr(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((i,s)=>H_(Object.values(e)[s],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(i=>H_(i,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function yj(e,t,n){for(const r in e){const i=e[r],s=t[r];if(i.type==="tuple"&&s.type==="tuple"&&"components"in i&&"components"in s)return yj(i.components,s.components,n[r]);const o=[i.type,s.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?Sr(n[r],{strict:!1}):o.includes("address")&&o.includes("bytes")?Sr(n[r],{strict:!1}):!1)return o}}function co(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const MC="/docs/contract/encodeFunctionData";function WW(e){const{abi:t,args:n,functionName:r}=e;let i=t[0];if(r){const s=e9({abi:t,args:n,name:r});if(!s)throw new G5(r,{docsPath:MC});i=s}if(i.type!=="function")throw new G5(void 0,{docsPath:MC});return{abi:[i],functionName:JT(Gy(i))}}function Ms(e){const{args:t}=e,{abi:n,functionName:r}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:WW(e),i=n[0],s=r,o="inputs"in i&&i.inputs?Dl(i.inputs,t??[]):void 0;return Ea([s,o??"0x"])}const GW={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},KW={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},YW={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};let NC=class extends Ye{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},ZW=class extends Ye{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},XW=class extends Ye{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const QW={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new XW({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new ZW({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new NC({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new NC({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function t9(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(QW);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function JW(e,t={}){typeof t.size<"u"&&sc(e,{size:t.size});const n=hs(e,t);return ni(n,t)}function eG(e,t={}){let n=e;if(typeof t.size<"u"&&(sc(n,{size:t.size}),n=io(n)),n.length>1||n[0]>1)throw new ZH(n);return!!n[0]}function Kl(e,t={}){typeof t.size<"u"&&sc(e,{size:t.size});const n=hs(e,t);return qu(n,t)}function tG(e,t={}){let n=e;return typeof t.size<"u"&&(sc(n,{size:t.size}),n=io(n,{dir:"right"})),new TextDecoder().decode(n)}function gj(e,t){const n=typeof t=="string"?Oc(t):t,r=t9(n);if(bi(n)===0&&e.length>0)throw new mv;if(bi(t)&&bi(t)<32)throw new FH({data:typeof t=="string"?t:hs(t),params:e,size:bi(t)});let i=0;const s=[];for(let o=0;o<e.length;++o){const a=e[o];r.setPosition(i);const[c,d]=yy(r,a,{staticPosition:0});i+=d,s.push(c)}return s}function yy(e,t,{staticPosition:n}){const r=QT(t.type);if(r){const[i,s]=r;return rG(e,{...t,type:s},{length:i,staticPosition:n})}if(t.type==="tuple")return aG(e,t,{staticPosition:n});if(t.type==="address")return nG(e);
38if(t.type==="bool")return iG(e);if(t.type.startsWith("bytes"))return sG(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return oG(e,t);if(t.type==="string")return cG(e,{staticPosition:n});throw new HH(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const jC=32,W_=32;function nG(e){const t=e.readBytes(32);return[J6(hs(pj(t,-20))),32]}function rG(e,t,{length:n,staticPosition:r}){if(!n){const o=Kl(e.readBytes(W_)),a=r+o,c=a+jC;e.setPosition(a);const d=Kl(e.readBytes(jC)),h=dx(t);let y=0;const g=[];for(let x=0;x<d;++x){e.setPosition(c+(h?x*32:y));const[_,S]=yy(e,t,{staticPosition:c});y+=S,g.push(_)}return e.setPosition(r+32),[g,32]}if(dx(t)){const o=Kl(e.readBytes(W_)),a=r+o,c=[];for(let d=0;d<n;++d){e.setPosition(a+d*32);const[h]=yy(e,t,{staticPosition:a});c.push(h)}return e.setPosition(r+32),[c,32]}let i=0;const s=[];for(let o=0;o<n;++o){const[a,c]=yy(e,t,{staticPosition:r+i});i+=c,s.push(a)}return[s,i]}function iG(e){return[eG(e.readBytes(32),{size:32}),32]}function sG(e,t,{staticPosition:n}){const[r,i]=t.type.split("bytes");if(!i){const o=Kl(e.readBytes(32));e.setPosition(n+o);const a=Kl(e.readBytes(32));if(a===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(a);return e.setPosition(n+32),[hs(c),32]}return[hs(e.readBytes(Number.parseInt(i,10),32)),32]}function oG(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),i=e.readBytes(32);return[r>48?JW(i,{signed:n}):Kl(i,{signed:n}),32]}function aG(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:o})=>!o),i=r?[]:{};let s=0;if(dx(t)){const o=Kl(e.readBytes(W_)),a=n+o;for(let c=0;c<t.components.length;++c){const d=t.components[c];e.setPosition(a+s);const[h,y]=yy(e,d,{staticPosition:a});s+=y,i[r?c:d?.name]=h}return e.setPosition(n+32),[i,32]}for(let o=0;o<t.components.length;++o){const a=t.components[o],[c,d]=yy(e,a,{staticPosition:n});i[r?o:a?.name]=c,s+=d}return[i,s]}function cG(e,{staticPosition:t}){const n=Kl(e.readBytes(32)),r=t+n;e.setPosition(r);const i=Kl(e.readBytes(32));if(i===0)return e.setPosition(t+32),["",32];const s=e.readBytes(i,32),o=tG(io(s));return e.setPosition(t+32),[o,32]}function dx(e){const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return e.components?.some(dx);const n=QT(e.type);return!!(n&&dx({...e,type:n[1]}))}function uG(e){const{abi:t,data:n}=e,r=Zy(n,0,4);if(r==="0x")throw new mv;const s=[...t||[],KW,YW].find(o=>o.type==="error"&&r===JT(Gy(o)));if(!s)throw new QN(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?gj(s.inputs,Zy(n,4)):void 0,errorName:s.name}}const la=(e,t,n)=>JSON.stringify(e,(r,i)=>typeof i=="bigint"?i.toString():i,n);function bj({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((i,s)=>`${r&&i.name?`${i.name}: `:""}${typeof t[s]=="object"?la(t[s]):t[s]}`).join(", ")})`}const xj={gwei:9,wei:18},lG={ether:-9,wei:9},dG={ether:-18,gwei:-9};function Ns(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[i,s]=[n.slice(0,n.length-t),n.slice(n.length-t)];return s=s.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${s?`.${s}`:""}`}function yv(e,t="wei"){return Ns(e,xj[t])}function jo(e,t="wei"){return Ns(e,lG[t])}class fG extends Ye{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class hG extends Ye{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function PC(e){return e.reduce((t,{slot:n,value:r})=>`${t}        ${n}: ${r}
39`,"")}function pG(e){return e.reduce((t,{address:n,...r})=>{let i=`${t}    ${n}:
40`;return r.nonce&&(i+=`      nonce: ${r.nonce}
41`),r.balance&&(i+=`      balance: ${r.balance}
42`),r.code&&(i+=`      code: ${r.code}
43`),r.state&&(i+=`      state:
44`,i+=PC(r.state)),r.stateDiff&&(i+=`      stateDiff:
45`,i+=PC(r.stateDiff)),i},`  State Override:
46`).slice(0,-1)}
46function gv(e){const t=Object.entries(e).map(([r,i])=>i===void 0||i===!1?null:[r,i]).filter(Boolean),n=t.reduce((r,[i])=>Math.max(r,i.length),0);return t.map(([r,i])=>`  ${`${r}:`.padEnd(n+1)}  ${i}`).join(`
47`)}class mG 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(`
48`),{name:"FeeConflictError"})}}class yG extends Ye{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class gG extends Ye{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",gv(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class bG extends Ye{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class xG extends Ye{constructor(t,{account:n,docsPath:r,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:d,nonce:h,to:y,value:g}){const x=gv({chain:i&&`${i?.name} (id: ${i?.id})`,from:n?.address,to:y,value:typeof g<"u"&&`${yv(g)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${jo(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${jo(c)} gwei`,maxPriorityFeePerGas:typeof d<"u"&&`${jo(d)} gwei`,nonce:h});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",x].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class vj extends Ye{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:i,index:s}){let o="Transaction";r&&s!==void 0&&(o=`Transaction at block time "${r}" at index "${s}"`),t&&s!==void 0&&(o=`Transaction at block hash "${t}" at index "${s}"`),n&&s!==void 0&&(o=`Transaction at block number "${n}" at index "${s}"`),i&&(o=`Transaction with hash "${i}"`),super(`${o} could not be found.`,{name:"TransactionNotFoundError"})}}class wj extends Ye{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class vG extends Ye{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const wG=e=>e,n9=e=>e;class Ej extends Ye{constructor(t,{account:n,docsPath:r,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:d,nonce:h,to:y,value:g,stateOverride:x}){const _=n?co(n):void 0;let S=gv({from:_?.address,to:y,value:typeof g<"u"&&`${yv(g)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${jo(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${jo(c)} gwei`,maxPriorityFeePerGas:typeof d<"u"&&`${jo(d)} gwei`,nonce:h});x&&(S+=`
49${pG(x)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",S].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class r9 extends Ye{constructor(t,{abi:n,args:r,contractAddress:i,docsPath:s,functionName:o,sender:a}){const c=e9({abi:n,args:r,name:o}),d=c?bj({abiItem:c,args:r,includeFunctionName:!1,includeName:!1}):void 0,h=c?Gy(c,{includeName:!0}):void 0,y=gv({address:i&&wG(i),function:h,args:d&&d!=="()"&&`${[...Array(o?.length??0).keys()].map(()=>" ").join("")}${d}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:t,docsPath:s,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],y&&"Contract Call:",y].filter(
49Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=t,this.contractAddress=i,this.functionName=o,this.sender=a}}class EG extends Ye{constructor({abi:t,data:n,functionName:r,message:i}){let s,o,a,c;if(n&&n!=="0x")try{o=uG({abi:t,data:n});const{abiItem:h,errorName:y,args:g}=o;if(y==="Error")c=g[0];else if(y==="Panic"){const[x]=g;c=GW[x]}else{const x=h?Gy(h,{includeName:!0}):void 0,_=h&&g?bj({abiItem:h,args:g,includeFunctionName:!1,includeName:!1}):void 0;a=[x?`Error: ${x}`:"",_&&_!=="()"?`       ${[...Array(y?.length??0).keys()].map(()=>" ").join("")}${_}`:""]}}catch(h){s=h}else i&&(c=i);let d;s instanceof QN&&(d=s.signature,a=[`Unable to decode signature "${d}" 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=${d}.`]),super(c&&c!=="execution reverted"||d?[`The contract function "${r}" reverted with the following ${d?"signature":"reason"}:`,c||d].join(`
50`):`The contract function "${r}" reverted.`,{cause:s,metaMessages:a,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{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.raw=n,this.reason=c,this.signature=d}}class _G extends Ye{constructor({functionName:t}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${t}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class SG extends Ye{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class e3 extends Ye{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}class sx extends Ye{constructor({body:t,cause:n,details:r,headers:i,status:s,url:o}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${n9(o)}`,t&&`Request body: ${la(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=i,this.status=s,this.url=o}}class i9 extends Ye{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${n9(r)}`,`Request body: ${la(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data}}class OC extends Ye{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${n9(n)}`,`Request body: ${la(t)}`],name:"TimeoutError"})}}const TG=-1;class Lo extends Ye{constructor(t,{code:n,docsPath:r,metaMessages:i,name:s,shortMessage:o}
50){super(o,{cause:t,docsPath:r,metaMessages:i||t?.metaMessages,name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||t.name,this.code=t instanceof i9?t.code:n??TG}}let _a=class extends Lo{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}};class fx extends Lo{constructor(t){super(t,{code:fx.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(fx,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class hx extends Lo{constructor(t){super(t,{code:hx.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(hx,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class px extends Lo{constructor(t,{method:n}={}){super(t,{code:px.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(px,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class mx extends Lo{constructor(t){super(t,{code:mx.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
51`)})}}Object.defineProperty(mx,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Op extends Lo{constructor(t){super(t,{code:Op.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Op,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class yx extends Lo{constructor(t){super(t,{code:yx.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
52`)})}}Object.defineProperty(yx,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class gx extends Lo{constructor(t){super(t,{code:gx.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(gx,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Hf extends Lo{constructor(t){super(t,{code:Hf.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(Hf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Xy extends Lo{constructor(t){super(t,{code:Xy.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Xy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class hp extends Lo{constructor(t,{method:n}={}){super(t,{code:hp.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(hp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Qy extends Lo{constructor(t){super(t,{code:Qy.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Qy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class bx extends Lo{constructor(t){super(t,{code:bx.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(bx,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});let Ur=class _j extends _a{constructor(t){super(t,{code:_j.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}};Object.defineProperty(Ur,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class xx extends _a{constructor(t){super(t,{code:xx.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(xx,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class vx extends _a{constructor(t,{method:n}={}
52){super(t,{code:vx.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(vx,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class wx extends _a{constructor(t){super(t,{code:wx.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(wx,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});let G_=class Sj extends _a{constructor(t){super(t,{code:Sj.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}};Object.defineProperty(G_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class rc extends _a{constructor(t){super(t,{code:rc.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(rc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class Jy extends _a{constructor(t){super(t,{code:Jy.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(Jy,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class Ex extends _a{constructor(t){super(t,{code:Ex.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(Ex,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class _x extends _a{constructor(t){super(t,{code:_x.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(_x,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class Sx extends _a{constructor(t){super(t,{code:Sx.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(Sx,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class Tx extends _a{constructor(t){super(t,{code:Tx.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(Tx,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class Ax extends _a{constructor(t){super(t,{code:Ax.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(Ax,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class eg extends _a{constructor(t){super(t,{code:eg.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(eg,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class AG extends Lo{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const kG=3;function tg(e,{abi:t,address:n,args:r,docsPath:i,functionName:s,sender:o}){const a=e instanceof e3?e:e instanceof Ye?e.walk(_=>"data"in _)||e.walk():{},{code:c,data:d,details:h,message:y,shortMessage:g}=a,x=e instanceof mv?new _G({functionName:s}):[kG,Op.code].includes(c)&&(d||h||y||g)?new EG({abi:t,data:typeof d=="object"?d.data:d,functionName:s,message:a instanceof i9?h:g??y}):e;return new r9(x,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:s,sender:o})}function CG(e){const t=kg(`0x${e.substring(4)}`).substring(26);return J6(`0x${t}`)}async function IG({hash:e,signature:t}){const n=nd(e)?e:eo(e),{secp256k1:r}=await hr(async()=>{const{secp256k1:o}=await Promise.resolve().then(()=>mX);return{secp256k1:o}},void 0);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:d,s:h,v:y,yParity:g}=t,x=Number(g??y),_=LC(x);return new r.Signature(ni(d),ni(h)).addRecoveryBit(_)}const o=nd(t)?t:eo(t);if(bi(o)!==65)throw new Error("invalid signature length");const a=qu(`0x${o.slice(130)}`),c=LC(a);return r.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function LC(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Tj({hash:e,signature:t}){return CG(await IG({hash:e,signature:t}))}function rd(e,t="hex"){const n=Aj(e),r=t9(new Uint8Array(n.length));return n.encode(r),t==="hex"?hs(r.bytes):r.bytes}function Aj(e){return Array.isArray(e)?RG(e.map(t=>Aj(t))):MG(e)}function RG(e){const t=e.reduce((i,s)=>i+s.length,0),n=kj(t);return{length:t<=55?1+t:1+n+t,encode(i){t<=55?i.pushByte(192+t):(i.pushByte(247+n),n===1?i.pushUint8(t):n===2?i.pushUint16(t):n===3?i.pushUint24(t):i.pushUint32(t));for(const{encode:s}of e)s(i)}}}function MG(e){const t=typeof e=="string"?Oc(e):e,n=kj(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(i){t.length===1&&t[0]<128?i.pushBytes(t):t.length<=55?(i.pushByte(128+t.length),i.pushBytes(t)):(i.pushByte(183+n),n===1?i.pushUint8(t.length):n===2?i.pushUint16(t.length):n===3?i.pushUint24(t.length):i.pushUint32(t.length),i.pushBytes(t))}}}function kj(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new Ye("Length is too large.")}function NG(e){const{chainId:t,nonce:n,to:r}=e,i=e.contractAddress??e.address,s=kg(Ea(["0x05",rd([t?ot(t):"0x",i,n?ot(n):"0x"])]));return r==="bytes"?Oc(s):s}async function s9(e){const{authorization:t,signature:n}=e;return Tj({hash:NG(t),signature:n??t})}class jG extends Ye{constructor(t,{account:n,docsPath:r,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:d,nonce:h,to:y,value:g}){const x=gv({from:n?.address,to:y,value:typeof g<"u"&&`${yv(g)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${jo(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${jo(c)} gwei`,maxPriorityFeePerGas:typeof d<"u"&&`${jo(d)} gwei`,nonce:h});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",x].filter(
52Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class uy extends Ye{constructor({cause:t,message:n}={}){const r=n?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(uy,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(uy,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Yf extends Ye{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${jo(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(Yf,"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 K_ extends Ye{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${jo(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(K_,"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 Y_ extends Ye{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(Y_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Z_ extends Ye{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
53`),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(Z_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class X_ extends Ye{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(X_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Q_ extends Ye{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
54`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(Q_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class J_ extends Ye{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}
54Object.defineProperty(J_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class eS extends Ye{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(eS,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class tS extends Ye{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(tS,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class ng extends Ye{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${jo(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${jo(r)} gwei`:""}).`].join(`
55`),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(ng,"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 bv extends Ye{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function t3(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof Ye?e.walk(i=>i?.code===uy.code):e;return r instanceof Ye?new uy({cause:e,message:r.details}):uy.nodeMessage.test(n)?new uy({cause:e,message:e.details}):Yf.nodeMessage.test(n)?new Yf({cause:e,maxFeePerGas:t?.maxFeePerGas}):K_.nodeMessage.test(n)?new K_({cause:e,maxFeePerGas:t?.maxFeePerGas}):Y_.nodeMessage.test(n)?new Y_({cause:e,nonce:t?.nonce}):Z_.nodeMessage.test(n)?new Z_({cause:e,nonce:t?.nonce}):X_.nodeMessage.test(n)?new X_({cause:e,nonce:t?.nonce}):Q_.nodeMessage.test(n)?new Q_({cause:e}):J_.nodeMessage.test(n)?new J_({cause:e,gas:t?.gas}):eS.nodeMessage.test(n)?new eS({cause:e,gas:t?.gas}):tS.nodeMessage.test(n)?new tS({cause:e}):ng.nodeMessage.test(n)?new ng({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new bv({cause:e})}function PG(e,{docsPath:t,...n}){const r=(()=>{const i=t3(e,n);return i instanceof bv?e:i})();return new jG(r,{docsPath:t,...n})}function o9(e,{format:t}){if(!t)return{};const n={};function r(s){const o=Object.keys(s);for(const a of o)a in e&&(n[a]=e[a]),s[a]&&typeof s[a]=="object"&&!Array.isArray(s[a])&&r(s[a])}const i=t(e||{});return r(i),n}function n3(e,t){return({exclude:n,format:r})=>({exclude:n,format:(i,s)=>{const o=t(i,s);if(n)for(const a of n)delete o[a];return{...o,...r(i,s)}},type:e})}const OG={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function xv(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=BG(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>hs(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=ot(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=ot(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=ot(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=ot(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=ot(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=ot(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=OG[e.type]),typeof e.value<"u"&&(n.value=ot(e.value)),n}const LG=n3("transactionRequest",xv);function BG(e){return e.map(t=>({address:t.address,r:t.r?ot(BigInt(t.r)):t.r,s:t.s?ot(BigInt(t.s)):t.s,chainId:ot(t.chainId),nonce:ot(t.nonce),...typeof t.yParity<"u"?{yParity:ot(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:ot(t.v)}:{}}))}function BC(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new TC({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new TC({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}
55function FG(e){const{balance:t,nonce:n,state:r,stateDiff:i,code:s}=e,o={};if(s!==void 0&&(o.code=s),t!==void 0&&(o.balance=ot(t)),n!==void 0&&(o.nonce=ot(n)),r!==void 0&&(o.state=BC(r)),i!==void 0){if(o.state)throw new hG;o.stateDiff=BC(i)}return o}function a9(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!Sr(n,{strict:!1}))throw new Ps({address:n});if(t[n])throw new fG({address:n});t[n]=FG(r)}return t}const T6e=2n**32n-1n,vv=2n**256n-1n;function wv(e){const{account:t,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:i,to:s}=e,o=t?co(t):void 0;if(o&&!Sr(o.address))throw new Ps({address:o.address});if(s&&!Sr(s))throw new Ps({address:s});if(typeof n<"u"&&(typeof r<"u"||typeof i<"u"))throw new mG;if(r&&r>vv)throw new Yf({maxFeePerGas:r});if(i&&r&&i>r)throw new ng({maxFeePerGas:r,maxPriorityFeePerGas:i})}class DG extends Ye{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class c9 extends Ye{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class $G extends Ye{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${jo(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Cj extends Ye{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const Ij={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Ev(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?qu(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?qu(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Ij[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=UG(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const Rj=n3("transaction",Ev);function UG(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function u9(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:Ev(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Mj=n3("block",u9);async function Du(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:i}={}){const s=i??!1,o=n!==void 0?ot(n):void 0;let a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,s]},{dedupe:!0}):a=await e.request({method:"eth_getBlockByNumber",params:[o||r,s]},{dedupe:!!o}),!a)throw new Cj({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||u9)(a,"getBlock")}async function Nj(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function zG(e,t){const{block:n,chain:r=e.chain,request:i}=t||{};try{const s=r?.fees?.maxPriorityFeePerGas??r?.fees?.defaultPriorityFee;if(typeof s=="function"){const a=n||await cr(e,Du,"getBlock")({}),c=await s({block:a,client:e,request:i});if(c===null)throw new Error;return c}if(typeof s<"u")return s;const o=await e.request({method:"eth_maxPriorityFeePerGas"});return ni(o)}catch{const[s,o]=await Promise.all([n?Promise.resolve(n):cr(e,Du,"getBlock")({}),cr(e,Nj,"getGasPrice")({})]);if(typeof s.baseFeePerGas!="bigint")throw new c9;const a=o-s.baseFeePerGas;return a<0n?0n:a}}async function FC(e,t){const{block:n,chain:r=e.chain,request:i,type:s="eip1559"}=t||{},o=await(async()=>typeof r?.fees?.baseFeeMultiplier=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:i}):r?.fees?.baseFeeMultiplier??1.2)();if(o<1)throw new DG;const c=10**(o.toString().split(".")[1]?.length??0),d=g=>g*BigInt(Math.ceil(o*c))/BigInt(c),h=n||await cr(e,Du,"getBlock")({});if(typeof r?.fees?.estimateFeesPerGas=="function"){const g=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:d,request:i,type:s});if(g!==null)return g}if(s==="eip1559"){if(typeof h.baseFeePerGas!="bigint")throw new c9;const g=typeof i?.maxPriorityFeePerGas=="bigint"?i.maxPriorityFeePerGas:await zG(e,{block:h,chain:r,request:i}),x=d(h.baseFeePerGas);return{maxFeePerGas:i?.maxFeePerGas??x+g,maxPriorityFeePerGas:g}}return{gasPrice:i?.gasPrice??d(await cr(e,Nj,"getGasPrice")({}))}}async function VG(e,{address:t,blockTag:n="latest",blockNumber:r}){const i=await e.request({method:"eth_getTransactionCount",params:[t,typeof r=="bigint"?ot(r):n]},{dedupe:!!r});return qu(i)}function l9(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(s=>Oc(s)):e.blobs,i=[];for(const s of r)i.push(Uint8Array.from(t.blobToKzgCommitment(s)));return n==="bytes"?i:i.map(s=>hs(s))}function d9(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(o=>Oc(o)):e.blobs,i=typeof e.commitments[0]=="string"?e.commitments.map(o=>Oc(o)):e.commitments,s=[];for(let o=0;o<r.length;o++){const a=r[o],c=i[o];s.push(Uint8Array.from(t.computeBlobKzgProof(a,c)))}return n==="bytes"?s:s.map(o=>hs(o))}function qG(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(n>>i&s),a=Number(n&s),c=r?4:0,d=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+d,a,r)}function HG(e,t,n){return e&t^~e&n}function WG(e,t,n){return e&t^e&n^t&n}let GG=class extends KT{constructor(t,n,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(t),this.view=M4(this.buffer)}update(t){Ky(this),t=X6(t),Pp(t);const{view:n,buffer:r,blockLen:i}=this,s=t.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=M4(t);for(;i<=s-o;o+=i)this.process(c,o);continue}r.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ky(this),ij(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:s}=this;let{pos:o}=this;n[o++]=128,Yy(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(r,0),o=0);for(let y=o;y<i;y++)n[y]=0;qG(r,i-8,BigInt(this.length*8),s),this.process(r,0);const a=M4(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=c/4,h=this.get();if(d>h.length)throw new Error("_sha2: outputLen bigger than state");for(let y=0;y<d;y++)a.setUint32(4*y,h[y],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:s,destroyed:o,pos:a}=this;return t.destroyed=o,t.finished=s,t.length=i,t.pos=a,i%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}};const af=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),KG=Uint32Array.from([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,2756
55734187,3204031479,3329325298]),cf=new Uint32Array(64);let YG=class extends GG{constructor(t=32){super(64,t,8,!1),this.A=af[0]|0,this.B=af[1]|0,this.C=af[2]|0,this.D=af[3]|0,this.E=af[4]|0,this.F=af[5]|0,this.G=af[6]|0,this.H=af[7]|0}get(){const{A:t,B:n,C:r,D:i,E:s,F:o,G:a,H:c}=this;return[t,n,r,i,s,o,a,c]}set(t,n,r,i,s,o,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(t,n){for(let y=0;y<16;y++,n+=4)cf[y]=t.getUint32(n,!1);for(let y=16;y<64;y++){const g=cf[y-15],x=cf[y-2],_=_u(g,7)^_u(g,18)^g>>>3,S=_u(x,17)^_u(x,19)^x>>>10;cf[y]=S+cf[y-7]+_+cf[y-16]|0}let{A:r,B:i,C:s,D:o,E:a,F:c,G:d,H:h}=this;for(let y=0;y<64;y++){const g=_u(a,6)^_u(a,11)^_u(a,25),x=h+g+HG(a,c,d)+KG[y]+cf[y]|0,S=(_u(r,2)^_u(r,13)^_u(r,22))+WG(r,i,s)|0;h=d,d=c,c=a,a=o+x|0,o=s,s=i,i=r,r=x+S|0}r=r+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,i,s,o,a,c,d,h)}roundClean(){Yy(cf)}destroy(){this.set(0,0,0,0,0,0,0,0),Yy(this.buffer)}};const jj=sj(()=>new YG),ZG=jj;function XG(e,t){return ZG(nd(e,{strict:!1})?GT(e):e)}function QG(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),i=XG(t);return i.set([n],0),r==="bytes"?i:hs(i)}function Pj(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),i=[];for(const s of t)i.push(QG({commitment:s,to:r,version:n}));return i}const DC=6,Oj=32,f9=4096,Lj=Oj*f9,$C=Lj*DC-1-1*f9*DC,Bj=1;class JG extends Ye{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class Fj extends Ye{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class eK extends Ye{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class tK extends Ye{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${Bj}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function nK(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Oc(e.data):e.data,r=bi(n);if(!r)throw new Fj;if(r>$C)throw new JG({maxSize:$C,size:r});const i=[];let s=!0,o=0;for(;s;){const a=t9(new Uint8Array(Lj));let c=0;for(;c<f9;){const d=n.slice(o,o+(Oj-1));if(a.pushByte(0),a.pushBytes(d),d.length<31){a.pushByte(128),s=!1;break}c++,o+=31}i.push(a)}return t==="bytes"?i.map(a=>a.bytes):i.map(a=>hs(a.bytes))}function Dj(e){const{data:t,kzg:n,to:r}=e,i=e.blobs??nK({data:t,to:r}),s=e.commitments??l9({blobs:i,kzg:n,to:r}),o=e.proofs??d9({blobs:i,commitments:s,kzg:n,to:r}),a=[];for(let c=0;c<i.length;c++)a.push({blob:i[c],commitment:s[c],proof:o[c]});return a}function $j(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new gG({transaction:e})}async function Uj(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return qu(t)}const zj=["blobVersionedHashes","chainId","fees","gas","nonce","type"],UC=new Map;async function Vj(e,t){const{account:n=e.account,blobs:r,chain:i,gas:s,kzg:o,nonce:a,nonceManager:c,parameters:d=zj,type:h}=t,y=n&&co(n),g={...t,...y?{from:y?.address}:{}};let x;async function _(){return x||(x=await cr(e,Du,"getBlock")({blockTag:"latest"}),x)}let S;async function I(){return S||(i?i.id:typeof t.chainId<"u"?t.chainId:(S=await cr(e,Uj,"getChainId")({}),S))}if(d.includes("nonce")&&typeof a>"u"&&y)if(c){const L=await I();g.nonce=await c.consume({address:y.address,chainId:L,client:e})}else g.nonce=await cr(e,VG,"getTransactionCount")({address:y.address,blockTag:"pending"});if((d.includes("blobVersionedHashes")||d.includes("sidecars"))&&r&&o){const L=l9({blobs:r,kzg:o});if(d.includes("blobVersionedHashes")){const D=Pj({commitments:L,to:"hex"});g.blobVersionedHashes=D}if(d.includes("sidecars")){const D=d9({blobs:r,commitments:L,kzg:o}),F=Dj({blobs:r,commitments:L,proofs:D,to:"hex"});g.sidecars=F}}if(d.includes("chainId")&&(g.chainId=await I()),(d.includes("fees")||d.includes("type"))&&typeof h>"u")try{g.type=$j(g)}catch{let L=UC.get(e.uid);typeof L>"u"&&(L=typeof(await _())?.baseFeePerGas=="bigint",UC.set(e.uid,L)),g.type=L?"eip1559":"legacy"}if(d.includes("fees"))if(g.type!=="legacy"&&g.type!=="eip2930"){if(typeof g.maxFeePerGas>"u"||typeof g.maxPriorityFeePerGas>"u"){const L=await _(),{maxFeePerGas:D,maxPriorityFeePerGas:F}=await FC(e,{block:L,chain:i,request:g});if(typeof t.maxPriorityFeePerGas>"u"&&t.maxFeePerGas&&t.maxFeePerGas<F)throw new $G({maxPriorityFeePerGas:F});g.maxPriorityFeePerGas=F,g.maxFeePerGas=D}}else{if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")throw new c9;if(typeof t.gasPrice>"u"){const L=await _(),{gasPrice:D}=await FC(e,{block:L,chain:i,request:g,type:"legacy"});g.gasPrice=D}}return d.includes("gas")&&typeof s>"u"&&(g.gas=await cr(e,rK,"estimateGas")({...g,account:y,prepare:y?.type==="local"?[]:["blobVersionedHashes"]})),wv(g),delete g.parameters,g}async function rK(e,t){const{account:n=e.account,prepare:r=!0}=t,i=n?co(n):void 0,s=(()=>
55{if(Array.isArray(r))return r;if(i?.type!=="local")return["blobVersionedHashes"]})();try{const{accessList:o,authorizationList:a,blobs:c,blobVersionedHashes:d,blockNumber:h,blockTag:y,data:g,gas:x,gasPrice:_,maxFeePerBlobGas:S,maxFeePerGas:I,maxPriorityFeePerGas:L,nonce:D,value:F,stateOverride:$,...z}=r?await Vj(e,{...t,parameters:s}):t,K=(typeof h=="bigint"?ot(h):void 0)||y,te=a9($),Q=await(async()=>{if(z.to)return z.to;if(a&&a.length>0)return await s9({authorization:a[0]}).catch(()=>{throw new Ye("`to` is required. Could not infer from `authorizationList`")})})();wv(t);const ee=e.chain?.formatters?.transactionRequest?.format,J=(ee||xv)({...o9(z,{format:ee}),account:i,accessList:o,authorizationList:a,blobs:c,blobVersionedHashes:d,data:g,gas:x,gasPrice:_,maxFeePerBlobGas:S,maxFeePerGas:I,maxPriorityFeePerGas:L,nonce:D,to:Q,value:F},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:te?[J,K??e.experimental_blockTag??"latest",te]:K?[J,K]:[J]}))}catch(o){throw PG(o,{...t,account:i,chain:e.chain})}}function K5(e,t){if(!Sr(e,{strict:!1}))throw new Ps({address:e});if(!Sr(t,{strict:!1}))throw new Ps({address:t});return e.toLowerCase()===t.toLowerCase()}function qj(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const P4="/docs/contract/decodeFunctionResult";function _v(e){const{abi:t,args:n,functionName:r,data:i}=e;let s=t[0];if(r){const a=e9({abi:t,args:n,name:r});if(!a)throw new G5(r,{docsPath:P4});s=a}if(s.type!=="function")throw new G5(void 0,{docsPath:P4});if(!s.outputs)throw new UH(s.name,{docsPath:P4});const o=gj(s.outputs,i);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}const h9=BigInt(0),nS=BigInt(1);function Sv(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function p9(e){if(!Sv(e))throw new Error("Uint8Array expected")}function kx(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function V2(e){const t=e.toString(16);return t.length&1?"0"+t:t}function Hj(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?h9:BigInt("0x"+e)}const Wj=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",iK=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Cx(e){if(p9(e),Wj)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=iK[e[n]];return t}const Il={_0:48,_9:57,A:65,F:70,a:97,f:102};function zC(e){if(e>=Il._0&&e<=Il._9)return e-Il._0;if(e>=Il.A&&e<=Il.F)return e-(Il.A-10);if(e>=Il.a&&e<=Il.f)return e-(Il.a-10)}function Y5(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Wj)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,s=0;i<n;i++,s+=2){const o=zC(e.charCodeAt(s)),a=zC(e.charCodeAt(s+1));if(o===void 0||a===void 0){const c=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}r[i]=o*16+a}return r}function Ip(e){return Hj(Cx(e))}function Gj(e){return p9(e),Hj(Cx(Uint8Array.from(e).reverse()))}function Tv(e,t){return Y5(e.toString(16).padStart(t*2,"0"))}function Kj(e,t){return Tv(e,t).reverse()}function Ga(e,t,n){let r;if(typeof t=="string")try{r=Y5(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(Sv(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const i=r.length;if(typeof n=="number"&&i!==n)throw new Error(e+" of length "+n+" expected, got "+i);return r}function Z5(...e){let t=0;for(let r=0;r<e.length;r++){const i=e[r];p9(i),t+=i.length}const n=new Uint8Array(t);for(let r=0,i=0;r<e.length;r++){const s=e[r];n.set(s,i),i+=s.length}return n}const O4=e=>typeof e=="bigint"&&h9<=e;function m9(e,t,n){return O4(e)&&O4(t)&&O4(n)&&t<=e&&e<n}function gy(e,t,n,r){if(!m9(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function sK(e){let t;for(t=0;e>h9;e>>=nS,t+=1);return t}const r3=e=>(nS<<BigInt(e))-nS,L4=e=>new Uint8Array(e),VC=e=>Uint8Array.from(e);function oK(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=L4(e),i=L4(e),s=0;const o=()=>{r.fill(1),i.fill(0),s=0},a=(...y)=>n(i,r,...y),c=(y=L4(0))=>
55{i=a(VC([0]),y),r=a(),y.length!==0&&(i=a(VC([1]),y),r=a())},d=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let y=0;const g=[];for(;y<t;){r=a();const x=r.slice();g.push(x),y+=r.length}return Z5(...g)};return(y,g)=>{o(),c(y);let x;for(;!(x=g(d()));)c();return o(),x}}const aK={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Sv(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function i3(e,t,n={}){const r=(i,s,o)=>{const a=aK[s];if(typeof a!="function")throw new Error("invalid validator function");const c=e[i];if(!(o&&c===void 0)&&!a(c,e))throw new Error("param "+String(i)+" is invalid. Expected "+s+", got "+c)};for(const[i,s]of Object.entries(t))r(i,s,!1);for(const[i,s]of Object.entries(n))r(i,s,!0);return e}function qC(e){const t=new WeakMap;return(n,...r)=>{const i=t.get(n);if(i!==void 0)return i;const s=e(n,...r);return t.set(n,s),s}}const cK="0.1.1";function uK(){return cK}let Hn=class rS extends Error{constructor(t,n={}){const r=(()=>{if(n.cause instanceof rS){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:n.cause?.message?n.cause.message:n.details})(),i=n.cause instanceof rS&&n.cause.docsPath||n.docsPath,o=`https://oxlib.sh${i??""}`,a=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||i?["",r?`Details: ${r}`:void 0,i?`See: ${o}`:void 0]:[]].filter(c=>typeof c=="string").join(`
56`);super(a,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{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,"shortMessage",{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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${uK()}`}),this.cause=n.cause,this.details=r,this.docs=o,this.docsPath=i,this.shortMessage=t}walk(t){return Yj(this,t)}};function Yj(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?Yj(e.cause,t):t?null:e}function Av(e,t){if(ly(e)>t)throw new AK({givenSize:ly(e),maxSize:t})}const Rl={zero:48,nine:57,A:65,F:70,a:97,f:102};function HC(e){if(e>=Rl.zero&&e<=Rl.nine)return e-Rl.zero;if(e>=Rl.A&&e<=Rl.F)return e-(Rl.A-10);if(e>=Rl.a&&e<=Rl.f)return e-(Rl.a-10)}function lK(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new kK({size:e.length,targetSize:r,type:"Bytes"});const i=new Uint8Array(r);for(let s=0;s<r;s++){const o=n==="right";i[o?s:r-s-1]=e[o?s:e.length-s-1]}return i}function Zj(e,t={}){const{dir:n="left"}=t;let r=e,i=0;for(let s=0;s<r.length-1&&r[n==="left"?s:r.length-s-1].toString()==="0";s++)i++;return r=n==="left"?r.slice(i):r.slice(0,r.length-i),r}function s3(e,t){if(ha(e)>t)throw new jK({givenSize:ha(e),maxSize:t})}function dK(e,t){if(typeof t=="number"&&t>0&&t>ha(e)-1)throw new sP({offset:t,position:"start",size:ha(e)})}function fK(e,t,n){if(typeof t=="number"&&typeof n=="number"&&ha(e)!==n-t)throw new sP({offset:n,position:"end",size:ha(e)})}function Xj(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const i=e.replace("0x","");if(i.length>r*2)throw new PK({size:Math.ceil(i.length/2),targetSize:r,type:"Hex"});return`0x${i[n==="right"?"padEnd":"padStart"](r*2,"0")}`}const hK="#__bigint";function Qj(e,t,n){return JSON.stringify(e,(r,i)=>typeof i=="bigint"?i.toString()+hK:i,n)}const pK=new TextDecoder,mK=new TextEncoder;function yK(e){return e instanceof Uint8Array?e:typeof e=="string"?Jj(e):gK(e)}function gK(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function Jj(e,t={}){const{size:n}=t;let r=e;n&&(s3(e,n),r=Bp(e,n));let i=r.slice(2);i.length%2&&(i=`0${i}`);const s=i.length/2,o=new Uint8Array(s);for(let a=0,c=0;a<s;a++){const d=HC(i.charCodeAt(c++)),h=HC(i.charCodeAt(c++));if(d===void 0||h===void 0)throw new Hn(`Invalid byte sequence ("${i[c-2]}${i[c-1]}" in "${i}").`);o[a]=d*16+h}return o}function bK(e,t={}){const{size:n}=t,r=mK.encode(e);return typeof n=="number"?(Av(r,n),xK(r,n)):r}function xK(e,t){return lK(e,{dir:"right",size:t})}function ly(e){return e.length}function vK(e,t,n,r={}){const{strict:i}=r;return e.slice(t,n)}function wK(e,t={}){const{size:n}=t;typeof n<"u"&&Av(e,n);const r=Bc(e,t);return nP(r,t)}function EK(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(Av(r,n),r=eP(r)),r.length>1||r[0]>1)throw new TK(r);return!!r[0]}function Yl(e,t={}){const{size:n}=t;typeof n<"u"&&Av(e,n);const r=Bc(e,t);return rP(r,t)}function _K(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(Av(r,n),r=SK(r)),pK.decode(r)}function eP(e){return Zj(e,{dir:"left"})}function SK(e){return Zj(e,{dir:"right"})}class TK extends Hn{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["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:"Bytes.InvalidBytesBooleanError"})}}let AK=class extends Hn{constructor({givenSize:t,maxSize:n}
56){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},kK=class extends Hn{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const CK=new TextEncoder,IK=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function RK(e,t={}){const{strict:n=!1}=t;if(!e)throw new WC(e);if(typeof e!="string")throw new WC(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new GC(e);if(!e.startsWith("0x"))throw new GC(e)}function Lc(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function MK(e){return e instanceof Uint8Array?Bc(e):Array.isArray(e)?Bc(new Uint8Array(e)):e}function tP(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(s3(n,t.size),Lp(n,t.size)):n}function Bc(e,t={}){let n="";for(let i=0;i<e.length;i++)n+=IK[e[i]];const r=`0x${n}`;return typeof t.size=="number"?(s3(r,t.size),Bp(r,t.size)):r}function to(e,t={}){const{signed:n,size:r}=t,i=BigInt(e);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&n?-s-1n:0;if(s&&i>s||i<o){const d=typeof e=="bigint"?"n":"";throw new iP({max:s?`${s}${d}`:void 0,min:`${o}${d}`,signed:n,size:r,value:`${e}${d}`})}const c=`0x${(n&&i<0?(1n<<BigInt(r*8))+BigInt(i):i).toString(16)}`;return r?Lp(c,r):c}function y9(e,t={}){return Bc(CK.encode(e),t)}function Lp(e,t){return Xj(e,{dir:"left",size:t})}function Bp(e,t){return Xj(e,{dir:"right",size:t})}function $u(e,t,n,r={}){const{strict:i}=r;dK(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return i&&fK(s,t,n),s}function ha(e){return Math.ceil((e.length-2)/2)}function nP(e,t={}){const{signed:n}=t;t.size&&s3(e,t.size);const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,s=(1n<<BigInt(i)*8n)-1n,o=s>>1n;return r<=o?r:r-s-1n}function rP(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:nP(e,t))}function NK(e,t={}){const{strict:n=!1}=t;try{return RK(e,{strict:n}),!0}catch{return!1}}class iP extends Hn{constructor({max:t,min:n,signed:r,size:i,value:s}){super(`Number \`${s}\` is not in safe${i?` ${i*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class WC extends Hn{constructor(t){super(`Value \`${typeof t=="object"?Qj(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class GC extends Hn{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class jK extends Hn{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class sP extends Hn{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class PK extends Hn{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function OK(e){return{address:e.address,amount:to(e.amount),index:to(e.index),validatorIndex:to(e.validatorIndex)}}function oP(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:to(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:to(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient}
vendor: 4,929 bytes, line 56
56,...typeof e.gasLimit=="bigint"&&{gasLimit:to(e.gasLimit)},...typeof e.number=="bigint"&&{number:to(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:to(e.prevRandao)},...typeof e.time=="bigint"&&{time:to(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(OK)}}}const X5=[{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"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],R6e=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],aP=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],KC=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],rg=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],LK="0x82ad56cb",cP="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",BK="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de82602083
560160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",FK="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848
56603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",g9="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9
56150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";class iS extends Ye{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class DK extends Ye{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID:  ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class $K 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(`
57`),{name:"ChainNotFoundError"})}}class uP extends Ye{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class kv extends Ye{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}
57" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}const B4="/docs/contract/encodeDeployData";function b9(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const i=t.find(o=>"type"in o&&o.type==="constructor");if(!i)throw new BH({docsPath:B4});if(!("inputs"in i))throw new SC({docsPath:B4});if(!i.inputs||i.inputs.length===0)throw new SC({docsPath:B4});const s=Dl(i.inputs,n);return Ea([r,s])}function lP({blockNumber:e,chain:t,contract:n}){const r=t?.contracts?.[n];if(!r)throw new iS({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new iS({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function UK(e,{docsPath:t,...n}){const r=(()=>{const i=t3(e,n);return i instanceof bv?e:i})();return new Ej(r,{docsPath:t,...n})}function x9(){let e=()=>{},t=()=>{};return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}const F4=new Map;function dP({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:i}){const s=async()=>{const h=c();o();const y=h.map(({args:g})=>g);y.length!==0&&e(y).then(g=>{i&&Array.isArray(g)&&g.sort(i);for(let x=0;x<h.length;x++){const{resolve:_}=h[x];_?.([g[x],g])}}).catch(g=>{for(let x=0;x<h.length;x++){const{reject:_}=h[x];_?.(g)}})},o=()=>F4.delete(t),a=()=>c().map(({args:h})=>h),c=()=>F4.get(t)||[],d=h=>F4.set(t,[...c(),h]);return{flush:o,async schedule(h){const{promise:y,resolve:g,reject:x}=x9();return n?.([...a(),h])&&s(),c().length>0?(d({args:h,resolve:g,reject:x}),y):(d({args:h,resolve:g,reject:x}),setTimeout(s,r),y)}}}async function o3(e,t){const{account:n=e.account,authorizationList:r,batch:i=!!e.batch?.multicall,blockNumber:s,blockTag:o=e.experimental_blockTag??"latest",accessList:a,blobs:c,blockOverrides:d,code:h,data:y,factory:g,factoryData:x,gas:_,gasPrice:S,maxFeePerBlobGas:I,maxFeePerGas:L,maxPriorityFeePerGas:D,nonce:F,to:$,value:z,stateOverride:V,...K}=t,te=n?co(n):void 0;if(h&&(g||x))throw new Ye("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(h&&$)throw new Ye("Cannot provide both `code` & `to` as parameters.");const Q=h&&y,ee=g&&x&&$&&y,ne=Q||ee,J=Q?fP({code:h,data:y}):ee?qK({data:y,factory:g,factoryData:x,to:$}):y;try{wv(t);const m=(typeof s=="bigint"?ot(s):void 0)||o,E=d?oP(d):void 0,C=a9(V),N=e.chain?.formatters?.transactionRequest?.format,B=(N||xv)({...o9(K,{format:N}),accessList:a,account:te,authorizationList:r,blobs:c,data:J,gas:_,gasPrice:S,maxFeePerBlobGas:I,maxFeePerGas:L,maxPriorityFeePerGas:D,nonce:F,to:ne?void 0:$,value:z},"call");if(i&&zK({request:B})&&!C&&!E)try{return await VK(e,{...B,blockNumber:s,blockTag:o})}catch(v){if(!(v instanceof uP)&&!(v instanceof iS))throw v}const O=(()=>{const v=[B,m];return C&&E?[...v,C,E]:C?[...v,C]:E?[...v,{},E]:v})(),j=await e.request({method:"eth_call",params:O});return j==="0x"?{data:void 0}:{data:j}}catch(M){const m=HK(M),{offchainLookup:E,offchainLookupSignature:C}=await hr(async()=>{const{offchainLookup:N,offchainLookupSignature:P}=await import("./ccip-8UJbZjyT.js");return{offchainLookup:N,offchainLookupSignature:P}},[]);if(e.ccipRead!==!1&&m?.slice(0,10)===C&&$)return{data:await E(e,{data:m,to:$})};throw ne&&m?.slice(0,10)==="0x101bb98d"?new SG({factory:g}):UK(M,{...t,account:te,chain:e.chain})}}function zK({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(LK)||!n||Object.values(r).filter(i=>typeof i<"u").length>0)}async function VK(e,t){const{batchSize:n=1024,deployless:r=!1,wait:i=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockNumber:s,blockTag:o=e.experimental_blockTag??"latest",data:a,to:c}=t,d=(()=>
57{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return lP({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new uP})(),y=(typeof s=="bigint"?ot(s):void 0)||o,{schedule:g}=dP({id:`${e.uid}.${y}`,wait:i,shouldSplitBatch(S){return S.reduce((L,{data:D})=>L+(D.length-2),0)>n*2},fn:async S=>{const I=S.map(F=>({allowFailure:!0,callData:F.data,target:F.to})),L=Ms({abi:X5,args:[I],functionName:"aggregate3"}),D=await e.request({method:"eth_call",params:[{...d===null?{data:fP({code:g9,data:L})}:{to:d,data:L}},y]});return _v({abi:X5,args:[I],functionName:"aggregate3",data:D||"0x"})}}),[{returnData:x,success:_}]=await g({data:a,to:c});if(!_)throw new e3({data:x});return x==="0x"?{data:void 0}:{data:x}}function fP(e){const{code:t,data:n}=e;return b9({abi:Cn(["constructor(bytes, bytes)"]),bytecode:cP,args:[t,n]})}function qK(e){const{data:t,factory:n,factoryData:r,to:i}=e;return b9({abi:Cn(["constructor(address, bytes, address, bytes)"]),bytecode:BK,args:[i,t,n,r]})}function HK(e){if(!(e instanceof Ye))return;const t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}async function a3(e,t){const{abi:n,address:r,args:i,functionName:s,...o}=t,a=Ms({abi:n,args:i,functionName:s});try{const{data:c}=await cr(e,o3,"call")({...o,data:a,to:r});return _v({abi:n,args:i,functionName:s,data:c||"0x"})}catch(c){throw tg(c,{abi:n,address:r,args:i,docsPath:"/docs/contract/readContract",functionName:s})}}async function WK(e,t){const{abi:n,address:r,args:i,dataSuffix:s,functionName:o,...a}=t,c=a.account?co(a.account):e.account,d=Ms({abi:n,args:i,functionName:o});try{const{data:h}=await cr(e,o3,"call")({batch:!1,data:`${d}${s?s.replace("0x",""):""}`,to:r,...a,account:c}),y=_v({abi:n,args:i,functionName:o,data:h||"0x"}),g=n.filter(x=>"name"in x&&x.name===t.functionName);return{result:y,request:{abi:g,address:r,args:i,dataSuffix:s,functionName:o,...a,account:c}}}catch(h){throw tg(h,{abi:n,address:r,args:i,docsPath:"/docs/contract/simulateContract",functionName:o,sender:c?.address})}}const D4=new Map,YC=new Map;let GK=0;function Ix(e,t,n){const r=++GK,i=()=>D4.get(e)||[],s=()=>{const h=i();D4.set(e,h.filter(y=>y.id!==r))},o=()=>{const h=i();if(!h.some(g=>g.id===r))return;const y=YC.get(e);if(h.length===1&&y){const g=y();g instanceof Promise&&g.catch(()=>{})}s()},a=i();if(D4.set(e,[...a,{id:r,fns:t}]),a&&a.length>0)return o;const c={};for(const h in t)c[h]=((...y)=>{const g=i();if(g.length!==0)for(const x of g)x.fns[h]?.(...y)});const d=n(c);return typeof d=="function"&&YC.set(e,d),o}async function sS(e){return new Promise(t=>setTimeout(t,e))}function v9(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let i=!0;const s=()=>i=!1;return(async()=>{let a;t&&(a=await e({unpoll:s}));const c=await n?.(a)??r;await sS(c);const d=async()=>{i&&(await e({unpoll:s}),await sS(r),d())};d()})(),s}const KK=new Map,YK=new Map;function ZK(e){const t=(i,s)=>({clear:()=>s.delete(i),get:()=>s.get(i),set:o=>s.set(i,o)}),n=t(e,KK),r=t(e,YK);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function XK(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=ZK(t),i=r.response.get();if(i&&n>0&&Date.now()-i.created.getTime()<n)return i.data;let s=r.promise.get();s||(s=e(),r.promise.set(s));try{const o=await s;return r.response.set({created:new Date,data:o}),o}finally{r.promise.clear()}}const QK=e=>`blockNumber.${e}`;async function hP(e,{cacheTime:t=e.cacheTime}={}){const n=await XK(()=>e.request({method:"eth_blockNumber"}),{cacheKey:QK(e.uid),cacheTime:t});return BigInt(n)}class w9 extends Ye{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
58`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class $4 extends Ye{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}function JK({chain:e,currentChainId:t}){if(!e)throw new $K;if(t!==e.id)throw new DK({chain:e,currentChainId:t})}function pP(e,{docsPath:t,...n}){const r=(()=>{const i=t3(e,n);return i instanceof bv?e:i})();return new xG(r,{docsPath:t,...n})}async function eY(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const U4=new Q6(128);async function mP(e,t){const{account:n=e.account,chain:r=e.chain,accessList:i,authorizationList:s,blobs:o,data:a,gas:c,gasPrice:d,maxFeePerBlobGas:h,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:x,type:_,value:S,...I}=t;if(typeof n>"u")throw new w9({docsPath:"/docs/actions/wallet/sendTransaction"});const L=n?co(n):null;try{wv(t);const D=await(async()=>
58{if(t.to)return t.to;if(t.to!==null&&s&&s.length>0)return await s9({authorization:s[0]}).catch(()=>{throw new Ye("`to` is required. Could not infer from `authorizationList`.")})})();if(L?.type==="json-rpc"||L===null){let F;r!==null&&(F=await cr(e,Uj,"getChainId")({}),JK({currentChainId:F,chain:r}));const $=e.chain?.formatters?.transactionRequest?.format,V=($||xv)({...o9(I,{format:$}),accessList:i,account:L,authorizationList:s,blobs:o,chainId:F,data:a,gas:c,gasPrice:d,maxFeePerBlobGas:h,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:x,to:D,type:_,value:S},"sendTransaction"),K=U4.get(e.uid),te=K?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:te,params:[V]},{retryCount:0})}catch(Q){if(K===!1)throw Q;const ee=Q;if(ee.name==="InvalidInputRpcError"||ee.name==="InvalidParamsRpcError"||ee.name==="MethodNotFoundRpcError"||ee.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[V]},{retryCount:0}).then(ne=>(U4.set(e.uid,!0),ne)).catch(ne=>{const J=ne;throw J.name==="MethodNotFoundRpcError"||J.name==="MethodNotSupportedRpcError"?(U4.set(e.uid,!1),ee):J});throw ee}}if(L?.type==="local"){const F=await cr(e,Vj,"prepareTransactionRequest")({account:L,accessList:i,authorizationList:s,blobs:o,chain:r,data:a,gas:c,gasPrice:d,maxFeePerBlobGas:h,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:x,nonceManager:L.nonceManager,parameters:[...zj,"sidecars"],type:_,value:S,...I,to:D}),$=r?.serializers?.transaction,z=await L.signTransaction(F,{serializer:$});return await cr(e,eY,"sendRawTransaction")({serializedTransaction:z})}throw L?.type==="smart"?new $4({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new $4({docsPath:"/docs/actions/wallet/sendTransaction",type:L?.type})}catch(D){throw D instanceof $4?D:pP(D,{...t,account:L,chain:t.chain||void 0})}}async function Q5(e,t){return Q5.internal(e,mP,"sendTransaction",t)}(function(e){async function t(n,r,i,s){const{abi:o,account:a=n.account,address:c,args:d,dataSuffix:h,functionName:y,...g}=s;if(typeof a>"u")throw new w9({docsPath:"/docs/contract/writeContract"});const x=a?co(a):null,_=Ms({abi:o,args:d,functionName:y});try{return await cr(n,r,i)({data:`${_}${h?h.replace("0x",""):""}`,to:c,account:x,...g})}catch(S){throw tg(S,{abi:o,address:c,args:d,docsPath:"/docs/contract/writeContract",functionName:y,sender:x?.address})}}e.internal=t})(Q5||(Q5={}));class tY extends Ye{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}function Rx(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((i,s)=>{const o=async({count:a=0}={})=>{const c=async({error:d})=>{const h=typeof t=="function"?t({count:a,error:d}):t;h&&await sS(h),o({count:a+1})};try{const d=await e();i(d)}catch(d){if(a<n&&await r({count:a,error:d}))return c({error:d});s(d)}};o()})}const yP={"0x0":"reverted","0x1":"success"};function gP(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>qj(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?qu(e.transactionIndex):null,status:e.status?yP[e.status]:null,type:e.type?Ij[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const nY=n3("transactionReceipt",gP),bP="0x5792579257925792579257925792579257925792579257925792579257925792",xP=ot(0,{size:32});async function rY(e,t){const{account:n=e.account,capabilities:r,chain:i=e.chain,experimental_fallback:s,experimental_fallbackDelay:o=32,forceAtomic:a=!1,id:c,version:d="2.0.0"}=t,h=n?co(n):null,y=t.calls.map(g=>{const x=g,_=x.abi?Ms({abi:x.abi,functionName:x.functionName,args:x.args}):x.data;return{data:x.dataSuffix&&_?Hu([_,x.dataSuffix]):_,to:x.to,value:x.value?ot(x.value):void 0}});try{const g=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:a,calls:y,capabilities:r,chainId:ot(i.id),from:h?.address,id:c,version:d}]},{retryCount:0});return typeof g=="string"?{id:g}:g}catch(g){const x=g;if(s&&(x.name==="MethodNotFoundRpcError"||x.name==="MethodNotSupportedRpcError"||x.name==="UnknownRpcError"||x.details.toLowerCase().includes("does not exist / is not available")||x.details.toLowerCase().includes("missing or invalid. request()")||x.details.toLowerCase().includes("did n
58ot match any variant of untagged enum")||x.details.toLowerCase().includes("account upgraded to unsupported contract")||x.details.toLowerCase().includes("eip-7702 not supported")||x.details.toLowerCase().includes("unsupported wc_ method")||x.details.toLowerCase().includes("feature toggled misconfigured")||x.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(r&&Object.values(r).some(D=>!D.optional)){const D="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new Jy(new Ye(D,{details:D}))}if(a&&y.length>1){const L="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new eg(new Ye(L,{details:L}))}const _=[];for(const L of y){const D=mP(e,{account:h,chain:i,data:L.data,to:L.to,value:L.value?ni(L.value):void 0});_.push(D),o>0&&await new Promise(F=>setTimeout(F,o))}const S=await Promise.allSettled(_);if(S.every(L=>L.status==="rejected"))throw S[0].reason;const I=S.map(L=>L.status==="fulfilled"?L.value:xP);return{id:Hu([...I,ot(i.id,{size:32}),bP])}}throw pP(g,{...t,account:h,chain:t.chain})}}async function iY(e,t){async function n(h){if(h.endsWith(bP.slice(2))){const g=io(q_(h,-64,-32)),x=q_(h,0,-64).slice(2).match(/.{1,64}/g),_=await Promise.all(x.map(I=>xP.slice(2)!==I?e.request({method:"eth_getTransactionReceipt",params:[`0x${I}`]},{dedupe:!0}):void 0)),S=_.some(I=>I===null)?100:_.every(I=>I?.status==="0x1")?200:_.every(I=>I?.status==="0x0")?500:600;return{atomic:!1,chainId:qu(g),receipts:_.filter(Boolean),status:S,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[h]})}const{atomic:r=!1,chainId:i,receipts:s,version:o="2.0.0",...a}=await n(t.id),[c,d]=(()=>{const h=a.status;return h>=100&&h<200?["pending",h]:h>=200&&h<300?["success",h]:h>=300&&h<700?["failure",h]:h==="CONFIRMED"?["success",200]:h==="PENDING"?["pending",100]:[void 0,h]})();return{...a,atomic:r,chainId:i?qu(i):void 0,receipts:s?.map(h=>({...h,blockNumber:ni(h.blockNumber),gasUsed:ni(h.gasUsed),status:yP[h.status]}))??[],statusCode:d,status:c,version:o}}async function sY(e,t){const{id:n,pollingInterval:r=e.pollingInterval,status:i=({statusCode:S})=>S===200||S>=300,retryCount:s=4,retryDelay:o=({count:S})=>~~(1<<S)*200,timeout:a=6e4,throwOnFailure:c=!1}=t,d=la(["waitForCallsStatus",e.uid,n]),{promise:h,resolve:y,reject:g}=x9();let x;const _=Ix(d,{resolve:y,reject:g},S=>{const I=v9(async()=>{const L=D=>{clearTimeout(x),I(),D(),_()};try{const D=await Rx(async()=>{const F=await cr(e,iY,"getCallsStatus")({id:n});if(c&&F.status==="failure")throw new tY(F);return F},{retryCount:s,delay:o});if(!i(D))return;L(()=>S.resolve(D))}catch(D){L(()=>S.reject(D))}},{interval:r,emitOnBegin:!0});return I});return x=a?setTimeout(()=>{_(),clearTimeout(x),g(new oY({id:n}))},a):void 0,await h}class oY extends Ye{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const oS=256;let q2=oS,H2;function vP(e=11){if(!H2||q2+e>oS*2){H2="",q2=0;for(let t=0;t<oS;t++)H2+=(256+Math.random()*256|0).toString(16).substring(1)}return H2.substring(q2,q2+++e)}function E9(e){const{batch:t,chain:n,ccipRead:r,key:i="base",name:s="Base Client",type:o="base"}=e,a=e.experimental_blockTag??(typeof n?.experimental_preconfirmationTime=="number"?"pending":void 0),c=n?.blockTime??12e3,d=Math.min(Math.max(Math.floor(c/2),500),4e3),h=e.pollingInterval??d,y=e.cacheTime??h,g=e.account?co(e.account):void 0,{config:x,request:_,value:S}=e.transport({chain:n,pollingInterval:h}),I={...x,...S},L={account:g,batch:t,cacheTime:y,ccipRead:r,chain:n,key:i,name:s,pollingInterval:h,request:_,transport:I,type:o,uid:vP(),...a?{experimental_blockTag:a}:{}};function D(F){return $=>{const z=$(F);for(const K in L)delete z[K];const V={...F,...z};return Object.assign(V,{extend:D(V)})}}return Object.assign(L,{extend:D(L)})}async function aY(e,{address:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest"}){const i=typeof n=="bigint"?ot(n):void 0,s=await e.request({method:"eth_getBalance",params:[t,i||r]});return BigInt(s)}async function wP(e,{address:t,blockNumber:n,blockTag:r="latest"}){const i=n!==void 0?ot(n):void 0,s=await e.request({method:"eth_getCode",params:[t,i||r]},{dedupe:!!i});if(s!=="0x")return s}function Of(e,t){if(e.length!==t.length)throw new XN({expectedLength:e.length,givenLength:t.length});const n=[];for(let r=0;r<e.length;r++){const i=e[r],s=t[r];n.push(EP(i,s))}return Ea(n)}function EP(e,t,n=!1){if(e==="address"){const o=t;if(!Sr(o))throw new Ps({address:o});return ec(o.toLowerCase(),{size:n?32:null})}if(e==="string")return jp(t);if(e==="bytes")return t;if(e==="bool")return ec(WT(t),{size:n?32:1});const r=e.match(mj);if(r){const[o,a,c="256"]=r,d=Number.parseInt(c,10)/8;return ot(t,{size:n?32:d,signed:a==="int"})}const i=e.match(BW);if(i){const[o,a]=i;
58if(Number.parseInt(a,10)!==(t.length-2)/2)throw new VH({expectedSize:Number.parseInt(a,10),givenSize:(t.length-2)/2});return ec(t,{dir:"right",size:n?32:null})}const s=e.match(LW);if(s&&Array.isArray(t)){const[o,a]=s,c=[];for(let d=0;d<t.length;d++)c.push(EP(a,t[d],!0));return c.length===0?"0x":Ea(c)}throw new KH(e)}function cY(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:r}=n,i=n.address;if(!Sr(i))throw new Ps({address:i});if(r<0)throw new kv({chainId:r})}_9(e)}function uY(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new Fj;for(const n of t){const r=bi(n),i=qu(Zy(n,0,1));if(r!==32)throw new eK({hash:n,size:r});if(i!==Bj)throw new tK({hash:n,version:i})}}_9(e)}function _9(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new kv({chainId:t});if(i&&!Sr(i))throw new Ps({address:i});if(r&&r>vv)throw new Yf({maxFeePerGas:r});if(n&&r&&n>r)throw new ng({maxFeePerGas:r,maxPriorityFeePerGas:n})}function lY(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:s}=e;if(t<=0)throw new kv({chainId:t});if(s&&!Sr(s))throw new Ps({address:s});if(n||i)throw new Ye("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>vv)throw new Yf({maxFeePerGas:r})}function dY(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:s}=e;if(s&&!Sr(s))throw new Ps({address:s});if(typeof t<"u"&&t<=0)throw new kv({chainId:t});if(n||i)throw new Ye("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>vv)throw new Yf({maxFeePerGas:r})}function Cv(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n<e.length;n++){const{address:r,storageKeys:i}=e[n];for(let s=0;s<i.length;s++)if(i[s].length-2!==64)throw new bG({storageKey:i[s]});if(!Sr(r,{strict:!1}))throw new Ps({address:r});t.push([r,i])}return t}function fY(e,t){const n=$j(e);return n==="eip1559"?mY(e,t):n==="eip2930"?yY(e,t):n==="eip4844"?pY(e,t):n==="eip7702"?hY(e,t):gY(e,t)}function hY(e,t){const{authorizationList:n,chainId:r,gas:i,nonce:s,to:o,value:a,maxFeePerGas:c,maxPriorityFeePerGas:d,accessList:h,data:y}=e;cY(e);const g=Cv(h),x=bY(n);return Ea(["0x04",rd([ot(r),s?ot(s):"0x",d?ot(d):"0x",c?ot(c):"0x",i?ot(i):"0x",o??"0x",a?ot(a):"0x",y??"0x",g,x,...Cg(e,t)])])}function pY(e,t){const{chainId:n,gas:r,nonce:i,to:s,value:o,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:d,accessList:h,data:y}=e;uY(e);let g=e.blobVersionedHashes,x=e.sidecars;if(e.blobs&&(typeof g>"u"||typeof x>"u")){const F=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(V=>hs(V)),$=e.kzg,z=l9({blobs:F,kzg:$});if(typeof g>"u"&&(g=Pj({commitments:z})),typeof x>"u"){const V=d9({blobs:F,commitments:z,kzg:$});x=Dj({blobs:F,commitments:z,proofs:V})}}const _=Cv(h),S=[ot(n),i?ot(i):"0x",d?ot(d):"0x",c?ot(c):"0x",r?ot(r):"0x",s??"0x",o?ot(o):"0x",y??"0x",_,a?ot(a):"0x",g??[],...Cg(e,t)],I=[],L=[],D=[];if(x)for(let F=0;F<x.length;F++){const{blob:$,commitment:z,proof:V}=x[F];I.push($),L.push(z),D.push(V)}return Ea(["0x03",rd(x?[S,I,L,D]:S)])}function mY(e,t){const{chainId:n,gas:r,nonce:i,to:s,value:o,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:d,data:h}=e;_9(e);const y=Cv(d),g=[ot(n),i?ot(i):"0x",c?ot(c):"0x",a?ot(a):"0x",r?ot(r):"0x",s??"0x",o?ot(o):"0x",h??"0x",y,...Cg(e,t)];return Ea(["0x02",rd(g)])}function yY(e,t){const{chainId:n,gas:r,data:i,nonce:s,to:o,value:a,accessList:c,gasPrice:d}=e;lY(e);const h=Cv(c),y=[ot(n),s?ot(s):"0x",d?ot(d):"0x",r?ot(r):"0x",o??"0x",a?ot(a):"0x",i??"0x",h,...Cg(e,t)];return Ea(["0x01",rd(y)])}function gY(e,t){const{chainId:n=0,gas:r,data:i,nonce:s,to:o,value:a,gasPrice:c}=e;dY(e);let d=[s?ot(s):"0x",c?ot(c):"0x",r?ot(r):"0x",o??"0x",a?ot(a):"0x",i??"0x"];if(t){const h=(()=>
58{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const x=27n+(t.v===27n?0n:1n);if(t.v!==x)throw new yG({v:t.v});return x})(),y=io(t.r),g=io(t.s);d=[...d,ot(h),y==="0x00"?"0x":y,g==="0x00"?"0x":g]}else n>0&&(d=[...d,ot(n),"0x","0x"]);return rd(d)}function Cg(e,t){const n=t??e,{v:r,yParity:i}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof r>"u"&&typeof i>"u")return[];const s=io(n.r),o=io(n.s);return[typeof i=="number"?i?ot(1):"0x":r===0n?"0x":r===1n?ot(1):r===27n?"0x":ot(1),s==="0x00"?"0x":s,o==="0x00"?"0x":o]}function bY(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{chainId:r,nonce:i,...s}=n,o=n.address;t.push([r?eo(r):"0x",o,i?eo(i):"0x",...Cg({},s)])}return t}async function xY({address:e,authorization:t,signature:n}){return K5(Qi(e),await s9({authorization:t,signature:n}))}const W2=new Q6(8192);function vY(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(W2.get(n))return W2.get(n);const r=e().finally(()=>W2.delete(n));return W2.set(n,r),r}function wY(e,t={}){return async(n,r={})=>{const{dedupe:i=!1,methods:s,retryDelay:o=150,retryCount:a=3,uid:c}={...t,...r},{method:d}=n;if(s?.exclude?.includes(d))throw new hp(new Error("method not supported"),{method:d});if(s?.include&&!s.include.includes(d))throw new hp(new Error("method not supported"),{method:d});const h=i?jp(`${c}.${la(n)}`):void 0;return vY(()=>Rx(async()=>{try{return await e(n)}catch(y){const g=y;switch(g.code){case fx.code:throw new fx(g);
58case hx.code:throw new hx(g);case px.code:throw new px(g,{method:n.method});case mx.code:throw new mx(g);case Op.code:throw new Op(g);case yx.code:throw new yx(g);case gx.code:throw new gx(g);case Hf.code:throw new Hf(g);case Xy.code:throw new Xy(g);case hp.code:throw new hp(g,{method:n.method});case Qy.code:throw new Qy(g);case bx.code:throw new bx(g);case Ur.code:throw new Ur(g);case xx.code:throw new xx(g);case vx.code:throw new vx(g);case wx.code:throw new wx(g);case G_.code:throw new G_(g);case rc.code:throw new rc(g);case Jy.code:throw new Jy(g);case Ex.code:throw new Ex(g);case _x.code:throw new _x(g);case Sx.code:throw new Sx(g);case Tx.code:throw new Tx(g);case Ax.code:throw new Ax(g);case eg.code:throw new eg(g);case 5e3:throw new Ur(g);default:throw y instanceof Ye?y:new AG(g)}}},{delay:({count:y,error:g})=>{if(g&&g instanceof sx){const x=g?.headers?.get("Retry-After");if(x?.match(/\d/))return Number.parseInt(x,10)*1e3}return~~(1<<y)*o},retryCount:a,shouldRetry:({error:y})=>EY(y)}),{enabled:i,id:h})}}function EY(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Qy.code||e.code===Op.code:e instanceof sx&&e.status?e.status===403||e.status===408||e.status===4
5813||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function Sa(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}function S9(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise((i,s)=>{(async()=>{let o;try{const a=new AbortController;n>0&&(o=setTimeout(()=>{r?a.abort():s(t)},n)),i(await e({signal:a?.signal||null}))}catch(a){a?.name==="AbortError"&&s(t),s(a)}finally{clearTimeout(o)}})()})}function _Y(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const ZC=_Y();function SY(e,t={}){return{async request(n){const{body:r,fetchFn:i=t.fetchFn??fetch,onRequest:s=t.onRequest,onResponse:o=t.onResponse,timeout:a=t.timeout??1e4}=n,c={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:d,method:h,signal:y}=c;try{const g=await S9(async({signal:_})=>{const S={...c,body:Array.isArray(r)?la(r.map(F=>({jsonrpc:"2.0",id:F.id??ZC.take(),...F}))):la({jsonrpc:"2.0",id:r.id??ZC.take(),...r}),headers:{"Content-Type":"application/json",...d},method:h||"POST",signal:y||(a>0?_:null)},I=new Request(e,S),L=await s?.(I,S)??{...S,url:e};return await i(L.url??e,L)},{errorInstance:new OC({body:r,url:e}),timeout:a,signal:!0});o&&await o(g);let x;if(g.headers.get("Content-Type")?.startsWith("application/json"))x=await g.json();else{x=await g.text();try{x=JSON.parse(x||"{}")}catch(_){if(g.ok)throw _;x={error:x}}}if(!g.ok)throw new sx({body:r,details:la(x.error)||g.statusText,headers:g.headers,status:g.status,url:e});return x}catch(g){throw g instanceof sx||g instanceof OC?g:new sx({body:r,cause:g,url:e})}}}}const TY=`�Ethereum Signed Message:
59`;function AY(e){const t=typeof e=="string"?jp(e):typeof e.raw=="string"?e.raw:hs(e.raw),n=jp(`${TY}${bi(t)}`);return Hu([n,t])}function kY(e,t){return kg(AY(e),t)}const CY="1.1.1";let Bo=class aS extends Error{constructor(t,n={}){const r=n.cause instanceof aS?n.cause.details:n.cause?.message?n.cause.message:n.details,i=n.cause instanceof aS&&n.cause.docsPath||n.docsPath,s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${CY}`].join(`
60`);super(s),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}};function dd(e,t){return e.exec(t)?.groups}const _P=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,SP=/^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)?$/,TP=/^\(.+?\).*?$/,XC=/^tuple(?<array>(\[(\d*)\])*)$/;function cS(e){let t=e.type;if(XC.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let i=0;i<n;i++){const s=e.components[i];t+=cS(s),i<n-1&&(t+=", ")}const r=dd(XC,e.type);return t+=`)${r?.array??""}`,cS({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function oy(e){let t="";const n=e.length;for(let r=0;r<n;r++){const i=e[r];t+=cS(i),r!==n-1&&(t+=", ")}return t}function uS(e){return e.type==="function"?`function ${e.name}(${oy(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${oy(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${oy(e.inputs)})`:e.type==="error"?`error ${e.name}(${oy(e.inputs)})`:e.type==="constructor"?`constructor(${oy(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const AP=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function IY(e){return AP.test(e)}function RY(e){return dd(AP,e)}const kP=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function MY(e){return kP.test(e)}function NY(e){return dd(kP,e)}const CP=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function jY(e){return CP.test(e)}function PY(e){return dd(CP,e)}const IP=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function T9(e){return IP.test(e)}function OY(e){return dd(IP,e)}const RP=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function LY(e){return RP.test(e)}function BY(e){return dd(RP,e)}const MP=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function FY(e){return MP.test(e)}function DY(e){return dd(MP,e)}
60const $Y=/^receive\(\) external payable$/;function UY(e){return $Y.test(e)}const QC=new Set(["memory","indexed","storage","calldata"]),zY=new Set(["indexed"]),lS=new Set(["calldata","memory","storage"]);class VY extends Bo{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class qY extends Bo{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class HY extends Bo{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class WY extends Bo{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class GY extends Bo{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class KY extends Bo{constructor({param:t,name:n}
60){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class YY extends Bo{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class ZY extends Bo{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class XY extends Bo{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class Ig extends Bo{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class QY extends Bo{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class JY extends Bo{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class eZ extends Bo{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class tZ extends Bo{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function nZ(e,t,n){let r="";if(n)for(const i of Object.entries(n)){if(!i)continue;let s="";for(const o of i[1])s+=`[${o.type}${o.name?`:${o.name}`:""}]`;r+=`(${i[0]}{${s}})`}return t?`${t}:${e}${r}`:e}const z4=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function JC(e,t={}){if(jY(e))return rZ(e,t);if(MY(e))return iZ(e,t);if(IY(e))return sZ(e,t);if(LY(e))return oZ(e,t);if(FY(e))return aZ(e);if(UY(e))return{type:"receive",stateMutability:"payable"};throw new QY({signature:e})}function rZ(e,t={}){const n=PY(e);
60if(!n)throw new Ig({signature:e,type:"function"});const r=aa(n.parameters),i=[],s=r.length;for(let a=0;a<s;a++)i.push(id(r[a],{modifiers:lS,structs:t,type:"function"}));const o=[];if(n.returns){const a=aa(n.returns),c=a.length;for(let d=0;d<c;d++)o.push(id(a[d],{modifiers:lS,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:i,outputs:o}}function iZ(e,t={}){const n=NY(e);if(!n)throw new Ig({signature:e,type:"event"});const r=aa(n.parameters),i=[],s=r.length;for(let o=0;o<s;o++)i.push(id(r[o],{modifiers:zY,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:i}}function sZ(e,t={}){const n=RY(e);if(!n)throw new Ig({signature:e,type:"error"});const r=aa(n.parameters),i=[],s=r.length;for(let o=0;o<s;o++)i.push(id(r[o],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:i}}function oZ(e,t={}){const n=BY(e);if(!n)throw new Ig({signature:e,type:"constructor"});const r=aa(n.parameters),i=[],s=r.length;for(let o=0;o<s;o++)i.push(id(r[o],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:i}}function aZ(e){const t=DY(e);if(!t)throw new Ig({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const cZ=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,uZ=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,lZ=/^u?int$/;function id(e,t){const n=nZ(e,t?.type,t?.structs);if(z4.has(n))return z4.get(n);const r=TP.test(e),i=dd(r?uZ:cZ,e);if(!i)throw new GY({param:e});if(i.name&&fZ(i.name))throw new KY({param:e,name:i.name});const s=i.name?{name:i.name}:{},o=i.modifier==="indexed"?{indexed:!0}:{},a=t?.structs??{};let c,d={};if(r){c="tuple";const y=aa(i.type),g=[],x=y.length;for(let _=0;_<x;_++)g.push(id(y[_],{structs:a}));d={components:g}}else if(i.type in a)c="tuple",d={components:a[i.type]};else if(lZ.test(i.type))c=`${i.type}256`;else if(i.type==="address payable")c="address";else if(c=i.type,t?.type!=="struct"&&!NP(c))throw new HY({type:c});if(i.modifier){if(!t?.modifiers?.has?.(i.modifier))throw new YY({param:e,type:t?.type,modifier:i.modifier});if(lS.has(i.modifier)&&!hZ(c,!!i.array))throw new ZY({param:e,type:t?.type,modifier:i.modifier})}const h={type:`${c}${i.array??""}`,...s,...o,...d};return z4.set(n,h),h}function aa(e,t=[],n="",r=0){const i=e.trim().length;for(let s=0;s<i;s++){const o=e[s],a=e.slice(s+1);switch(o){case",":return r===0?aa(a,[...t,n.trim()]):aa(a,t,`${n}${o}`,r);case"(":return aa(a,t,`${n}${o}`,r+1);case")":return aa(a,t,`${n}${o}`,r-1);default:return aa(a,t,`${n}${o}`,r)}}if(n==="")return t;if(r!==0)throw new tZ({current:n,depth:r});return t.push(n.trim()),t}function NP(e){return e==="address"||e==="bool"||e==="function"||e==="string"||_P.test(e)||SP.test(e)}const dZ=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function fZ(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||_P.test(e)||SP.test(e)||dZ.test(e)}function hZ(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function jP(e){const t={},n=e.length;for(let o=0;o<n;o++){const a=e[o];if(!T9(a))continue;const c=OY(a);if(!c)throw new Ig({signature:a,type:"struct"});const d=c.properties.split(";"),h=[],y=d.length;for(let g=0;g<y;g++){const _=d[g].trim();if(!_)continue;const S=id(_,{type:"struct"});h.push(S)}if(!h.length)throw new JY({signature:a});t[c.name]=h}const r={},i=Object.entries(t),s=i.length;for(let o=0;o<s;o++){const[a,c]=i[o];r[a]=PP(c,t)}return r}const pZ=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function PP(e,t,n=new Set){const r=[],i=e.length;for(let s=0;s<i;s++){const o=e[s];if(TP.test(o.type))r.push(o);else{const c=dd(pZ,o.type);if(!c?.type)throw new XY({abiParameter:o});const{array:d,type:h}=c;if(h in t){if(n.has(h))throw new eZ({type:h});r.push({...o,type:`tuple${d??""}`,components:PP(t[h]??[],t,new Set([...n,h]))})}else if(NP(h))r.push(o);else throw new qY({type:h})}}return r}function e7(e){let t;if(typeof e=="string")t=JC(e);else{const n=jP(e),r=e.length;for(let i=0;i<r;i++){const s=e[i];if(!T9(s)){t=JC(s,n);break}}}if(!t)throw new VY({signature:e});return t}function t7(e){const t=[];if(typeof e=="string"){const n=aa(e),r=n.length;for(let i=0;i<r;i++)t.push(id(n[i],{modifiers:QC}))}else{const n=jP(e),r=e.length;for(let i=0;i<r;i++){const s=e[i];if(T9(s))continue;const o=aa(s),a=o.length;for(let c=0;c<a;c++)t.push(id(o[c],{modifiers:QC,structs:n}
60))}}if(t.length===0)throw new WY({params:e});return t}class mZ extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const yZ={checksum:new mZ(8192)},V4=yZ.checksum;function OP(e,t={}){const{as:n=typeof e=="string"?"Hex":"Bytes"}=t,r=lj(yK(e));return n==="Bytes"?r:Bc(r)}const gZ=/^0x[a-fA-F0-9]{40}$/;function c3(e,t={}){const{strict:n=!0}=t;if(!gZ.test(e))throw new n7({address:e,cause:new bZ});if(n){if(e.toLowerCase()===e)return;if(LP(e)!==e)throw new n7({address:e,cause:new xZ})}}function LP(e){if(V4.has(e))return V4.get(e);c3(e,{strict:!1});const t=e.substring(2).toLowerCase(),n=OP(bK(t),{as:"Bytes"}),r=t.split("");for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&r[s]&&(r[s]=r[s].toUpperCase()),(n[s>>1]&15)>=8&&r[s+1]&&(r[s+1]=r[s+1].toUpperCase());const i=`0x${r.join("")}`;return V4.set(e,i),i}function dS(e,t={}){const{strict:n=!0}=t??{};try{return c3(e,{strict:n}),!0}catch{return!1}}class n7 extends Hn{constructor({address:t,cause:n}){super(`Address "${t}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}let bZ=class extends Hn{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}};class xZ extends Hn{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const vZ=/^(.*)\[([0-9]*)\]$/,wZ=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,BP=/^(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)?$/,r7=2n**256n-1n;function by(e,t,n){const{checksumAddress:r,staticPosition:i}=n,s=C9(t.type);if(s){const[o,a]=s;return _Z(e,{...t,type:a},{checksumAddress:r,length:o,staticPosition:i})}if(t.type==="tuple")return kZ(e,t,{checksumAddress:r,staticPosition:i});if(t.type==="address")return EZ(e,{checksum:r});if(t.type==="bool")return SZ(e);if(t.type.startsWith("bytes"))return TZ(e,t,{staticPosition:i});if(t.type.startsWith("uint")||t.type.startsWith("int"))return AZ(e,t);if(t.type==="string")return CZ(e,{staticPosition:i});throw new R9(t.type)}const i7=32,fS=32;function EZ(e,t={}){const{checksum:n=!1}=t,r=e.readBytes(32);return[(s=>n?LP(s):s)(Bc(vK(r,-20))),32]}function _Z(e,t,n){const{checksumAddress:r,length:i,staticPosition:s}=n;if(!i){const c=Yl(e.readBytes(fS)),d=s+c,h=d+i7;e.setPosition(d);const y=Yl(e.readBytes(i7)),g=Mx(t);let x=0;const _=[];for(let S=0;S<y;++S){e.setPosition(h+(g?S*32:x));const[I,L]=by(e,t,{checksumAddress:r,staticPosition:h});x+=L,_.push(I)}return e.setPosition(s+32),[_,32]}if(Mx(t)){const c=Yl(e.readBytes(fS)),d=s+c,h=[];for(let y=0;y<i;++y){e.setPosition(d+y*32);const[g]=by(e,t,{checksumAddress:r,staticPosition:d});h.push(g)}return e.setPosition(s+32),[h,32]}let o=0;const a=[];for(let c=0;c<i;++c){const[d,h]=by(e,t,{checksumAddress:r,staticPosition:s+o});o+=h,a.push(d)}return[a,o]}function SZ(e){return[EK(e.readBytes(32),{size:32}),32]}function TZ(e,t,{staticPosition:n}){const[r,i]=t.type.split("bytes");if(!i){const o=Yl(e.readBytes(32));e.setPosition(n+o);const a=Yl(e.readBytes(32));if(a===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(a);return e.setPosition(n+32),[Bc(c),32]}return[Bc(e.readBytes(Number.parseInt(i,10),32)),32]}function AZ(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),i=e.readBytes(32);return[r>48?wK(i,{signed:n}):Yl(i,{signed:n}),32]}function kZ(e,t,n){const{checksumAddress:r,staticPosition:i}=n,s=t.components.length===0||t.components.some(({name:c})=>!c),o=s?[]:{};let a=0;if(Mx(t)){const c=Yl(e.readBytes(fS)),d=i+c;for(let h=0;h<t.components.length;++h){const y=t.components[h];e.setPosition(d+a);const[g,x]=by(e,y,{checksumAddress:r,staticPosition:d});a+=x,o[s?h:y?.name]=g}return e.setPosition(i+32),[o,32]}for(let c=0;c<t.components.length;++c){const d=t.components[c],[h,y]=by(e,d,{checksumAddress:r,staticPosition:i});
60o[s?c:d?.name]=h,a+=y}return[o,a]}function CZ(e,{staticPosition:t}){const n=Yl(e.readBytes(32)),r=t+n;e.setPosition(r);const i=Yl(e.readBytes(32));if(i===0)return e.setPosition(t+32),["",32];const s=e.readBytes(i,32),o=_K(eP(s));return e.setPosition(t+32),[o,32]}function IZ({checksumAddress:e,parameters:t,values:n}){const r=[];for(let i=0;i<t.length;i++)r.push(A9({checksumAddress:e,parameter:t[i],value:n[i]}));return r}function A9({checksumAddress:e=!1,parameter:t,value:n}){const r=t,i=C9(r.type);if(i){const[s,o]=i;return MZ(n,{checksumAddress:e,length:s,parameter:{...r,type:o}})}if(r.type==="tuple")return LZ(n,{checksumAddress:e,parameter:r});if(r.type==="address")return RZ(n,{checksum:e});if(r.type==="bool")return jZ(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const s=r.type.startsWith("int"),[,,o="256"]=BP.exec(r.type)??[];return PZ(n,{signed:s,size:Number(o)})}if(r.type.startsWith("bytes"))return NZ(n,{type:r.type});if(r.type==="string")return OZ(n);throw new R9(r.type)}function k9(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:o,encoded:a}=e[s];o?t+=32:t+=ha(a)}const n=[],r=[];let i=0;for(let s=0;s<e.length;s++){const{dynamic:o,encoded:a}=e[s];o?(n.push(to(t+i,{size:32})),r.push(a),i+=ha(a)):n.push(a)}return Lc(...n,...r)}function RZ(e,t){const{checksum:n=!1}=t;return c3(e,{strict:n}),{dynamic:!1,encoded:Lp(e.toLowerCase())}}function MZ(e,t){const{checksumAddress:n,length:r,parameter:i}=t,s=r===null;if(!Array.isArray(e))throw new HZ(e);if(!s&&e.length!==r)throw new qZ({expectedLength:r,givenLength:e.length,type:`${i.type}[${r}]`});let o=!1;const a=[];for(let c=0;c<e.length;c++){const d=A9({checksumAddress:n,parameter:i,value:e[c]});d.dynamic&&(o=!0),a.push(d)}if(s||o){const c=k9(a);if(s){const d=to(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?Lc(d,c):d}}if(o)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:Lc(...a.map(({encoded:c})=>c))}}function NZ(e,{type:t}){const[,n]=t.split("bytes"),r=ha(e);if(!n){let i=e;return r%32!==0&&(i=Bp(i,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:Lc(Lp(to(r,{size:32})),i)}}if(r!==Number.parseInt(n,10))throw new DP({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:Bp(e)}}function jZ(e){if(typeof e!="boolean")throw new Hn(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Lp(tP(e))}}function PZ(e,{signed:t,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,i=t?-r-1n:0n;if(e>r||e<i)throw new iP({max:r.toString(),min:i.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:to(e,{size:32,signed:t})}}function OZ(e){const t=y9(e),n=Math.ceil(ha(t)/32),r=[];for(let i=0;i<n;i++)r.push(Bp($u(t,i*32,(i+1)*32)));return{dynamic:!0,encoded:Lc(Bp(to(ha(t),{size:32})),...r)}}function LZ(e,t){const{checksumAddress:n,parameter:r}=t;let i=!1;const s=[];for(let o=0;o<r.components.length;o++){const a=r.components[o],c=Array.isArray(e)?o:a.name,d=A9({checksumAddress:n,parameter:a,value:e[c]});s.push(d),d.dynamic&&(i=!0)}return{dynamic:i,encoded:i?k9(s):Lc(...s.map(({encoded:o})=>o))}}function C9(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Mx(e){const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return e.components?.some(Mx);const n=C9(e.type);return!!(n&&Mx({...e,type:n[1]}))}const BZ={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new $Z({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new DZ({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new s7({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new s7({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function FZ(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(BZ);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}class s7 extends Hn{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class DZ extends Hn{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class $Z extends Hn{constructor({count:t,limit:n}
60){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function UZ(e,t,n={}){const{as:r="Array",checksumAddress:i=!1}=n,s=typeof t=="string"?Jj(t):t,o=FZ(s);if(ly(s)===0&&e.length>0)throw new VZ;if(ly(s)&&ly(s)<32)throw new zZ({data:typeof t=="string"?t:Bc(t),parameters:e,size:ly(s)});let a=0;const c=r==="Array"?[]:{};for(let d=0;d<e.length;++d){const h=e[d];o.setPosition(a);const[y,g]=by(o,h,{checksumAddress:i,staticPosition:0});a+=g,r==="Array"?c.push(y):c[h.name??d]=y}return c}function I9(e,t,n){const{checksumAddress:r=!1}={};if(e.length!==t.length)throw new $P({expectedLength:e.length,givenLength:t.length});const i=IZ({checksumAddress:r,parameters:e,values:t}),s=k9(i);return s.length===0?"0x":s}function hS(e,t){if(e.length!==t.length)throw new $P({expectedLength:e.length,givenLength:t.length});const n=[];for(let r=0;r<e.length;r++){const i=e[r],s=t[r];n.push(hS.encode(i,s))}return Lc(...n)}(function(e){function t(n,r,i=!1){if(n==="address"){const c=r;return c3(c),Lp(c.toLowerCase(),i?32:0)}if(n==="string")return y9(r);if(n==="bytes")return r;if(n==="bool")return Lp(tP(r),i?32:1);const s=n.match(BP);if(s){const[c,d,h="256"]=s,y=Number.parseInt(h,10)/8;return to(r,{size:i?32:y,signed:d==="int"})}const o=n.match(wZ);if(o){const[c,d]=o;if(Number.parseInt(d,10)!==(r.length-2)/2)throw new DP({expectedSize:Number.parseInt(d,10),value:r});return Bp(r,i?32:0)}const a=n.match(vZ);if(a&&Array.isArray(r)){const[c,d]=a,h=[];for(let y=0;y<r.length;y++)h.push(t(d,r[y],!0));return h.length===0?"0x":Lc(...h)}throw new R9(n)}e.encode=t})(hS||(hS={}));function FP(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?t7(e):e}class zZ extends Hn{constructor({data:t,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${oy(n)})`,`Data:   ${t} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class VZ extends Hn{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class qZ extends Hn{constructor({expectedLength:t,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${t}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class DP extends Hn{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${ha(n)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class $P extends Hn{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${n}`].join(`
61`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class HZ extends Hn{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class R9 extends Hn{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}let UP=class extends KT{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,fW(t);const r=X6(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(r.length>i?t.create().update(r).digest():r);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=t.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),Yy(s)}update(t){return Ky(this),this.iHash.update(t),this}digestInto(t){Ky(this),Pp(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return t=t,t.finished=i,t.destroyed=s,t.blockLen=o,t.outputLen=a,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const zP=(e,t,n)=>new UP(e,t).update(n).digest();zP.create=(e,t)=>
61new UP(e,t);const Mo=BigInt(0),so=BigInt(1),pp=BigInt(2),WZ=BigInt(3),VP=BigInt(4),qP=BigInt(5),HP=BigInt(8);function Ro(e,t){const n=e%t;return n>=Mo?n:t+n}function Ha(e,t,n){let r=e;for(;t-- >Mo;)r*=r,r%=n;return r}function pS(e,t){if(e===Mo)throw new Error("invert: expected non-zero number");if(t<=Mo)throw new Error("invert: expected positive modulus, got "+t);let n=Ro(e,t),r=t,i=Mo,s=so;for(;n!==Mo;){const a=r/n,c=r%n,d=i-s*a;r=n,n=c,i=s,s=d}if(r!==so)throw new Error("invert: does not exist");return Ro(i,t)}function WP(e,t){const n=(e.ORDER+so)/VP,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw new Error("Cannot find square root");return r}function GZ(e,t){const n=(e.ORDER-qP)/HP,r=e.mul(t,pp),i=e.pow(r,n),s=e.mul(t,i),o=e.mul(e.mul(s,pp),i),a=e.mul(s,e.sub(o,e.ONE));if(!e.eql(e.sqr(a),t))throw new Error("Cannot find square root");return a}function KZ(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-so,n=0;for(;t%pp===Mo;)t/=pp,n++;let r=pp;const i=M9(e);for(;o7(i,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return WP;let s=i.pow(r,t);const o=(t+so)/pp;return function(c,d){if(c.is0(d))return d;if(o7(c,d)!==1)throw new Error("Cannot find square root");let h=n,y=c.mul(c.ONE,s),g=c.pow(d,t),x=c.pow(d,o);for(;!c.eql(g,c.ONE);){if(c.is0(g))return c.ZERO;let _=1,S=c.sqr(g);for(;!c.eql(S,c.ONE);)if(_++,S=c.sqr(S),_===h)throw new Error("Cannot find square root");const I=so<<BigInt(h-_-1),L=c.pow(y,I);h=_,y=c.sqr(L),g=c.mul(g,y),x=c.mul(x,L)}return x}}function YZ(e){return e%VP===WZ?WP:e%HP===qP?GZ:KZ(e)}const ZZ=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function XZ(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=ZZ.reduce((r,i)=>(r[i]="function",r),t);return i3(e,n)}function QZ(e,t,n){if(n<Mo)throw new Error("invalid exponent, negatives unsupported");if(n===Mo)return e.ONE;if(n===so)return t;let r=e.ONE,i=t;for(;n>Mo;)n&so&&(r=e.mul(r,i)),i=e.sqr(i),n>>=so;return r}function GP(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((o,a,c)=>e.is0(a)?o:(r[c]=o,e.mul(o,a)),e.ONE),s=e.inv(i);return t.reduceRight((o,a,c)=>e.is0(a)?o:(r[c]=e.mul(o,r[c]),e.mul(o,a)),s),r}function o7(e,t){const n=(e.ORDER-so)/pp,r=e.pow(t,n),i=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),o=e.eql(r,e.neg(e.ONE));if(!i&&!s&&!o)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function KP(e,t){t!==void 0&&lx(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function M9(e,t,n=!1,r={}){if(e<=Mo)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:i,nByteLength:s}=KP(e,t);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const a=Object.freeze({ORDER:e,isLE:n,BITS:i,BYTES:s,MASK:r3(i),ZERO:Mo,ONE:so,create:c=>Ro(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Mo<=c&&c<e},is0:c=>c===Mo,isOdd:c=>(c&so)===so,neg:c=>Ro(-c,e),eql:(c,d)=>c===d,sqr:c=>Ro(c*c,e),add:(c,d)=>Ro(c+d,e),sub:(c,d)=>Ro(c-d,e),mul:(c,d)=>Ro(c*d,e),pow:(c,d)=>QZ(a,c,d),div:(c,d)=>Ro(c*pS(d,e),e),sqrN:c=>c*c,addN:(c,d)=>c+d,subN:(c,d)=>c-d,mulN:(c,d)=>c*d,inv:c=>pS(c,e),sqrt:r.sqrt||(c=>(o||(o=YZ(e)),o(a,c))),toBytes:c=>n?Kj(c,s):Tv(c,s),fromBytes:c=>{if(c.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+c.length);return n?Gj(c):Ip(c)},invertBatch:c=>GP(a,c),cmov:(c,d,h)=>h?d:c});return Object.freeze(a)}function YP(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function ZP(e){const t=YP(e);return t+Math.ceil(t/2)}function JZ(e,t,n=!1){const r=e.length,i=YP(t),s=ZP(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const o=n?Gj(e):Ip(e),a=Ro(o,t-so)+so;return n?Kj(a,i):Tv(a,i)}const a7=BigInt(0),mS=BigInt(1);function q4(e,t){const n=t.negate();return e?n:t}function XP(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function H4(e,t){XP(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),i=2**e,s=r3(e),o=BigInt(e);return{windows:n,windowSize:r,mask:s,maxNumber:i,shiftBy:o}}
61function c7(e,t,n){const{windowSize:r,mask:i,maxNumber:s,shiftBy:o}=n;let a=Number(e&i),c=e>>o;a>r&&(a-=s,c+=mS);const d=t*r,h=d+Math.abs(a)-1,y=a===0,g=a<0,x=t%2!==0;return{nextN:c,offset:h,isZero:y,isNeg:g,isNegF:x,offsetF:d}}function eX(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function tX(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,r)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+r)})}const W4=new WeakMap,QP=new WeakMap;function G4(e){return QP.get(e)||1}function nX(e,t){return{constTimeNegate:q4,hasPrecomputes(n){return G4(n)!==1},unsafeLadder(n,r,i=e.ZERO){let s=n;for(;r>a7;)r&mS&&(i=i.add(s)),s=s.double(),r>>=mS;return i},precomputeWindow(n,r){const{windows:i,windowSize:s}=H4(r,t),o=[];let a=n,c=a;for(let d=0;d<i;d++){c=a,o.push(c);for(let h=1;h<s;h++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(n,r,i){let s=e.ZERO,o=e.BASE;const a=H4(n,t);for(let c=0;c<a.windows;c++){const{nextN:d,offset:h,isZero:y,isNeg:g,isNegF:x,offsetF:_}=c7(i,c,a);i=d,y?o=o.add(q4(x,r[_])):s=s.add(q4(g,r[h]))}return{p:s,f:o}},wNAFUnsafe(n,r,i,s=e.ZERO){const o=H4(n,t);for(let a=0;a<o.windows&&i!==a7;a++){const{nextN:c,offset:d,isZero:h,isNeg:y}=c7(i,a,o);if(i=c,!h){const g=r[d];s=s.add(y?g.negate():g)}}return s},getPrecomputes(n,r,i){let s=W4.get(r);return s||(s=this.precomputeWindow(r,n),n!==1&&W4.set(r,i(s))),s},wNAFCached(n,r,i){const s=G4(n);return this.wNAF(s,this.getPrecomputes(s,n,i),r)},wNAFCachedUnsafe(n,r,i,s){const o=G4(n);return o===1?this.unsafeLadder(n,r,s):this.wNAFUnsafe(o,this.getPrecomputes(o,n,i),r,s)},setWindowSize(n,r){XP(r,t),QP.set(n,r),W4.delete(n)}}}function rX(e,t,n,r){eX(n,e),tX(r,t);const i=n.length,s=r.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,a=sK(BigInt(i));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const d=r3(c),h=new Array(Number(d)+1).fill(o),y=Math.floor((t.BITS-1)/c)*c;let g=o;for(let x=y;x>=0;x-=c){h.fill(o);for(let S=0;S<s;S++){const I=r[S],L=Number(I>>BigInt(x)&d);h[L]=h[L].add(n[S])}let _=o;for(let S=h.length-1,I=o;S>0;S--)I=I.add(h[S]),_=_.add(I);if(g=g.add(_),x!==0)for(let S=0;S<c;S++)g=g.double()}return g}function JP(e){return XZ(e.Fp),i3(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...KP(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function u7(e){e.lowS!==void 0&&kx("lowS",e.lowS),e.prehash!==void 0&&kx("prehash",e.prehash)}function iX(e){const t=JP(e);i3(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}let sX=class extends Error{constructor(t=""){super(t)}};const Ll={Err:sX,_tlv:{encode:(e,t)=>{const{Err:n}=Ll;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,i=V2(r);if(i.length/2&128)throw new n("tlv.encode: long form length too big");const s=r>127?V2(i.length/2|128):"";return V2(e)+s+i+t},decode(e,t){const{Err:n}=Ll;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const i=t[r++],s=!!(i&128);let o=0;if(!s)o=i;else{const c=i&127;if(!c)throw new n("tlv.decode(long): indefinite length not supported");if(c>4)throw new n("tlv.decode(long): byte length is too big");const d=t.subarray(r,r+c);if(d.length!==c)throw new n("tlv.decode: length bytes not complete");if(d[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const h of d)o=o<<8|h;if(r+=c,o<128)throw new n("tlv.decode(long): not minimal encoding")}const a=t.subarray(r,r+o);if(a.length!==o)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+o)}}},_int:{encode(e){const{Err:t}=Ll;if(e<$l)throw new t("integer: negative integers are not allowed");let n=V2(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=Ll;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return Ip(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=Ll,i=Ga("signature",e),{v:s,l:o}=r.decode(48,i);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l:c}=r.decode(2,s),{v:d,l:h}=r.decode(2,c);if(h.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(d)}},hexFromSig(e){const{_tlv:t,_int:n}=Ll,r=t.encode(2,n.encode(e.r)),i=t.encode(2,n.encode(e.s)),s=r+i;return t.encode(48,s)}};function K4(e,t){return Cx(Tv(e,t))}const $l=BigInt(0),Zi=BigInt(1);BigInt(2);const Y4=BigInt(3),oX=BigInt(4);function aX(e){const t=iX(e),{Fp:n}=t,r=M9(t.n,t.nBitLength),i=t.toBytes||((F,$,z)=>{const V=$.toAffine();return Z5(Uint8Array.from([4]),n.toBytes(V.x),n.toBytes(V.y))}),s=t.fromBytes||(F=>{const $=F.subarray(1),z=n.fromBytes($.subarray(0,n.BYTES)),V=n.fromBytes($.subarray(n.BYTES,2*n.BYTES));return{x:z,y:V}});function o(F){const{a:$,b:z}=t,V=n.sqr(F),K=n.mul(V,F);return n.add(n.add(K,n.mul(F,$)),z)}function a(F,$){const z=n.sqr($),V=o(F);return n.eql(z,V)}if(!a(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=n.mul(n.pow(t.a,Y4),oX),d=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(c,d)))throw new Error("bad curve params: a or b");function h(F){return m9(F,Zi,t.n)}function y(F){const{allowedPrivateKeyLengths:$,nByteLength:z,wrapPrivateKey:V,n:K}=t;if($&&typeof F!="bigint"){if(Sv(F)&&(F=Cx(F)),typeof F!="string"||!$.includes(F.length))throw new Error("invalid private key");F=F.padStart(z*2,"0")}let te;try{te=typeof F=="bigint"?F:Ip(Ga("private key",F,z))}catch{throw new Error("invalid private key, expected hex or "+z+" bytes, got "+typeof F)}return V&&(te=Ro(te,K)),gy("private key",te,Zi,K),te}
61function g(F){if(!(F instanceof S))throw new Error("ProjectivePoint expected")}const x=qC((F,$)=>{const{px:z,py:V,pz:K}=F;if(n.eql(K,n.ONE))return{x:z,y:V};const te=F.is0();$==null&&($=te?n.ONE:n.inv(K));const Q=n.mul(z,$),ee=n.mul(V,$),ne=n.mul(K,$);if(te)return{x:n.ZERO,y:n.ZERO};if(!n.eql(ne,n.ONE))throw new Error("invZ was invalid");return{x:Q,y:ee}}),_=qC(F=>{if(F.is0()){if(t.allowInfinityPoint&&!n.is0(F.py))return;throw new Error("bad point: ZERO")}const{x:$,y:z}=F.toAffine();if(!n.isValid($)||!n.isValid(z))throw new Error("bad point: x or y not FE");if(!a($,z))throw new Error("bad point: equation left != right");if(!F.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class S{constructor($,z,V){if($==null||!n.isValid($))throw new Error("x required");if(z==null||!n.isValid(z)||n.is0(z))throw new Error("y required");if(V==null||!n.isValid(V))throw new Error("z required");this.px=$,this.py=z,this.pz=V,Object.freeze(this)}static fromAffine($){const{x:z,y:V}=$||{};if(!$||!n.isValid(z)||!n.isValid(V))throw new Error("invalid affine point");if($ instanceof S)throw new Error("projective point not allowed");const K=te=>n.eql(te,n.ZERO);return K(z)&&K(V)?S.ZERO:new S(z,V,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ($){const z=GP(n,$.map(V=>V.pz));return $.map((V,K)=>V.toAffine(z[K])).map(S.fromAffine)}static fromHex($){const z=S.fromAffine(s(Ga("pointHex",$)));return z.assertValidity(),z}static fromPrivateKey($){return S.BASE.multiply(y($))}static msm($,z){return rX(S,r,$,z)}_setWindowSize($){D.setWindowSize(this,$)}assertValidity(){_(this)}hasEvenY(){const{y:$}=this.toAffine();if(n.isOdd)return!n.isOdd($);throw new Error("Field doesn't support isOdd")}equals($){g($);const{px:z,py:V,pz:K}=this,{px:te,py:Q,pz:ee}=$,ne=n.eql(n.mul(z,ee),n.mul(te,K)),J=n.eql(n.mul(V,ee),n.mul(Q,K));return ne&&J}negate(){return new S(this.px,n.neg(this.py),this.pz)}double(){const{a:$,b:z}=t,V=n.mul(z,Y4),{px:K,py:te,pz:Q}=this;let ee=n.ZERO,ne=n.ZERO,J=n.ZERO,M=n.mul(K,K),m=n.mul(te,te),E=n.mul(Q,Q),C=n.mul(K,te);return C=n.add(C,C),J=n.mul(K,Q),J=n.add(J,J),ee=n.mul($,J),ne=n.mul(V,E),ne=n.add(ee,ne),ee=n.sub(m,ne),ne=n.add(m,ne),ne=n.mul(ee,ne),ee=n.mul(C,ee),J=n.mul(V,J),E=n.mul($,E),C=n.sub(M,E),C=n.mul($,C),C=n.add(C,J),J=n.add(M,M),M=n.add(J,M),M=n.add(M,E),M=n.mul(M,C),ne=n.add(ne,M),E=n.mul(te,Q),E=n.add(E,E),M=n.mul(E,C),ee=n.sub(ee,M),J=n.mul(E,m),J=n.add(J,J),J=n.add(J,J),new S(ee,ne,J)}add($){g($);const{px:z,py:V,pz:K}=this,{px:te,py:Q,pz:ee}=$;let ne=n.ZERO,J=n.ZERO,M=n.ZERO;const m=t.a,E=n.mul(t.b,Y4);let C=n.mul(z,te),N=n.mul(V,Q),P=n.mul(K,ee),B=n.add(z,V),O=n.add(te,Q);B=n.mul(B,O),O=n.add(C,N),B=n.sub(B,O),O=n.add(z,K);let j=n.add(te,ee);return O=n.mul(O,j),j=n.add(C,P),O=n.sub(O,j),j=n.add(V,K),ne=n.add(Q,ee),j=n.mul(j,ne),ne=n.add(N,P),j=n.sub(j,ne),M=n.mul(m,O),ne=n.mul(E,P),M=n.add(ne,M),ne=n.sub(N,M),M=n.add(N,M),J=n.mul(ne,M),N=n.add(C,C),N=n.add(N,C),P=n.mul(m,P),O=n.mul(E,O),N=n.add(N,P),P=n.sub(C,P),P=n.mul(m,P),O=n.add(O,P),C=n.mul(N,O),J=n.add(J,C),C=n.mul(j,O),ne=n.mul(B,ne),ne=n.sub(ne,C),C=n.mul(B,N),M=n.mul(j,M),M=n.add(M,C),new S(ne,J,M)}subtract($){return this.add($.negate())}is0(){return this.equals(S.ZERO)}wNAF($){return D.wNAFCached(this,$,S.normalizeZ)}multiplyUnsafe($){const{endo:z,n:V}=t;gy("scalar",$,$l,V);const K=S.ZERO;if($===$l)return K;if(this.is0()||$===Zi)return this;if(!z||D.hasPrecomputes(this))return D.wNAFCachedUnsafe(this,$,S.normalizeZ);let{k1neg:te,k1:Q,k2neg:ee,k2:ne}=z.splitScalar($),J=K,M=K,m=this;for(;Q>$l||ne>$l;)Q&Zi&&(J=J.add(m)),ne&Zi&&(M=M.add(m)),m=m.double(),Q>>=Zi,ne>>=Zi;return te&&(J=J.negate()),ee&&(M=M.negate()),M=new S(n.mul(M.px,z.beta),M.py,M.pz),J.add(M)}multiply($){const{endo:z,n:V}=t;gy("scalar",$,Zi,V);let K,te;if(z){const{k1neg:Q,k1:ee,k2neg:ne,k2:J}=z.splitScalar($);let{p:M,f:m}=this.wNAF(ee),{p:E,f:C}=this.wNAF(J);M=D.constTimeNegate(Q,M),E=D.constTimeNegate(ne,E),E=new S(n.mul(E.px,z.beta),E.py,E.pz),K=M.add(E),te=m.add(C)}else{const{p:Q,f:ee}=this.wNAF($);K=Q,te=ee}return S.normalizeZ([K,te])[0]}multiplyAndAddUnsafe($,z,V){const K=S.BASE,te=(ee,ne)=>ne===$l||ne===Zi||!ee.equals(K)?ee.multiplyUnsafe(ne):ee.multiply(ne),Q=te(this,z).add(te($,V));return Q.is0()?void 0:Q}toAffine($){return x(this,$)}isTorsionFree(){const{h:$,isTorsionFree:z}=t;if($===Zi)return!0;
61if(z)return z(S,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:$,clearCofactor:z}=t;return $===Zi?this:z?z(S,this):this.multiplyUnsafe(t.h)}toRawBytes($=!0){return kx("isCompressed",$),this.assertValidity(),i(S,this,$)}toHex($=!0){return kx("isCompressed",$),Cx(this.toRawBytes($))}}S.BASE=new S(t.Gx,t.Gy,n.ONE),S.ZERO=new S(n.ZERO,n.ONE,n.ZERO);const{endo:I,nBitLength:L}=t,D=nX(S,I?Math.ceil(L/2):L);return{CURVE:t,ProjectivePoint:S,normPrivateKeyToScalar:y,weierstrassEquation:o,isWithinCurveOrder:h}}function cX(e){const t=JP(e);return i3(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function uX(e){const t=cX(e),{Fp:n,n:r,nByteLength:i,nBitLength:s}=t,o=n.BYTES+1,a=2*n.BYTES+1;function c(E){return Ro(E,r)}function d(E){return pS(E,r)}const{ProjectivePoint:h,normPrivateKeyToScalar:y,weierstrassEquation:g,isWithinCurveOrder:x}=aX({...t,toBytes(E,C,N){const P=C.toAffine(),B=n.toBytes(P.x),O=Z5;return kx("isCompressed",N),N?O(Uint8Array.from([C.hasEvenY()?2:3]),B):O(Uint8Array.from([4]),B,n.toBytes(P.y))},fromBytes(E){const C=E.length,N=E[0],P=E.subarray(1);if(C===o&&(N===2||N===3)){const B=Ip(P);if(!m9(B,Zi,n.ORDER))throw new Error("Point is not on curve");const O=g(B);let j;try{j=n.sqrt(O)}catch(X){const re=X instanceof Error?": "+X.message:"";throw new Error("Point is not on curve"+re)}const v=(j&Zi)===Zi;return(N&1)===1!==v&&(j=n.neg(j)),{x:B,y:j}}else if(C===a&&N===4){const B=n.fromBytes(P.subarray(0,n.BYTES)),O=n.fromBytes(P.subarray(n.BYTES,2*n.BYTES));return{x:B,y:O}}else{const B=o,O=a;throw new Error("invalid Point, expected length of "+B+", or uncompressed "+O+", got "+C)}}});function _(E){const C=r>>Zi;return E>C}function S(E){return _(E)?c(-E):E}const I=(E,C,N)=>Ip(E.slice(C,N));class L{constructor(C,N,P){gy("r",C,Zi,r),gy("s",N,Zi,r),this.r=C,this.s=N,P!=null&&(this.recovery=P),Object.freeze(this)}static fromCompact(C){const N=i;return C=Ga("compactSignature",C,N*2),new L(I(C,0,N),I(C,N,2*N))}static fromDER(C){const{r:N,s:P}=Ll.toSig(Ga("DER",C));return new L(N,P)}assertValidity(){}addRecoveryBit(C){return new L(this.r,this.s,C)}recoverPublicKey(C){const{r:N,s:P,recovery:B}=this,O=K(Ga("msgHash",C));if(B==null||![0,1,2,3].includes(B))throw new Error("recovery id invalid");const j=B===2||B===3?N+t.n:N;if(j>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const v=(B&1)===0?"02":"03",k=h.fromHex(v+K4(j,n.BYTES)),X=d(j),re=c(-O*X),ue=c(P*X),pe=h.BASE.multiplyAndAddUnsafe(k,re,ue);if(!pe)throw new Error("point at infinify");return pe.assertValidity(),pe}hasHighS(){return _(this.s)}normalizeS(){return this.hasHighS()?new L(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Y5(this.toDERHex())}toDERHex(){return Ll.hexFromSig(this)}toCompactRawBytes(){return Y5(this.toCompactHex())}toCompactHex(){const C=i;return K4(this.r,C)+K4(this.s,C)}}const D={isValidPrivateKey(E){try{return y(E),!0}catch{return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{const E=ZP(t.n);return JZ(t.randomBytes(E),t.n)},precompute(E=8,C=h.BASE){return C._setWindowSize(E),C.multiply(BigInt(3)),C}};function F(E,C=!0){return h.fromPrivateKey(E).toRawBytes(C)}function $(E){if(typeof E=="bigint")return!1;if(E instanceof h)return!0;const N=Ga("key",E).length,P=n.BYTES,B=P+1,O=2*P+1;if(!(t.allowedPrivateKeyLengths||i===B))return N===B||N===O}function z(E,C,N=!0){if($(E)===!0)throw new Error("first arg must be private key");if($(C)===!1)throw new Error("second arg must be public key");return h.fromHex(C).multiply(y(E)).toRawBytes(N)}const V=t.bits2int||function(E){if(E.length>8192)throw new Error("input is too large");const C=Ip(E),N=E.length*8-s;return N>0?C>>BigInt(N):C},K=t.bits2int_modN||function(E){return c(V(E))},te=r3(s);function Q(E){return gy("num < 2^"+s,E,$l,te),Tv(E,i)}function ee(E,C,N=ne){if(["recovered","canonical"].some(Ce=>Ce in N))throw new Error("sign() legacy options not supported");const{hash:P,randomBytes:B}=t;let{lowS:O,prehash:j,extraEntropy:v}=N;O==null&&(O=!0),E=Ga("msgHash",E),u7(N),j&&(E=Ga("prehashed msgHash",P(E)));const k=K(E),X=y(C),re=[Q(X),Q(k)];if(v!=null&&v!==!1){const Ce=v===!0?B(n.BYTES):v;re.push(Ga("extraEntropy",Ce))}const ue=Z5(...re),pe=k;function we(Ce){const St=V(Ce);if(!x(St))return;const Ve=d(St),et=h.BASE.multiply(St).toAffine(),lt=c(et.x);if(lt===$l)return;const tt=c(Ve*c(pe+lt*X));if(tt===$l)return;let ut=(et.x===lt?0:2)|Number(et.y&Zi),nr=tt;return O&&_(tt)&&(nr=S(tt),ut^=1),new L(lt,nr,ut)}return{seed:ue,k2sig:we}}const ne={lowS:t.lowS,prehash:!1},J={lowS:t.lowS,prehash:!1};function M(E,C,N=ne){const{seed:P,k2sig:B}=ee(E,C,N),O=t;return oK(O.hash.outputLen,O.nByteLength,O.hmac)(P,B)}h.BASE._setWindowSize(8);function m(E,C,N,P=J){const B=E;C=Ga("msgHash",C),N=Ga("publicKey",N);const{lowS:O,prehash:j,format:v}=P;if(u7(P),"strict"in P)throw new Error("options.strict was renamed to lowS");if(v!==void 0&&v!=="compact"&&v!=="der")throw new Error("format must be compact or der");
vendor: 2,157 bytes, line 61
61const k=typeof B=="string"||Sv(B),X=!k&&!v&&typeof B=="object"&&B!==null&&typeof B.r=="bigint"&&typeof B.s=="bigint";if(!k&&!X)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let re,ue;try{if(X&&(re=new L(B.r,B.s)),k){try{v!=="compact"&&(re=L.fromDER(B))}catch(ut){if(!(ut instanceof Ll.Err))throw ut}!re&&v!=="der"&&(re=L.fromCompact(B))}ue=h.fromHex(N)}catch{return!1}if(!re||O&&re.hasHighS())return!1;j&&(C=t.hash(C));const{r:pe,s:we}=re,Ce=K(C),St=d(we),Ve=c(Ce*St),et=c(pe*St),lt=h.BASE.multiplyAndAddUnsafe(ue,Ve,et)?.toAffine();return lt?c(lt.x)===pe:!1}return{CURVE:t,getPublicKey:F,getSharedSecret:z,sign:M,verify:m,ProjectivePoint:h,Signature:L,utils:D}}function lX(e){return{hash:e,hmac:(t,...n)=>zP(e,t,bW(...n)),randomBytes:xW}}function dX(e,t){const n=r=>uX({...e,...lX(r)});return{...n(t),create:n}}const eO=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),l7=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),fX=BigInt(0),hX=BigInt(1),yS=BigInt(2),d7=(e,t)=>(e+t/yS)/t;function pX(e){const t=eO,n=BigInt(3),r=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),d=e*e*e%t,h=d*d*e%t,y=Ha(h,n,t)*h%t,g=Ha(y,n,t)*h%t,x=Ha(g,yS,t)*d%t,_=Ha(x,i,t)*x%t,S=Ha(_,s,t)*_%t,I=Ha(S,a,t)*S%t,L=Ha(I,c,t)*I%t,D=Ha(L,a,t)*S%t,F=Ha(D,n,t)*h%t,$=Ha(F,o,t)*_%t,z=Ha($,r,t)*d%t,V=Ha(z,yS,t);if(!gS.eql(gS.sqr(V),e))throw new Error("Cannot find square root");return V}const gS=M9(eO,void 0,void 0,{sqrt:pX}),tO=dX({a:fX,b:BigInt(7),Fp:gS,n:l7,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=l7,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-hX*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,o=BigInt("0x100000000000000000000000000000000"),a=d7(s*e,t),c=d7(-r*e,t);let d=Ro(e-a*n-c*i,t),h=Ro(-a*r-c*s,t);const y=d>o,g=h>o;
61if(y&&(d=t-d),g&&(h=t-h),d>o||h>o)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:y,k1:d,k2neg:g,k2:h}}}},jj),mX=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:tO},Symbol.toStringTag,{value:"Module"}));function nO(e,t={}){const{recovered:n}=t;if(typeof e.r>"u")throw new Z4({signature:e});if(typeof e.s>"u")throw new Z4({signature:e});if(n&&typeof e.yParity>"u")throw new Z4({signature:e});if(e.r<0n||e.r>r7)throw new EX({value:e.r});if(e.s<0n||e.s>r7)throw new _X({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new j9({value:e.yParity})}function yX(e){return rO(Bc(e))}function rO(e){if(e.length!==130&&e.length!==132)throw new wX({signature:e});const t=BigInt($u(e,0,32)),n=BigInt($u(e,32,64)),r=(()=>{const i=+`0x${e.slice(130)}`;if(!Number.isNaN(i))try{return N9(i)}catch{throw new j9({value:i})}})();return typeof r>"u"?{r:t,s:n}:{r:t,s:n,yParity:r}}function gX(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return bX(e)}function bX(e){const t=typeof e=="string"?rO(e):e instanceof Uint8Array?yX(e):typeof e.r=="string"?vX(e):e.v?xX(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return nO(t),t}function xX(e){return{r:e.r,s:e.s,yParity:N9(e.v)}}function vX(e){const t=(()=>{const n=e.v?Number(e.v):void 0;let r=e.yParity?Number(e.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=N9(n)),typeof r!="number")throw new j9({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function N9(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new SX({value:e})}class wX extends Hn{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${ha(MK(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class Z4 extends Hn{constructor({signature:t}){super(`Signature \`${Qj(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class EX extends Hn{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class _X extends Hn{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class j9 extends Hn{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class SX extends Hn{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function TX(e,t={}){return typeof e.chainId=="string"?AX(e):{...e,...t.signature}}function AX(e){const{address:t,chainId:n,nonce:r}=e,i=gX(e);return{address:t,chainId:Number(n),nonce:BigInt(r),...i}}const kX="0x8010801080108010801080108010801080108010801080108010801080108010",CX=FP("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function iO(e){if(typeof e=="string"){if($u(e,-32)!==kX)throw new MX(e)}else nO(e.authorization)}function IX(e){iO(e);const t=rP($u(e,-64,-32)),n=$u(e,-t-64,-64),r=$u(e,0,-t-64),[i,s,o]=UZ(CX,n);return{authorization:TX({address:i.delegation,chainId:Number(i.chainId),nonce:i.nonce,yParity:i.yParity,r:i.r,s:i.s}),signature:r,...o&&o!=="0x"?{data:o,to:s}:{}}}function RX(e){try{return iO(e),!0}catch{return!1}}let MX=class extends Hn{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};class NX extends Ye{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function pa(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new NX({value:e});let[n,r="0"]=e.split(".");const i=n.startsWith("-");if(i&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),t===0)Math.round(+`.${r}`)===1&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>t){const[s,o,a]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],c=Math.round(+`${o}.${a}`);c>9?r=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):r=`${s}${c}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${i?"-":""}${n}${r}`)}function fd(e,t="wei"){return pa(e,xj[t])}async function P9(e,{blockHash:t,blockNumber:n,blockTag:r,hash:i,index:s}){const o=r||"latest",a=n!==void 0?ot(n):void 0;let c=null;if(i?c=await e.request({method:"eth_getTransactionByHash",params:[i]},{dedupe:!0}):t?c=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,ot(s)]},{dedupe:!0}):c=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||o,ot(s)]},{dedupe:!!a}),!c)throw new vj({blockHash:t,blockNumber:n,blockTag:o,hash:i,index:s});return(e.chain?.formatters?.transaction?.format||Ev)(c,"getTransaction")}async function T5(e,{hash:t}){const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new wj({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||gP)(n,"getTransactionReceipt")}async function jX(e,t){const{account:n,authorizationList:r,allowFailure:i=!0,blockNumber:s,blockOverrides:o,blockTag:a,stateOverride:c}=t,d=t.contracts,{batchSize:h=t.batchSize??1024,deployless:y=t.deployless??!1}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},g=(()=>
61{if(t.multicallAddress)return t.multicallAddress;if(y)return null;if(e.chain)return lP({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),x=[[]];let _=0,S=0;for(let D=0;D<d.length;D++){const{abi:F,address:$,args:z,functionName:V}=d[D];try{const K=Ms({abi:F,args:z,functionName:V});S+=(K.length-2)/2,h>0&&S>h&&x[_].length>0&&(_++,S=(K.length-2)/2,x[_]=[]),x[_]=[...x[_],{allowFailure:!0,callData:K,target:$}]}catch(K){const te=tg(K,{abi:F,address:$,args:z,docsPath:"/docs/contract/multicall",functionName:V,sender:n});if(!i)throw te;x[_]=[...x[_],{allowFailure:!0,callData:"0x",target:$}]}}const I=await Promise.allSettled(x.map(D=>cr(e,a3,"readContract")({...g===null?{code:g9}:{address:g},abi:X5,account:n,args:[D],authorizationList:r,blockNumber:s,blockOverrides:o,blockTag:a,functionName:"aggregate3",stateOverride:c}))),L=[];for(let D=0;D<I.length;D++){const F=I[D];if(F.status==="rejected"){if(!i)throw F.reason;for(let z=0;z<x[D].length;z++)L.push({status:"failure",error:F.reason,result:void 0});continue}const $=F.value;for(let z=0;z<$.length;z++){const{returnData:V,success:K}=$[z],{callData:te}=x[D][z],{abi:Q,address:ee,functionName:ne,args:J}=d[L.length];try{if(te==="0x")throw new mv;if(!K)throw new e3({data:V});const M=_v({abi:Q,args:J,data:V,functionName:ne});L.push(i?{result:M,status:"success"}:M)}catch(M){const m=tg(M,{abi:Q,address:ee,args:J,docsPath:"/docs/contract/multicall",functionName:ne});if(!i)throw m;L.push({error:m,result:void 0,status:"failure"})}}}if(L.length!==d.length)throw new Ye("multicall results mismatch");return L}async function PX(e,t){const{blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",blocks:i,returnFullTransactions:s,traceTransfers:o,validation:a}=t;try{const c=[];for(const g of i){const x=g.blockOverrides?oP(g.blockOverrides):void 0,_=g.calls.map(I=>{const L=I,D=L.account?co(L.account):void 0,F=L.abi?Ms(L):L.data,$={...L,account:D,data:L.dataSuffix?Hu([F||"0x",L.dataSuffix]):F,from:L.from??D?.address};return wv($),xv($)}),S=g.stateOverrides?a9(g.stateOverrides):void 0;c.push({blockOverrides:x,calls:_,stateOverrides:S})}const h=(typeof n=="bigint"?ot(n):void 0)||r;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:s,traceTransfers:o,validation:a},h]})).map((g,x)=>({...u9(g),calls:g.calls.map((_,S)=>{const{abi:I,args:L,functionName:D,to:F}=i[x].calls[S],$=_.error?.data??_.returnData,z=BigInt(_.gasUsed),V=_.logs?.map(ee=>qj(ee)),K=_.status==="0x1"?"success":"failure",te=I&&K==="success"&&$!=="0x"?_v({abi:I,data:$,functionName:D}):null,Q=(()=>{if(K==="success")return;let ee;if(_.error?.data==="0x"?ee=new mv:_.error&&(ee=new e3(_.error)),!!ee)return tg(ee,{abi:I??[],address:F??"0x",args:L,functionName:D??"<unknown>"})})();return{data:$,gasUsed:z,logs:V,status:K,...K==="success"?{result:te}:{error:Q}}})}))}catch(c){const d=c,h=t3(d,{});throw h instanceof bv?d:h}}function bS(e){let t=!0,n="",r=0,i="",s=!1;for(let o=0;o<e.length;o++){const a=e[o];if(["(",")",","].includes(a)&&(t=!0),a==="("&&r++,a===")"&&r--,!!t){if(r===0){if(a===" "&&["event","function","error",""].includes(i))i="";else if(i+=a,a===")"){s=!0;break}continue}if(a===" "){e[o-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}i+=a,n+=a}}if(!s)throw new Hn("Unable to normalize signature.");return i}function xS(e,t){const n=typeof e,r=t.type;switch(r){case"address":return dS(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((i,s)=>xS(Object.values(e)[s],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(i=>xS(i,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function sO(e,t,n){for(const r in e){const i=e[r],s=t[r];
61if(i.type==="tuple"&&s.type==="tuple"&&"components"in i&&"components"in s)return sO(i.components,s.components,n[r]);const o=[i.type,s.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?dS(n[r],{strict:!1}):o.includes("address")&&o.includes("bytes")?dS(n[r],{strict:!1}):!1)return o}}function oO(e,t={}){const{prepare:n=!0}=t,r=Array.isArray(e)||typeof e=="string"?e7(e):e;return{...r,...n?{hash:dy(r)}:{}}}function u3(e,t,n){const{args:r=[],prepare:i=!0}=n??{},s=NK(t,{strict:!1}),o=e.filter(d=>s?d.type==="function"||d.type==="error"?aO(d)===$u(t,0,4):d.type==="event"?dy(d)===t:!1:"name"in d&&d.name===t);if(o.length===0)throw new J5({name:t});if(o.length===1)return{...o[0],...i?{hash:dy(o[0])}:{}};let a;for(const d of o){if(!("inputs"in d))continue;if(!r||r.length===0){if(!d.inputs||d.inputs.length===0)return{...d,...i?{hash:dy(d)}:{}};continue}if(!d.inputs||d.inputs.length===0||d.inputs.length!==r.length)continue;if(r.every((y,g)=>{const x="inputs"in d&&d.inputs[g];return x?xS(y,x):!1})){if(a&&"inputs"in a&&a.inputs){const y=sO(d.inputs,a.inputs,r);if(y)throw new LX({abiItem:d,type:y[0]},{abiItem:a,type:y[1]})}a=d}}const c=(()=>{if(a)return a;const[d,...h]=o;return{...d,overloads:h}})();if(!c)throw new J5({name:t});return{...c,...i?{hash:dy(c)}:{}}}function aO(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return u3(n,r)}return e[0]})();return $u(dy(t),0,4)}function OX(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,i]=e;return u3(r,i)}return e[0]})(),n=typeof t=="string"?t:uS(t);return bS(n)}function dy(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return u3(n,r)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:OP(y9(OX(t)))}class LX extends Hn{constructor(t,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${bS(uS(t.abiItem))}\`, and`,`\`${n.type}\` in \`${bS(uS(n.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:"AbiItem.AmbiguityError"})}}class J5 extends Hn{constructor({name:t,data:n,type:r="item"}){const i=t?` with name "${t}"`:n?` with data "${n}"`:"";super(`ABI ${r}${i} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function BX(...e){const[t,n]=(()=>{if(Array.isArray(e[0])){const[s,o]=e;return[DX(s),o]}return e})(),{bytecode:r,args:i}=n;return Lc(r,t.inputs?.length&&i?.length?I9(t.inputs,i):"0x")}function FX(e){return oO(e)}function DX(e){const t=e.find(n=>n.type==="constructor");if(!t)throw new J5({name:"constructor"});return t}function $X(...e){const[t,n=[]]=(()=>{if(Array.isArray(e[0])){const[d,h,y]=e;return[f7(d,h,{args:y}),y]}const[a,c]=e;return[a,c]})(),{overloads:r}=t,i=r?f7([t,...r],t.name,{args:n}):t,s=zX(i),o=n.length>0?I9(i.inputs,n):void 0;return o?Lc(s,o):s}function UX(e,t={}){return oO(e,t)}function f7(e,t,n){const r=u3(e,t,n);if(r.type!=="function")throw new J5({name:t,type:"function"});return r}function zX(e){return aO(e)}const VX="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Pn="0x0000000000000000000000000000000000000000",qX="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function HX(e,t){const{blockNumber:n,blockTag:r,calls:i,stateOverrides:s,traceAssetChanges:o,traceTransfers:a,validation:c}=t,d=t.account?co(t.account):void 0;d&&BX(FX("constructor(bytes, bytes)"),{bytecode:cP,args:[qX,$X(UX("function getBalance(address)"),[d.address])]});const h=[],y=await PX(e,{blockNumber:n,blockTag:r,blocks:[{calls:[...i,{}].map(N=>({...N,from:d?.address})),stateOverrides:s}],traceTransfers:a,validation:c}),g=o?y[2]:y[0],[x,_,,S,I,L,D,F]=[],{calls:$,...z}
61=g,V=$.slice(0,-1)??[],K=x?.calls??[],te=_?.calls??[],Q=[...K,...te].map(N=>N.status==="success"?ni(N.data):null),ee=S?.calls??[],ne=I?.calls??[],J=[...ee,...ne].map(N=>N.status==="success"?ni(N.data):null),M=(L?.calls??[]).map(N=>N.status==="success"?N.result:null),m=(F?.calls??[]).map(N=>N.status==="success"?N.result:null),E=(D?.calls??[]).map(N=>N.status==="success"?N.result:null),C=[];for(const[N,P]of J.entries()){const B=Q[N];if(typeof P!="bigint"||typeof B!="bigint")continue;const O=M[N-1],j=m[N-1],v=E[N-1],k=N===0?{address:VX,decimals:18,symbol:"ETH"}:{address:h[N-1],decimals:v||O?Number(O??1):void 0,symbol:j??void 0};C.some(X=>X.token.address===k.address)||C.push({token:k,value:{pre:B,post:P,diff:P-B}})}return{assetChanges:C,block:z,results:V}}const cO="0x6492649264926492649264926492649264926492649264926492649264926492";function WX(e){if($u(e,-32)!==cO)throw new YX(e)}function GX(e){const{data:t,signature:n,to:r}=e;return Lc(I9(FP("address, bytes, bytes"),[r,t,n]),cO)}function KX(e){try{return WX(e),!0}catch{return!1}}class YX extends Hn{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}function ZX({r:e,s:t,to:n="hex",v:r,yParity:i}){const s=(()=>{if(i===0||i===1)return i;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),o=`0x${new tO.Signature(ni(e),ni(t)).toCompactHex()}${s===0?"1b":"1c"}`;return n==="hex"?o:Oc(o)}async function XX(e,t){const{address:n,hash:r,erc6492VerifierAddress:i=t.universalSignatureVerifierAddress??e.chain?.contracts?.erc6492Verifier?.address,multicallAddress:s=t.multicallAddress??e.chain?.contracts?.multicall3?.address}=t,o=(()=>{const a=t.signature;return nd(a)?a:typeof a=="object"&&"r"in a&&"s"in a?ZX(a):hs(a)})();try{return RX(o)?await QX(e,{...t,multicallAddress:s,signature:o}):await JX(e,{...t,verifierAddress:i,signature:o})}catch(a){try{if(K5(Qi(n),await Tj({hash:r,signature:o})))return!0}catch{}if(a instanceof Fp)return!1;throw a}}async function QX(e,t){const{address:n,blockNumber:r,blockTag:i,hash:s,multicallAddress:o}=t,{authorization:a,data:c,signature:d,to:h}=IX(t.signature);if(await wP(e,{address:n,blockNumber:r,blockTag:i})===Ea(["0xef0100",a.address]))return await eQ(e,{address:n,blockNumber:r,blockTag:i,hash:s,signature:d});const g={address:a.address,chainId:Number(a.chainId),nonce:Number(a.nonce),r:ot(a.r,{size:32}),s:ot(a.s,{size:32}),yParity:a.yParity};if(!await xY({address:n,authorization:g}))throw new Fp;const _=await cr(e,a3,"readContract")({...o?{address:o}:{code:g9},authorizationList:[g],abi:X5,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:!0,target:h??n,callData:c}]:[],{allowFailure:!0,target:n,callData:Ms({abi:aP,functionName:"isValidSignature",args:[s,d]})}]]});if(_[_.length-1]?.returnData?.startsWith("0x1626ba7e"))return!0;throw new Fp}async function JX(e,t){const{address:n,factory:r,factoryData:i,hash:s,signature:o,verifierAddress:a,...c}=t,d=await(async()=>!r&&!i||KX(o)?o:GX({data:i,signature:o,to:r}))(),h=a?{to:a,data:Ms({abi:KC,functionName:"isValidSig",args:[n,s,d]}),...c}:{data:b9({abi:KC,args:[n,s,d],bytecode:FK}),...c},{data:y}=await cr(e,o3,"call")(h).catch(g=>{throw g instanceof Ej?new Fp:g});if(JH(y??"0x0"))return!0;throw new Fp}async function eQ(e,t){const{address:n,blockNumber:r,blockTag:i,hash:s,signature:o}=t;if((await cr(e,a3,"readContract")({address:n,abi:aP,args:[s,o],blockNumber:r,blockTag:i,functionName:"isValidSignature"}).catch(c=>{throw c instanceof r9?new Fp:c})).startsWith("0x1626ba7e"))return!0;throw new Fp}class Fp extends Error{}async function tQ(e,{address:t,message:n,factory:r,factoryData:i,signature:s,...o}){const a=kY(n);return XX(e,{address:t,factory:r,factoryData:i,hash:a,signature:s,...o})}function uO(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:i,poll:s,pollingInterval:o=e.pollingInterval}){const a=typeof s<"u"?s:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].c
61onfig.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let c;return a?(()=>{const y=la(["watchBlockNumber",e.uid,t,n,o]);return Ix(y,{onBlockNumber:r,onError:i},g=>v9(async()=>{try{const x=await cr(e,hP,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(x===c)return;if(x-c>1&&n)for(let _=c+1n;_<x;_++)g.onBlockNumber(_,c),c=_}(c===void 0||x>c)&&(g.onBlockNumber(x,c),c=x)}catch(x){g.onError?.(x)}},{emitOnBegin:t,interval:o}))})():(()=>{const y=la(["watchBlockNumber",e.uid,t,n]);return Ix(y,{onBlockNumber:r,onError:i},g=>{let x=!0,_=()=>x=!1;return(async()=>{try{const S=(()=>{if(e.transport.type==="fallback"){const L=e.transport.transports.find(D=>D.config.type==="webSocket"||D.config.type==="ipc");return L?L.value:e.transport}return e.transport})(),{unsubscribe:I}=await S.subscribe({params:["newHeads"],onData(L){if(!x)return;const D=ni(L.result?.number);g.onBlockNumber(D,c),c=D},onError(L){g.onError?.(L)}});_=I,x||_()}catch(S){i?.(S)}})(),()=>_()})})()}async function nQ(e,t){const{checkReplacement:n=!0,confirmations:r=1,hash:i,onReplaced:s,retryCount:o=6,retryDelay:a=({count:z})=>~~(1<<z)*200,timeout:c=18e4}=t,d=la(["waitForTransactionReceipt",e.uid,i]),h=t.pollingInterval?t.pollingInterval:e.chain?.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval;let y,g,x,_=!1,S,I;const{promise:L,resolve:D,reject:F}=x9(),$=c?setTimeout(()=>{I?.(),S?.(),F(new vG({hash:i}))},c):void 0;return S=Ix(d,{onReplaced:s,resolve:D,reject:F},async z=>{if(x=await cr(e,T5,"getTransactionReceipt")({hash:i}).catch(()=>{}),x&&r<=1){clearTimeout($),z.resolve(x),S?.();return}I=cr(e,uO,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:h,async onBlockNumber(V){const K=Q=>{clearTimeout($),I?.(),Q(),S?.()};let te=V;if(!_)try{if(x){if(r>1&&(!x.blockNumber||te-x.blockNumber+1n<r))return;K(()=>z.resolve(x));return}if(n&&!y&&(_=!0,await Rx(async()=>{y=await cr(e,P9,"getTransaction")({hash:i}),y.blockNumber&&(te=y.blockNumber)},{delay:a,retryCount:o}),_=!1),x=await cr(e,T5,"getTransactionReceipt")({hash:i}),r>1&&(!x.blockNumber||te-x.blockNumber+1n<r))return;K(()=>z.resolve(x))}catch(Q){if(Q instanceof vj||Q instanceof wj){if(!y){_=!1;return}try{g=y,_=!0;const ee=await Rx(()=>cr(e,Du,"getBlock")({blockNumber:te,includeTransactions:!0}),{delay:a,retryCount:o,shouldRetry:({error:M})=>M instanceof Cj});_=!1;const ne=ee.transactions.find(({from:M,nonce:m})=>M===g.from&&m===g.nonce);if(!ne||(x=await cr(e,T5,"getTransactionReceipt")({hash:ne.hash}),r>1&&(!x.blockNumber||te-x.blockNumber+1n<r)))return;let J="replaced";ne.to===g.to&&ne.value===g.value&&ne.input===g.input?J="repriced":ne.from===ne.to&&ne.value===0n&&(J="cancelled"),K(()=>{z.onReplaced?.({reason:J,replacedTransaction:g,transaction:ne,transactionReceipt:x}),z.resolve(x)})}catch(ee){K(()=>z.reject(ee))}}else K(()=>z.reject(Q))}}})}),L}function rQ(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:i,onError:s,includeTransactions:o,poll:a,pollingInterval:c=e.pollingInterval}){const d=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].c
61onfig.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=o??!1;let y;return d?(()=>{const _=la(["watchBlocks",e.uid,t,n,r,h,c]);return Ix(_,{onBlock:i,onError:s},S=>v9(async()=>{try{const I=await cr(e,Du,"getBlock")({blockTag:t,includeTransactions:h});if(I.number!==null&&y?.number!=null){if(I.number===y.number)return;if(I.number-y.number>1&&n)for(let L=y?.number+1n;L<I.number;L++){const D=await cr(e,Du,"getBlock")({blockNumber:L,includeTransactions:h});S.onBlock(D,y),y=D}}(y?.number==null||t==="pending"&&I?.number==null||I.number!==null&&I.number>y.number)&&(S.onBlock(I,y),y=I)}catch(I){S.onError?.(I)}},{emitOnBegin:r,interval:c}))})():(()=>{let _=!0,S=!0,I=()=>_=!1;return(async()=>{try{r&&cr(e,Du,"getBlock")({blockTag:t,includeTransactions:h}).then(F=>{_&&S&&(i(F,void 0),S=!1)}).catch(s);const L=(()=>{if(e.transport.type==="fallback"){const F=e.transport.transports.find($=>$.config.type==="webSocket"||$.config.type==="ipc");return F?F.value:e.transport}return e.transport})(),{unsubscribe:D}=await L.subscribe({params:["newHeads"],async onData(F){if(!_)return;const $=await cr(e,Du,"getBlock")({blockNumber:F.result?.number,includeTransactions:h}).catch(()=>{});_&&(i($,y),S=!1,y=$)},onError(F){s?.(F)}});I=D,_||I()}catch(L){s?.(L)}})(),()=>I()})()}async function iQ(e,t={}){const{account:n=e.account,chainId:r}=t,i=n?co(n):void 0,s=r?[i?.address,[ot(r)]]:[i?.address],o=await e.request({method:"wallet_getCapabilities",params:s}),a={};for(const[c,d]of Object.entries(o)){a[Number(c)]={};for(let[h,y]of Object.entries(d))h==="addSubAccount"&&(h="unstable_addSubAccount"),a[Number(c)][h]=y}return typeof r=="number"?a[r]:a}async function sQ(e,{account:t=e.account,message:n}){if(!t)throw new w9({docsPath:"/docs/actions/wallet/signMessage"});const r=co(t);if(r.signMessage)return r.signMessage({message:n});const i=typeof n=="string"?jp(n):n.raw instanceof Uint8Array?eo(n.raw):n.raw;return e.request({method:"personal_sign",params:[i,r.address]},{retryCount:0})}function l3({key:e,methods:t,name:n,request:r,retryCount:i=3,retryDelay:s=150,timeout:o,type:a},c){const d=vP();return{config:{key:e,methods:t,name:n,request:r,retryCount:i,retryDelay:s,timeout:o,type:a},request:wY(r,{methods:t,retryCount:i,retryDelay:s,uid:d}),value:c}}function oQ(e,t={}){const{key:n="custom",methods:r,name:i="Custom Provider",retryDelay:s}=t;return({retryCount:o})=>l3({key:n,methods:r,name:i,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:s,type:"custom"})}class aQ extends Ye{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function vS(e,t={}){const{batch:n,fetchFn:r,fetchOptions:i,key:s="http",methods:o,name:a="HTTP JSON-RPC",onFetchRequest:c,onFetchResponse:d,retryDelay:h,raw:y}=t;return({chain:g,retryCount:x,timeout:_})=>{const{batchSize:S=1e3,wait:I=0}=typeof n=="object"?n:{},L=t.retryCount??x,D=_??t.timeout??1e4,F=e||g?.rpcUrls.default.http[0];if(!F)throw new aQ;const $=SY(F,{fetchFn:r,fetchOptions:i,onRequest:c,onResponse:d,timeout:D});return l3({key:s,methods:o,name:a,async request({method:z,params:V}){const K={method:z,params:V},{schedule:te}=dP({id:F,wait:I,shouldSplitBatch(J){return J.length>S},fn:J=>$.request({body:J}),sort:(J,M)=>J.id-M.id}),Q=async J=>n?te(J):[await $.request({body:J})],[{error:ee,result:ne}]=await Q(K);if(y)return{error:ee,result:ne};if(ee)throw new i9({body:K,error:ee,url:F});return ne},retryCount:L,retryDelay:h,timeout:D,type:"http"},{fetchOptions:i,url:F})}}const lO={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},cQ={block:Mj({format(e){return{transactions:e.transactions?.map(n=>{if(typeof n=="string")return n;const r=Ev(n);return r.typeHex==="0x7e"&&(r.isSystemTx=n.isSystemTx,r.mint=n.mint?ni(n.mint):void 0,r.sourceHash=n.sourceHash,r.type="deposit"),r}),stateRoot:e.stateRoot}}}),transaction:Rj({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?ni(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:nY({format(e){return{l1GasPrice:e.l1GasPrice?ni(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?ni(e.l1GasUsed):null,l1Fee:e.l1Fee?ni(e.l1Fee):null,l1FeeScalar:e.l
611FeeScalar?Number(e.l1FeeScalar):null}}})};function dO(e,t){return dQ(e)?lQ(e):fY(e,t)}const uQ={transaction:dO};function lQ(e){fQ(e);const{sourceHash:t,data:n,from:r,gas:i,isSystemTx:s,mint:o,to:a,value:c}=e,d=[t,r,a??"0x",o?eo(o):"0x",c?eo(c):"0x",i?eo(i):"0x",s?"0x1":"0x",n??"0x"];return Ea(["0x7e",rd(d)])}function dQ(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function fQ(e){const{from:t,to:n}=e;if(t&&!Sr(t))throw new Ps({address:t});if(n&&!Sr(n))throw new Ps({address:n})}const Ii={blockTime:2e3,contracts:lO,formatters:cQ,serializers:uQ},Tb=1,Ja=Sa({...Ii,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...Ii.contracts,disputeGameFactory:{[Tb]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[Tb]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[Tb]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[Tb]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:Tb});({...Ja});const hQ={estimateFeesPerGas:async e=>{if(!e.request?.feeCurrency)return null;const[t,n]=await Promise.all([pQ(e.client,e.request.feeCurrency),mQ(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-n)+n,maxPriorityFeePerGas:n}}};async function pQ(e,t){const n=await e.request({method:"eth_gasPrice",params:[t]});return BigInt(n)}async function mQ(e,t){const n=await e.request({method:"eth_maxPriorityFeePerGas",params:[t]});return BigInt(n)}function fO(e){return e===0||e===0n||e===void 0||e===null||e==="0"||e===""||typeof e=="string"&&(io(e).toLowerCase()==="0x"||io(e).toLowerCase()==="0x00")}function Kb(e){return!fO(e)}function yQ(e){return typeof e.maxFeePerGas<"u"&&typeof e.maxPriorityFeePerGas<"u"}function hO(e){return e.type==="cip64"?!0:yQ(e)&&Kb(e.feeCurrency)}const gQ={block:Mj({format(e){return{transactions:e.transactions?.map(n=>typeof n=="string"?n:{...Ev(n),...n.gatewayFee?{gatewayFee:ni(n.gatewayFee),gatewayFeeRecipient:n.gatewayFeeRecipient}:{},feeCurrency:n.feeCurrency})}}}),transaction:Rj({format(e){if(e.type==="0x7e")return{isSystemTx:e.isSystemTx,mint:e.mint?ni(e.mint):void 0,sourceHash:e.sourceHash,type:"deposit"};const t={feeCurrency:e.feeCurrency};return e.type==="0x7b"?t.type="cip64":(e.type==="0x7c"&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?ni(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:LG({format(e){const t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),hO(e)&&(t.type="0x7b"),t}})};function bQ(e,t){return hO(e)?vQ(e,t):dO(e,t)}const xQ={transaction:bQ};function vQ(e,t){EQ(e);const{chainId:n,gas:r,nonce:i,to:s,value:o,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:d,feeCurrency:h,data:y}=e,g=[eo(n),i?eo(i):"0x",c?eo(c):"0x",a?eo(a):"0x",r?eo(r):"0x",s??"0x",o?eo(o):"0x",y??"0x",Cv(d),h,...Cg(e,t)];return Ea(["0x7b",rd(g)])}const wQ=vv;function EQ(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:s,feeCurrency:o}=e;if(t<=0)throw new kv({chainId:t});if(s&&!Sr(s))throw new Ps({address:s});if(r)throw new Ye("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(Kb(i)&&i>wQ)throw new Yf({maxFeePerGas:i});if(Kb(n)&&Kb(i)&&n>i)throw new ng({maxFeePerGas:i,maxPriorityFeePerGas:n});if(Kb(o)&&!Sr(o))throw new Ye("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(fO(o))throw new Ye("`feeCurrency` must be provided for CIP-64 transactions.")}const _Q={blockTime:1e3,contracts:lO,formatters:gQ,serializers:xQ,fees:hQ},Dp=Sa({..._Q,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1}),G2=1,SQ=Sa({...Ii,id:252,name:"Fraxtal",nativeCurrency:{name:"Frax",symbol:"FRAX",decimals:18}
61,rpcUrls:{default:{http:["https://rpc.frax.com"]}},blockExplorers:{default:{name:"fraxscan",url:"https://fraxscan.com",apiUrl:"https://api.fraxscan.com/api"}},contracts:{...Ii.contracts,l2OutputOracle:{[G2]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[G2]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[G2]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:G2}),K2=1,TQ=Sa({...Ii,id:57073,name:"Ink",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel.inkonchain.com","https://rpc-qnd.inkonchain.com"],webSocket:["wss://rpc-gel.inkonchain.com","wss://rpc-qnd.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.inkonchain.com",apiUrl:"https://explorer.inkonchain.com/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},...Ii.contracts,disputeGameFactory:{[K2]:{address:"0x10d7b35078d3baabb96dd45a9143b94be65b12cd"}},portal:{[K2]:{address:"0x5d66c1782664115999c47c9fa5cd031f495d3e4f"}},l1StandardBridge:{[K2]:{address:"0x88ff1e5b602916615391f55854588efcbb7663f0"}}},testnet:!1,sourceId:K2}),Y2=1,AQ=Sa({...Ii,id:1135,name:"Lisk",network:"lisk",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.lisk.com",apiUrl:"https://blockscout.lisk.com/api"}},contracts:{...Ii.contracts,multicall3:{address:"0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0"},l2OutputOracle:{[Y2]:{address:"0x113cB99283AF242Da0A0C54347667edF531Aa7d6"}},portal:{[Y2]:{address:"0x26dB93F8b8b4f7016240af62F7730979d353f9A7"}},l1StandardBridge:{[Y2]:{address:"0x2658723Bf70c7667De6B25F99fcce13A16D25d08"}}},sourceId:Y2}),O9=Sa({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Z2=1,kQ=Sa({...Ii,id:1750,name:"Metal L2",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.metall2.com"],webSocket:["wss://rpc.metall2.com"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.metall2.com",apiUrl:"https://explorer.metall2.com/api"}},contracts:{...Ii.contracts,l2OutputOracle:{[Z2]:{address:"0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},portal:{[Z2]:{address:"0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956"}},l1StandardBridge:{[Z2]:{address:"0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3"}}},sourceId:Z2}),X2=1,CQ=Sa({...Ii,id:34443,name:"Mode Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.mode.network"]}},blockExplorers:{default:{name:"Modescan",url:"https://modescan.io"}},contracts:{...Ii.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2465882},l2OutputOracle:{[X2]:{address:"0x4317ba146D4933D889518a3e5E11Fe7a53199b04"}},portal:{[X2]:{address:"0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07"}},l1StandardBridge:{[X2]:{address:"0x735aDBbE72226BD52e818E7181953f42E3b0FF21"}}},sourceId:X2}),Ab=1,o0=Sa({...Ii,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...Ii.contracts,disputeGameFactory:{[Ab]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[Ab]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[Ab]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[Ab]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:Ab}),kb=1,IQ=Sa({...Ii,id:1868,name:"Soneium Mainnet",nativeCurrency:{name:"Ether",symbol
61:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium.blockscout.com",apiUrl:"https://soneium.blockscout.com/api"}},contracts:{...Ii.contracts,disputeGameFactory:{[kb]:{address:"0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0"}},l2OutputOracle:{[kb]:{address:"0x0000000000000000000000000000000000000000"}},portal:{[kb]:{address:"0x88e529a6ccd302c948689cd5156c83d4614fae92",blockCreated:7061266}},l1StandardBridge:{[kb]:{address:"0xeb9bf100225c214efc3e7c651ebbadcf85177607",blockCreated:7061266}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},sourceId:kb}),Cb=1,RQ=Sa({...Ii,id:5330,name:"Superseed",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Explorer",url:"https://explorer.superseed.xyz",apiUrl:"https://explorer.superseed.xyz/api/v2"}},contracts:{...Ii.contracts,disputeGameFactory:{[Cb]:{address:"0x8b097CF1f9BbD9cbFD0DD561858a1FCbC8857Be0",blockCreated:20737481}},l2OutputOracle:{[Cb]:{address:"0x693A0F8854F458D282DE3C5b69E8eE5EEE8aA949",blockCreated:20737481}},portal:{[Cb]:{address:"0x2c2150aa5c75A24fB93d4fD2F2a895D618054f07",blockCreated:20737481}},l1StandardBridge:{[Cb]:{address:"0x8b0576E39F1233679109F9b40cFcC2a7E0901Ede",blockCreated:20737481}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:Cb}),Q2=1,MQ=Sa({...Ii,id:130,name:"Unichain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://mainnet.unichain.org/"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz",apiUrl:"https://api.uniscan.xyz/api"}},contracts:{...Ii.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Q2]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[Q2]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[Q2]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:Q2}),NQ={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_ALM_PROVIDER:"Runtime Global S.A.",VITE_ALM_TERMS:"https://runtimelabs.xyz/legal-notice",VITE_APP_NAME:"Aerodrome",VITE_APP_NAME_LOWER:"aerodrome",VITE_APP_TOKEN:"0x940181a94a35a4569e4529a3cdfb74e38fd98631",VITE_BANNER:"aero-banner.png",VITE_BASE_BUILDER_CODE:"62635f7239717a66386f700b0080218021802180218021802180218021",VITE_CHAIN_IDS:"8453",VITE_CONNECTOR_TOKENS_10:"0x9560e827af36c94d2ac33a39bce1fe78631088db,0x4200000000000000000000000000000000000042,0x4200000000000000000000000000000000000006,0x9bcef72be871e61ed4fbbc7630889bee758eb81d,0x2e3d870790dc77a83dd1d18184acc7439a53f475,0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9,0x1f32b1c2345538c0c6f582fcb022739c4a194ebb,0xbfd291da8a403daaf7e5e9dc1ec0aceacd4848b9,0xc3864f98f2a61a7caeb95b039d031b4e2f55e0e9,0x9485aca5bbbe1667ad97c7fe7c4531a624c8b1ed,0xda10009cbd5d07dd0cecc66161fc93d7c9000da1,0x73cb180bf0521828d8849bc8cf2b920918e23032,0x6806411765af15bddd26f8f544a34cc40cb9838b,0x6c2f7b6110a37b3b0fbdd811876be368df02e8b0,0xc5b001dc33727f8f26880b184090d3e252470d45,0x6c84a8f1c29108f47a79964b5fe888d4f4d0de40,0xc40f949f8a4e094d1b49a23ea9241d289b7b2819,0x94b008aa00579c1307b0ef2c499ad98a8ce58e58,0x0b2c639c533813f4aa9d7837caf62653d097ff85",VITE_CONNECTOR_TOKENS_8453:"0xfde4c96c8593536e31f229ea8f37b2ada2699bb2,0x833589fcd6edb6e08f4c7c32d4f71b54bda02913,0x940181a94a35a4569e4529a3cdfb74e38fd98631,0x50c5725949a6f0c72e6c4a641f24049a917db0cb,0x4621b7a9c75199271f773ebd9a499dbd165c3191,0x4200000000000000000000000000000000000006,0xb79dd08ea68a908a97220c76d19a6aa9cbde4376,0xcfa3ef56d303ae4faaba0592388f19d7c3399fb4,0xcb327b99ff831bf8223cced12b1338ff3aa322ff,0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22,0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452,0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42,0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca,0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf,0xdd468a1ddc392dcdbef6db6e34e89aa338f9f186,0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b",VITE_CONVERT_SUSDT_TOKENS:"8453:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913=0xe92e51d99ae33114c60d9621fb2e1ec0acea7e30",VITE_CSP_FRAME:"https://verify.walletconnect.org/",VITE_CSP_IMG:"https://raw.githubusercontent.com data: blob:",VITE_CSP_SCRIPT:"",VITE_CSP_STYLE:"",VITE_DEFAULT_SLIPPAGE:"1.0",V
61ITE_DEFAULT_SWAP_MINUTES:"10",VITE_DEFAULT_TOKENS_8453:"0x940181a94a35a4569e4529a3cdfb74e38fd98631,eth",VITE_DEFAULT_TOKEN_ORDER:"WETH,AERO,USDC,cbBTC",VITE_ECOSYSTEM:"Base",VITE_EXPLORER_CHAIN_IDS:"",VITE_EXTERNAL_CHAIN_IDS:"10",VITE_FACTORY_ADDRESS_10:"0xF1046053aa5682b4F9a81b5481394DA16BE5FF5a",VITE_FACTORY_ADDRESS_8453:"0x420DD381b31aEf6683db6B902084cB0FFECe40Da",VITE_FC_META:"miniapp",VITE_FEATURE_FLAGS:"v2,relay,cl,vapr,alm,batched-txs,skip-batch-sim,tx-suffix",VITE_HIGHLIGHTED_POOLS:"",VITE_HL_EXPLORER:"https://explorer.hyperlane.xyz/?search=",VITE_HL_HEALTH_URL:"https://offchain-lookup.services.hyperlane.xyz/health",VITE_HL_RELAYERS:"0x74Cae0ECC47B02Ed9B9D32E000Fd70B9417970C5,0x09B96417602Ed6AC76651F7A8c4860E60e3aA6d0",VITE_HL_RELAY_URL:"https://offchain-lookup.services.hyperlane.xyz/callCommitments/calls",VITE_ICA_ADDRESS_8453:"0x44647Cd983E80558793780f9a0c7C2aa9F384D07",VITE_LABEL:"AERO",VITE_LAUNCHER_LANDING_PAGE_TOKENS:"VIRTUAL,KTA,AERO,cbBTC,cbXRP,cbDOGE,cbADA,cbLTC,GIZA,MAMO",VITE_LAUNCH_TOKENS:"",VITE_LOCKER_IMPL_ADDRESS:"0xfe678BFfC3C1c8D1De4478CC5C3e1b93EE4638aE",VITE_LP_SUGAR_ADDRESS_10:"0x347512180804A8B40AA7525AE932a31198F074aA",VITE_LP_SUGAR_ADDRESS_8453:"0x69dD9db6d8f8E7d83887A704f447b1a584b599A1",VITE_MAX_RESERVE_DEVIATION:"1000000000000000",VITE_MESSAGE_BRIDGE_ADDRESS:"0xF278761576f45472bdD721EACA19317cE159c011",VITE_MESSAGE_MODULE_ADDRESS:"0x2BbA7515F7cF114B45186274981888D8C2fBA15E",VITE_MIGRATOR_ADDRESS_8453:"0x4Ab4313D12D3c17Dd172dCd9453105EB3d775f42",VITE_MINTER_ADDRESS_10:"0x6dc9E1C04eE59ed3531d73a72256C0da46D10982",VITE_MINTER_ADDRESS_8453:"0xeB018363F0a9Af8f91F06FEe6613a751b2A33FE5",VITE_NATIVE_TOKEN_LOGO:"/tokens/ETH.svg",VITE_NFPM_ADDRESS_10:"0xf7f8ccce99Ca2896eC75D3A399D152dB96808399",VITE_NFPM_ADDRESS_8453:"0xe1f8cd9AC4e4A65F54f38a5CdAfCA44f6dD68b53",VITE_OLD_SLIPSTREAM_FACTORY_ADDRESS_10:"0xCc0bDDB707055e04e497aB22a59c2aF4391cd12F",VITE_OLD_SLIPSTREAM_FACTORY_ADDRESS_8453:"0x5e7BB104d84c7CB9B682AaC2F3d509f5F406809A",VITE_OPEN_USDT_TOKEN:"0x1217bfe6c773eec6cc4a38b5dc45b92292b6e189",VITE_OP_TOKEN:"0x4200000000000000000000000000000000000042",VITE_POOL_LAUNCHER_CL_ADDRESS:"0x3C890c7454C17410E49E035F6C4755c4E2012b4b",VITE_POOL_LAUNCHER_V2_ADDRESS:"0xA81eEbdEb3129bf5B89AEd89EDe9eC5fB6FDE3B3",VITE_POOL_PLACEHOLDER_TYPES:"-1,0,1,10,50,80,100,150,200,500,2000",VITE_PRICES_ADDRESS_10:"0x58238e3d556226defE35d3056335f48938707324",VITE_PRICES_ADDRESS_8453:"0xfbC91Fc9C6E70Afbea84b69FB0bF5EBa7F90aaFd",VITE_PRICE_MAPS:"10:0x4200000000000000000000000000000000000042=0xafcc6ae807187a31e84138f3860d4ce27973e01b,10:0x4200000000000000000000000000000000000042=0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca",VITE_PRICE_THRESHOLD_FILTER:"10",VITE_QUOTER_ADDRESS_10:"0xAf6EBdf4c70061C5961994Ae9c9956fBc2bCC32E",VITE_QUOTER_ADDRESS_8453:"0xCd2A7D98e82D6107eac1828ce8DeAA6acB65b555",VITE_QUOTER_STABLE_POOL_FILLER:"2097152",VITE_QUOTER_VOLATILE_POOL_FILLER:"4194304",VITE_RELAYS_HIDE_IDS:"9605,10296",VITE_RELAYS_PINNED_IDS:"10298",VITE_RELAY_SUGAR_ADDRESS_10:"0x5197Eb73253EF90E2089ad7308E572Ea6898c8D7",VITE_RELAY_SUGAR_ADDRESS_8453:"0x3dd0849D66DBd63D06f11442502e200601c50790",VITE_REWARDS_SUGAR_ADDRESS_10:"0x62CCFB2496f49A80B0184AD720379B529E9152fB",VITE_REWARDS_SUGAR_ADDRESS_8453:"0x1b121EfDaF4ABb8785a315C51D29BCE0552A7678",VITE_ROUTER_ADDRESS_10:"0xa062aE8A9c5e11aaA026fc2670B0D65cCc8B2858",VITE_ROUTER_ADDRESS_8453:"0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43",VITE_RPC_URIS_10:"https://lb.drpc.live/optimism/Avibgvi26EjPsw76UtdwmsQOcPkUJIUR8YARurWHF38a:1,https://opt-mainnet.g.alchemy.com/v2/4aBLuZOavL1N3YUWe8c9ylHandj-Ez4f:0",VITE_RPC_URIS_8453:"https://lb.drpc.live/base/Avibgvi26EjPsw76UtdwmsQOcPkUJIUR8YARurWHF38a:1,https://base-mainnet.g.alchemy.com/v2/NueAMkvMI625bpEhxN6_-:0",VITE_SAFE_PI:"3.0",VITE_SLIPSTREAM_FACTORY_ADDRESS_10:"0xe13Dd1fbA721Aa81a1826D9523AC9BC7d260c879",VITE_SLIPSTREAM_FACTORY_ADDRESS_8453:"0xf8f2eB4940CFE7d13603DDDD87f123820Fc061Ef",VITE_SLIPSTREAM_SUGAR_ADDRESS_10:"0xD45624bf2CB9f65ecbdF3067d21992b099b56202",VITE_SLIPSTREAM_SUGAR_ADDRESS_8453:"0x9c62ab10577fB3C20A22E231b7703Ed6D456CC7a",VITE_SOLANA_RPC_URL:"https://lb.drpc.live/solana/Avibgvi26EjPsw76UtdwmsQ-HuQB0FUR8K6aOmy9-kY5",VITE_STABLE_TOKEN_10:"0x7f5c764cbc14f9669b88837ca1490cca17c31607",VITE_STABLE_TOKEN_8453:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",VITE_STOCK_POOLS:"8453:0x853F5f1B92b16714Fe6CDA67CAad0856B83C7ab9,8453:0xA3b1E3f9747065e2073722Ff4c9027d3eA4994F0,8453:0xB1987CAD1682841b4b641d50E520777eC5Ab5542,8453:0xEAF57753BC382E0324a1D43F72E7027705a2273E,8453:0xe942B86f5c6d4a780fd673317Ee7E565d25aB7F3,8453:0x20E5fAd2661Ee9Eb0c04824524030AF31943B62D,8453:0x25F63549b2Bb9ffF114cDc39e8cfb16B450E2f9b,8453:0xD5B83c33A8711e727C0Abb6f72ee508755D37e10,8453:0xd03Bc8C7F2FAedCe2aac81bF0444AEA08Ea06E9b,8453:0x7103eB3c9590d1281f7dc03b2A9EE27C39dF5D54,8453:0x8b27f626ab668197000BC722A1012022CAeD10E2,8453:0x5A8236f575471e7BfCA2C8462a200c28f737246E,8453:0x0bf58fe0FAc935Ac69595c19B12Ba0d75E3F8c0E,8453:0x469337fDcc5E8f38e2E4B670B04F57865D13a7BB",VITE_STOCK_TOKENS:"8453:0xb20000000000000000000078ee7ce2fE4908108C,8453:0xb2000000000000000000008bC8786B856E61707C,8453:0xb200000000000000000000C2e324d24d7eEcd1fb,8453:0xb2000000000000000000002D0BA3164cc74f58B7,8453:0xCEF8Db49E456f872E288E1C042F916E9ceD7c781",VITE_TOKEN_ASSETS_CDN:"https://raw.githubusercontent.com/SmolDapp/tokenAssets/main/tokens",VITE_TOKEN_SYMBOL_0x102d758f688a4c1c5a80b116bd945d4455460282:"USDT0",VITE_TOKEN_SYMBOL_0x7f5c764cbc14f9669b88837ca1490cca17c31607:"USDC.e",VITE_TOKEN_SYMBOL_0xa1a0b2e02b0e6830ad5a4a7211691200945d8919:"TEA",VITE_TOKEN_SYMBOL_0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca:"OP",VITE_TOKEN_SYMBOL_0xafcc6ae807187a31e84138f3860d4ce27973e01b:"OP",VITE_TOKEN_SYMBOL_0xbce0af241a9c06778968ce1d3782c61d9a9c7c32:"METEORA",VITE_TOKEN_SYMBOL_0xde5ed76e7c05ec5e4572cfc88d1acea165109e44:"DEUS FINANCE",VITE_TOLERATED_SERVER_TIMESTAMP_DIFFERENCE:"30",VITE_TWITTER_HANDLE:"@aeroxyz",VITE_UNCLAIMABLE_TOKENS:"",VITE_UNIVERSAL_ROUTER_ADDRESS_10:"0xcAF22ce31298CF2BF1D152862F80216478ad7c67",VITE_UNIVERSAL_ROUTER_ADDRESS_8453:"0xcAF22ce31298CF2BF1D152862F80216478ad7c67",VITE_UNSAFE_PI:"3.0",VITE_UNSAFE_TOKENS_8453:"0x74ccbe53f77b08632ce0cb91d3a545bf6b8e0979,0x8901cb2e82cc95c01e42206f8d1f417fe53e7af0,0x9cbd543f1b1166b2df36b68eb6bb1dce24e6abdf,0x025f99977db78317a4eba606998258b502bb256f,0xd260115030b9fb6849da169a01ed80b6496d1e99,0
61x608d5401d377228e465ba6113517dcf9bd1f95ca,0xd260115030b9fb6849da169a01ed80b6496d1e99,0x728cda34d732a87fd6429129e23d4742d9ff0064,0x728cda34d732a87fd6429129e23d4742d9ff0064,0xac1bd2486aaf3b5c0fc3fd868558b082a531b2b4,0x0f929c29dce303f96b1d4104505f2e60ee795cac,0x47e78d664e6c339693e8638b7a7d9543abcc99d4,0xff0c532fdb8cd566ae169c1cb157ff2bdc83e105,0x373504da48418c67e6fcd071f33cb0b3b47613c7,0x0f929c29dce303f96b1d4104505f2e60ee795cac,0x628c5ba9b775dacecd14e237130c537f497d1cc7",VITE_USDT_BRIDGE_ADDRESS_8453:"0x4F0654395d621De4d1101c0F98C1Dba73ca0a61f",VITE_VE_ADDRESS_10:"0xFAf8FD17D9840595845582fCB047DF13f006787d",VITE_VE_ADDRESS_8453:"0xeBf418Fe2512e7E6bd9b87a8F0f294aCDC67e6B4",VITE_VE_SUGAR_ADDRESS_10:"0x94f913362b232e31daB49a1aFB775cfd25DaA6a1",VITE_VE_SUGAR_ADDRESS_8453:"0x4c5d3925fe65DFeB5A079485136e4De09cb664A5",VITE_VOTER_ADDRESS_10:"0x41C914ee0c7E1A5edCD0295623e6dC557B5aBf3C",VITE_VOTER_ADDRESS_8453:"0x16613524e02ad97eDfeF371bC883F2F5d6C480A5",VITE_WALLETCONNECT_PROJECT_ID:"a1ea2a919a3465f5a79109a93fa032fb",VITE_WRAPPED_NATIVE_TOKEN_10:"0x4200000000000000000000000000000000000006",VITE_WRAPPED_NATIVE_TOKEN_8453:"0x4200000000000000000000000000000000000006",VITE_XOP_BRIDGE:"0xac6A6080E002D2803959242C0FE10050C482D214",VITE_XOP_BRIDGE_V2:"0xfFCA1231d43Cf55B58d62627fD171ab1293C3050",VITE_XOP_TOKEN:"0xafcc6ae807187a31e84138f3860d4ce27973e01b",VITE_XOP_TOKEN_V2:"0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca"},jQ=[o0,CQ,AQ,kQ,SQ,TQ,IQ,RQ,MQ,Dp,Ja,O9];function pO(e,t,n){return n?e:`${e}_${t.id}`}function PQ(e,t){const n=NQ,i=(typeof window<"u"&&window.localStorage.getItem("customRPCs")?JSON.parse(window.localStorage.getItem("customRPCs")||"{}"):{})[e.id];return{rpcs:n[`VITE_RPC_URIS_${e.id}`].split(",").map(s=>[s.slice(0,s.lastIndexOf(":")),parseInt(s.slice(s.lastIndexOf(":")+1))]),customRpc:i,sugar:n[`VITE_LP_SUGAR_ADDRESS_${e.id}`],rewardsSugar:n[`VITE_REWARDS_SUGAR_ADDRESS_${e.id}`],router:n[`VITE_ROUTER_ADDRESS_${e.id}`],universalRouter:n[`VITE_UNIVERSAL_ROUTER_ADDRESS_${e.id}`],factory:n[`VITE_FACTORY_ADDRESS_${e.id}`],oracle:n[`VITE_PRICES_ADDRESS_${e.id}`],stable:n[`VITE_STABLE_TOKEN_${e.id}`],quoter:n[`VITE_QUOTER_ADDRESS_${e.id}`],nfpm:n[`VITE_NFPM_ADDRESS_${e.id}`],slipstreamSugar:n[`VITE_SLIPSTREAM_SUGAR_ADDRESS_${e.id}`],slipstreamFactory:n[`VITE_SLIPSTREAM_FACTORY_ADDRESS_${e.id}`]||n[`VITE_SLIPSTREAM_FACTORY_ADDRESS_${t}`],oldSlipstreamFactory:n[`VITE_OLD_SLIPSTREAM_FACTORY_ADDRESS_${e.id}`],migrator:n[`VITE_MIGRATOR_ADDRESS_${e.id}`],usdtBridge:n[`VITE_USDT_BRIDGE_ADDRESS_${e.id}`],interchainAccount:n[`VITE_ICA_ADDRESS_${e.id}`],nativeWrapped:(n[`VITE_WRAPPED_NATIVE_TOKEN_${e.id}`]||n[`VITE_WRAPPED_NATIVE_TOKEN_${t}`]).toLowerCase(),nativeERC20:n[`VITE_NATIVE_ERC20_${e.id}`],weth:n[`VITE_WETH_ADDRESS_${e.id}`]?.toLowerCase(),oracleConnectors:String(n[`VITE_CONNECTOR_TOKENS_${e.id}`]).split(","),defaultTokens:String(n[`VITE_DEFAULT_TOKENS_${e.id}`]).split(","),unsafeTokens:String(n[`VITE_UNSAFE_TOKENS_${e.id}`]).split(",")}}function d3(e){const n=e.map(r=>jQ.find(i=>i.id===r)).filter(Boolean).map(r=>{const i=r.name.replace("Mainnet","").trim(),s=PQ(r,ma[0]),o={...r,superchainConfig:s,name:i.toLowerCase()==="op"?"OP Mainnet":i};return BO.includes(r.id)&&(o.blockExplorers={default:{name:"Superscan",url:"https://thesuperscan.io"}}),o});return[n,en.keyBy(n,"id")]}const mO=({digits:e,roundingMode:t,extend:n}={})=>({useGrouping:!0,roundingMode:t??"trunc",minimumFractionDigits:e??5,maximumFractionDigits:e??5,...n??{}});function yO(e,{maxDecimals:t,minDecimals:n}={}){return e.toLocaleString("en-US",{useGrouping:!1,roundingMode:"trunc",minimumFractionDigits:n??0,maximumFractionDigits:t??16})}function L9(e,t){return e.nativeCurrency.symbol.toLowerCase()===t?.address&&!Sr(t.address)&&t.chainId===e.id}function Ic(e){return ec(e,{size:32})}const OQ=1e7;function B9(e,t,{digits:n}={}){const r=Number(Ns(e,t));return r.toLocaleString("en-US",mO({digits:n??(r>=10?2:5),extend:{minimumFractionDigits:1,notation:r<OQ?"standard":"compact",compactDisplay:"short"}}))}function f3(e,t,n){const r=e<pa("10",t)?n||5:2;return B9(e,t,{digits:r})}function wf(e){return e==null?"":typeof e=="string"||typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?e.toString():e instanceof Promise?"":"props"in e?wf(e.props.children):Array.from(e).map(wf).join(`
62`)}function h7(e,t,n){const r=e.indexOf(t),i=e.indexOf(n),s=r!==-1,o=i!==-1;if(s&&o){if(r!==i)return r-i}else if(s!==o)return s?-1:1}function LQ(e){const t=new Uint8Array(e);return window.crypto.getRandomValues(t).join("").slice(0,e)}function ig(e){return e.filter(t=>t!=null)}function BQ(e,t){if(!t.includes("ousdt-mint"))return{superchainKeys:[],map:{}};const n={},r=[];return e.split(",").forEach(i=>
62{const s=i.split("="),o=s[0],a=s[1],c=o.split(":")[1];n[c]=a,r.push(o)}),{superchainKeys:r,map:n}}function FQ(e){const t={},n=[];return e.split(",").forEach(r=>{const i=r.split("="),s=i[0],o=i[1],a=s.split(":")[1];t[o]=a,n.push(s)}),{superchainKeys:n,map:t}}function DQ(e){return{bridgeTokensByChain:{},bridgeByChain:{}}}function F9(e){if(!e)return[];const t={};return e.split(",").forEach(n=>{const r=n.split(":"),i=Number(r[0]),s=r[1];t[i]||(t[i]=[]),t[i].push(s)}),t}function $Q(e){return[]}const X4=1n<<32n,UQ=2n**96n,gO=UQ**2n;BigInt(Number.MAX_SAFE_INTEGER-1);const bO=2n**256n-1n,e6=887272,O6e="∞";function p7(e,t){const n=Math.round(e/t)*t;return n<-1*e6?n+t:n>e6?n-t:n}function zQ(e,t,n,r){const[i,s]=t?[r,n]:[n,r],o=1.0001**e/10**(s-i),a=1/o;return t?a:o}function L6e(e,t,n,r){const i=t?1/e:e,[s,o]=t?[r,n]:[n,r],a=i*Math.pow(10,o-s),c=Math.log(a)/Math.log(1.0001);return Math.floor(c)}function VQ(e,t=0){const n=10n**BigInt(t),r=t===0?e:e*n;let i=(r+1n)/2n,s=r;for(;i-s<0;)s=i,i=(r/i+i)/2n;return s}function qQ(e,t){return VQ(t*gO/e)}function B6e(e,t,n,r){if(e===0n)return 0n;const[i,s]=t?[r,n]:[n,r],o=10n**(BigInt(i)+BigInt(s)),c=e**2n*o/gO/(o/10n**BigInt(i));return c===0n?0n:t?o/c:c}function F6e(e,t,n,r){if(e===0)throw"price cannot be 0";const i=t?e:1/e,s=pa(yO(i),18),[o,a]=t?[r,n]:[n,r],c=Is(10n**BigInt(o),s,o,18,o),d=10n**BigInt(a);return qQ(c,d)}function D6e(e){function t(i,s){return i*s>>128n}const n=e<0?-e:e;let r=n&1?0xfffcb933bd6fad37aa2d162d1a594001n:0x100000000000000000000000000000000n;return n&2&&(r=t(r,0xfff97272373d413259a46990580e213an)),n&4&&(r=t(r,0xfff2e50f5f656932ef12357cf3c7fdccn)),n&8&&(r=t(r,0xffe5caca7e10e4e61c3624eaa0941cd0n)),n&16&&(r=t(r,0xffcb9843d60f6159c9db58835c926644n)),n&32&&(r=t(r,0xff973b41fa98c081472e6896dfb254c0n)),n&64&&(r=t(r,0xff2ea16466c96a3843ec78b326b52861n)),n&128&&(r=t(r,0xfe5dee046a99a2a811c461f1969c3053n)),n&256&&(r=t(r,0xfcbe86c7900a88aedcffc83b479aa3a4n)),n&512&&(r=t(r,0xf987a7253ac413176f2b074cf7815e54n)),n&1024&&(r=t(r,0xf3392b0822b70005940c7a398e4b70f3n)),n&2048&&(r=t(r,0xe7159475a2c29b7443b29c7fa6e889d9n)),n&4096&&(r=t(r,0xd097f3bdfd2022b8845ad8f792aa5825n)),n&8192&&(r=t(r,0xa9f746462d870fdf8a65dc1f90e061e5n)),n&16384&&(r=t(r,0x70d869a156d2a1b890bb3df62baf32f7n)),n&32768&&(r=t(r,0x31be135f97d08fd981231505542fcfa6n)),n&65536&&(r=t(r,0x9aa508b5b7a84e1c677de54f3e99bc9n)),n&131072&&(r=t(r,0x5d6af8dedb81196699c329225ee604n)),n&262144&&(r=t(r,0x2216e584f5fa1ea926041bedfe98n)),n&524288&&(r=t(r,0x48a170391f7dc42444e8fa2n)),e>0&&(r=bO/r),r%X4>0n?r/X4+1n:r/X4}function Zf(e,t,n,r="100"){if(n===0&&r==="100")return e;const[i,s=""]=yO(Number(r)).split("."),o=s.padEnd(t,"0").slice(0,t),a=BigInt(i+o),c=100n*10n**BigInt(t),d=e*a/c;return n===0||n==="0"?d:Is(e,1n,t,0,t)-Zf(d,t,0,n.toString())}function D9(e,t,n){return e===0n?0n:t*100n*10n**BigInt(n)/e}function Nx(e,t,n=18,r=18,i=18){if(e===0n||t===0n)return 0n;const s=t*10n**BigInt(n);return e*10n**(BigInt(r)+BigInt(i))/s}function Is(e,t,n=18,r=18,i=18){if(e===0n||t===0n)return 0n;const s=e*t*10n**BigInt(i),o=10n**(BigInt(n)+BigInt(r));return s/o}function HQ(e){if(typeof window>"u")return[];let t=[];try{const n=window.localStorage.getItem("disabledChains");t=n?JSON.parse(n):[]}catch(n){console.error("Error parsing disabledChains:",n)}return e.map(n=>n.id).filter(n=>!t.includes(n))}const WQ=[{type:"constructor",inputs:[{name:"_mailbox",internalType:"address",type:"address"},{name:"_hook",internalType:"address",type:"address"},{name:"_owner",internalType:"address",type:"address"},{name:"_commit_tx_gas_usage",internalType:"uint256",type:"uint256"},{name:"_commitment_urls",internalType:"string[]",type:"string[]"}],stateMutability:"nonpayable"},{type:"event",anonymous:!1,inputs:[{name:"commitment",internalType:"bytes32",type:"bytes32",indexed:!0}],name:"CommitRevealDispatched"},{type:"event",anonymous:!1,inputs:[{name:"_hook",internalType:"address",type:"address",indexed:!1}],name:"HookSet"},{type:"event",anonymous:!1,inputs:[{name:"version",internalType:"uint8",type:"uint8",indexed:!1}],name:"Initialized"},{type:"event",anonymous:!1,inputs:[{name:"account",internalType:"address",type:"address",indexed:!0},{name:"origin",internalType:"uint32",type:"uint32",indexed:!1}
62,{name:"router",internalType:"bytes32",type:"bytes32",indexed:!1},{name:"owner",internalType:"bytes32",type:"bytes32",indexed:!1},{name:"ism",internalType:"address",type:"address",indexed:!1},{name:"salt",internalType:"bytes32",type:"bytes32",indexed:!1}],name:"InterchainAccountCreated"},{type:"event",anonymous:!1,inputs:[{name:"_ism",internalType:"address",type:"address",indexed:!1}],name:"IsmSet"},{type:"event",anonymous:!1,inputs:[{name:"previousOwner",internalType:"address",type:"address",indexed:!0},{name:"newOwner",internalType:"address",type:"address",indexed:!0}],name:"OwnershipTransferred"},{type:"event",anonymous:!1,inputs:[{name:"destination",internalType:"uint32",type:"uint32",indexed:!0},{name:"owner",internalType:"address",type:"address",indexed:!0},{name:"router",internalType:"bytes32",type:"bytes32",indexed:!1},{name:"ism",internalType:"bytes32",type:"bytes32",indexed:!1},{name:"salt",internalType:"bytes32",type:"bytes32",indexed:!1}],name:"RemoteCallDispatched"},{type:"event",anonymous:!1,inputs:[{name:"domain",internalType:"uint32",type:"uint32",indexed:!0},{name:"ism",internalType:"bytes32",type:"bytes32",indexed:!1}],name:"RemoteIsmEnrolled"},{type:"function",inputs:[],name:"CCIP_READ_ISM",outputs:[{name:"",internalType:"contract CommitmentReadIsm",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"COMMIT_TX_GAS_USAGE",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"PACKAGE_VERSION",outputs:[{name:"",internalType:"string",type:"string"}],stateMutability:"view"},{type:"function",inputs:[],name:"bytecodeHash",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"view"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_calls",internalType:"struct CallLib.Call[]",type:"tuple[]",components:[{name:"to",internalType:"bytes32",type:"bytes32"},{name:"value",internalType:"uint256",type:"uint256"},{name:"data",internalType:"bytes",type:"bytes"}]},{name:"_hookMetadata",internalType:"bytes",type:"bytes"}],name:"callRemote",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"payable"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_calls",internalType:"struct CallLib.Call[]",type:"tuple[]",components:[{name:"to",internalType:"bytes32",type:"bytes32"},{name:"value",internalType:"uint256",type:"uint256"},{name:"data",internalType:"bytes",type:"bytes"}]}],name:"callRemote",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"payable"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_router",internalType:"bytes32",type:"bytes32"},{name:"_ism",internalType:"bytes32",type:"bytes32"},{name:"_ccipReadIsm",internalType:"bytes32",type:"bytes32"},{name:"_hookMetadata",internalType:"bytes",type:"bytes"},{name:"_hook",internalType:"contract IPostDispatchHook",type:"address"},{name:"_salt",internalType:"bytes32",type:"bytes32"},{name:"_commitment",internalType:"bytes32",type:"bytes32"}],name:"callRemoteCommitReveal",outputs:[{name:"_commitmentMsgId",internalType:"bytes32",type:"bytes32"},{name:"_revealMsgId",internalType:"bytes32",type:"bytes32"}],stateMutability:"payable"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_commitment",internalType:"bytes32",type:"bytes32"},{name:"_gasLimit",internalType:"uint256",type:"uint256"}],name:"callRemoteCommitReveal",outputs:[{name:"_commitmentMsgId",internalType:"bytes32",type:"bytes32"},{name:"_revealMsgId",internalType:"bytes32",type:"bytes32"}],stateMutability:"payable"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_router",internalType:"bytes32",type:"bytes32"},{name:"_ism",internalType:"bytes32",type:"bytes32"},{name:"_hookMetadata",internalType:"bytes",type:"bytes"},{name:"_hook",internalType:"contract IPostDispatchHook",type:"address"},{name:"_salt",internalType:"bytes32",type:"bytes32"},{name:"_commitment",internalType:"bytes32",type:"bytes32"}],name:"callRemoteCommitReveal",outputs:[{name:"_commitmentMsgId",internalType:"bytes32",type:"bytes32"},{name:"_revealMsgId",internalType:"bytes32",type:"bytes32"}],stateMutability:"payable"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_router",internalType:"bytes32",type:"bytes32"},{name:"_ism",internalType:"bytes32",type:"bytes32"},{name:"_calls",internalType:"struct CallLib.Call[]",type:"tuple[]",components:[{name:"to",internalType:"bytes32",type:"bytes32"},{name:"value",internalType:"uint256",type:"uint256"},{name:"data",internalType:"bytes",type:"bytes"}]},{name:"_hookMetadata",internalType:"bytes",type:"bytes"},{name:"_userSalt",internalType:"bytes32",type:"bytes32"}],name:"callRemoteWithOverrides",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"payable"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_router",internalType:"bytes32",type:"bytes32"},{name:"_ism",internalType:"bytes32",type:"bytes32"},{name:"_calls",internalType:"struct CallLib.Call[]",type:"tuple[]",components:[{name:"to",internalType:"bytes32",type:"bytes32"},{name:"value",internalType:"uint256",type:"uint256"},{name:"data",internalType:"bytes",type:"bytes"}]}],name:"callRemoteWithOverrides",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"payable"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_router",internalType:"bytes32",type:"bytes32"},{name:"_ism",internalType:"bytes32",type:"bytes32"},{name:"_calls",internalType:"struct CallLib.Call[]",type:"tuple[]",components:[{name:"to",internalType:"bytes32",type:"bytes32"},{name:"value",internalType:"uint256",type:"uint256"},{name:"data",internalType:"bytes",type:"bytes"}]},{name:"_userSalt",internalType:"bytes32",type:"bytes32"}],name:"callRemoteWithOverrides",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"payable"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_router",internalType:"bytes32",type:"bytes32"},{name:"_ism",internalType:"bytes32",type:"bytes32"},{name:"_calls",internalType:"struct CallLib.Call[]",type:"tuple[]",components:[{name:"to",internalType:"bytes32",type:"bytes32"},{name:"value",internalType:"uint256",type:"uint256"},{name:"data",internalType:"bytes",type:"bytes"}]},{name:"_hookMetadata",internalType:"bytes",type:"bytes"},{name:"_salt",internalType:"bytes32",type:"bytes32"},{name:"_hook",internalType:"contract IPostDispatchHook",type:"address"}],name:"callRemoteWithOverrides",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"payable"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_router",internalType:"bytes32",type:"bytes32"},{name:"_ism",internalType:"bytes32",type:"bytes32"},{name:"_calls",internalType:"struct CallLib.Call[]",type:"tuple[]",components:[{name:"to",internalType:"bytes32",type:"bytes32"},{name:"value",internalType:"uint256",type:"uint256"},{name:"data",internalType:"bytes",type:"bytes"}]},{name:"_hookMetadata",internalType:"bytes",type:"bytes"}],name:"callRemoteWithOverrides",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"payable"},{type:"function",inputs:[],name:"domains",outputs:[{name:"",internalType:"uint32[]",type:"uint32[]"}],stateMutability:"view"},{type:"function",inputs:[{name:"_domain",internalType:"uint32",type:"uint32"},{name:"_router",internalType:"bytes32",type:"bytes32"}],name:"enrollRemoteRouter",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_router",internalType:"bytes32",type:"bytes32"},{name:"_ism",internalType:"bytes32",type:"bytes32"}],name:"enrollRemoteRouterAndIsm",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_destinations",internalType:"uint32[]",type:"uint32[]"},{name:"_routers",internalType:"bytes32[]",type:"bytes32[]"},{name:"_isms",internalType:"bytes32[]",type:"bytes32[]"}],name:"enrollRemoteRouterAndIsms",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_domains",internalType:"uint32[]",type:"uint32[]"},{name:"_addresses",internalType:"bytes32[]",type:"bytes32[]"}],name:"enrollRemoteRouters",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_origin",internalType:"uint32",type:"uint32"},{name:"_owner",internalType:"bytes32",type:"bytes32"},{name:"_router",internalType:"bytes32",type:"bytes32"},{name:"_ism",internalType:"address",type:"address"},{name:"_userSalt",internalType:"bytes32",type:"bytes32"}],name:"getDeployedInterchainAccount",outputs:[{name:"",internalType:"contract OwnableMulticall",type:"address"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_origin",internalType:"uint32",type:"uint32"},{name:"_owner",internalType:"address",type:"address"},{name:"_router",internalType:"address",type:"address"},{name:"_ism",internalType:"address",type:"address"}],name:"getDeployedInterchainAccount",outputs:[{name:"",internalType:"contract OwnableMulticall",type:"address"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_origin",internalType:"uint32",type:"uint32"},{name:"_owner",internalType:"bytes32",type:"bytes32"},{name:"_router",internalType:"bytes32",type:"bytes32"},{name:"_ism",internalType:"address",type:"address"}],name:"getDeployedInterchainAccount",outputs:[{name:"",internalType:"contract OwnableMulticall",type:"address"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_origin",internalType:"uint32",type:"uint32"},{name:"_owner",internalType:"bytes32",type:"bytes32"},{name:"_router",internalType:"bytes32",type:"bytes32"},{name:"_ism",internalType:"address",type:"address"},{name:"_userSalt",internalType:"bytes32",type:"bytes32"}],name:"getLocalInterchainAccount",outputs:[{name:"",internalType:"contract OwnableMulticall",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_origin",internalType:"uint32",type:"uint32"},{name:"_owner",internalType:"address",type:"address"},{name:"_router",internalType:"address",type:"address"},{name:"_ism",internalType:"address",type:"address"}],name:"getLocalInterchainAccount",outputs:[{name:"",internalType:"contract OwnableMulticall",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_origin",internalType:"uint32",type:"uint32"},{name:"_owner",internalType:"bytes32",type:"bytes32"},{name:"_router",internalType:"bytes32",type:"bytes32"},{name:"_ism",internalType:"address",type:"address"}],name:"getLocalInterchainAccount",outputs:[{name:"",internalType:"contract OwnableMulticall",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_owner",internalType:"address",type:"address"},{name:"_router",internalType:"address",type:"address"},{name:"_ism",internalType:"address",type:"address"},{name:"_userSalt",internalType:"bytes32",type:"bytes32"}],name:"getRemoteInterchainAccount",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_owner",internalType:"address",type:"address"}],name:"getRemoteInterchainAccount",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_owner",internalType:"address",type:"address"},{name:"_userSalt",internalType:"bytes32",type:"bytes32"}],name:"getRemoteInterchainAccount",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_owner",internalType:"address",type:"address"},{name:"_router",internalType:"address",type:"address"},{name:"_ism",internalType:"address",type:"address"}],name:"getRemoteInterchainAccount",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_origin",internalType:"uint32",type:"uint32"},{name:"_sender",internalType:"bytes32",type:"bytes32"},{name:"_message",internalType:"bytes",type:"bytes"}],name:"handle",outputs:[],stateMutability:"payable"},{type:"function",inputs:[],name:"hook",outputs:[{name:"",internalType:"contract IPostDispatchHook",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"implementation",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"interchainSecurityModule",outputs:[{name:"",internalType:"contract IInterchainSecurityModule",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"destinationDomain",internalType:"uint32",type:"uint32"}],name:"isms",outputs:[{name:"ism",internalType:"bytes32",type:"bytes32"}],stateMutability:"view"},{type:"function",inputs:[],name:"localDomain",outputs:[{name:"",internalType:"uint32",type:"uint32"}],stateMutability:"view"},{type:"function",inputs:[],name:"mailbox",outputs:[{name:"",internalType:"contract IMailbox",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"moduleType",outputs:[{name:"",internalType:"uint8",type:"uint8"}],stateMutability:"view"},{type:"function",inputs:[],name:"owner",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"gasLimit",internalType:"uint256",type:"uint256"}],name:"quoteGasForCommitReveal",outputs:[{name:"_gasPayment",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"},{name:"_gasLimit",internalType:"uint256",type:"uint256"}],name:"quoteGasPayment",outputs:[{name:"_gasPayment",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"_destination",internalType:"uint32",type:"uint32"}],name:"quoteGasPayment",outputs:[{name:"_gasPayment",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_message",internalType:"bytes",type:"bytes"}],name:"route",outputs:[{name:"",internalType:"contract IInterchainSecurityModule",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_domain",internalType:"uint32",type:"uint32"}],name:"routers",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"view"},{type:"function",inputs:[{name:"_hook",internalType:"address",type:"address"}],name:"setHook",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_module",internalType:"address",type:"address"}],name:"setInterchainSecurityModule",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"newOwner",internalType:"address",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_domain",internalType:"uint32",type:"uint32"}],name:"unenrollRemoteRouter",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_domains",internalType:"uint32[]",type:"uint32[]"}],name:"unenrollRemoteRouters",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_metadata",internalType:"bytes",type:"bytes"},{name:"_message",internalType:"bytes",type:"bytes"}],name:"verify",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"nonpayable"},{type:"receive",stateMutability:"payable"}],GQ=[{type:"constructor",inputs:[{name:"_factory",internalType:"address",type:"address"},{name:"_rewardToken",internalType:"address",type:"address"},{name:"_root",internalType:"bool",type:"bool"}],stateMutability:"nonpayable"},{type:"error",inputs:[],name:"AlreadyStaked"},{type:"error",inputs:[],name:"InvalidBribeableShare"},{type:"error",inputs:[],name:"InvalidInitialization"},{type:"error",inputs:[],name:"InvalidPercentage"},{type:"error",inputs:[],name:"InvalidToken"},{type:"error",inputs:[],name:"LockerStaked"},{type:"error",inputs:[],name:"NoGauge"},{type:"error",inputs:[],name:"NotFactory"},{type:"error",inputs:[],name:"NotInitializing"},{type:"error",inputs:[],name:"NotLocked"},{type:
62"error",inputs:[],name:"NotStaked"},{type:"error",inputs:[{name:"owner",internalType:"address",type:"address"}],name:"OwnableInvalidOwner"},{type:"error",inputs:[{name:"account",internalType:"address",type:"address"}],name:"OwnableUnauthorizedAccount"},{type:"error",inputs:[],name:"PermanentLock"},{type:"error",inputs:[],name:"ReentrancyGuardReentrantCall"},{type:"error",inputs:[{name:"token",internalType:"address",type:"address"}],name:"SafeERC20FailedOperation"},{type:"error",inputs:[],name:"ZeroAddress"},{type:"error",inputs:[],name:"ZeroAmount"},{type:"error",inputs:[],name:"ZeroDuration"},{type:"event",anonymous:!1,inputs:[{name:"newBribeableShare",internalType:"uint16",type:"uint16",indexed:!0}],name:"BribeableShareSet"},{type:"event",anonymous:!1,inputs:[{name:"pool",internalType:"address",type:"address",indexed:!0},{name:"token",internalType:"address",type:"address",indexed:!0},{name:"amount",internalType:"uint256",type:"uint256",indexed:!1}],name:"Bribed"},{type:"event",anonymous:!1,inputs:[{name:"recipient",internalType:"address",type:"address",indexed:!0},{name:"claimed0",internalType:"uint256",type:"uint256",indexed:!1},{name:"claimed1",internalType:"uint256",type:"uint256",indexed:!1}],name:"FeesClaimed"},{type:"event",anonymous:!1,inputs:[{name:"version",internalType:"uint64",type:"uint64",indexed:!1}],name:"Initialized"},{type:"event",anonymous:!1,inputs:[{name:"amount0",internalType:"uint256",type:"uint256",indexed:!0},{name:"amount1",internalType:"uint256",type:"uint256",indexed:!0},{name:"liquidity",internalType:"uint256",type:"uint256",indexed:!0}],name:"LiquidityIncreased"},{type:"event",anonymous:!1,inputs:[{name:"previousOwner",internalType:"address",type:"address",indexed:!0},{name:"newOwner",internalType:"address",type:"address",indexed:!0}],name:"OwnershipTransferred"},{type:"event",anonymous:!1,inputs:[{name:"recipient",internalType:"address",type:"address",indexed:!0},{name:"claimed",internalType:"uint256",type:"uint256",indexed:!1}],name:"RewardsClaimed"},{type:"event",anonymous:!1,inputs:[],name:"Staked"},{type:"event",anonymous:!1,inputs:[{name:"token",internalType:"address",type:"address",indexed:!0},{name:"recipient",internalType:"address",type:"address",indexed:!0},{name:"amount",internalType:"uint256",type:"uint256",indexed:!0}],name:"Swept"},{type:"event",anonymous:!1,inputs:[{name:"newUnlockTimestamp",internalType:"uint256",type:"uint256",indexed:!1}],name:"UnlockTimestampIncreased"},{type:"event",anonymous:!1,inputs:[{name:"recipient",internalType:"address",type:"address",indexed:!0},{name:"refundAddress",internalType:"address",type:"address",indexed:!0}],name:"Unlocked"},{type:"event",anonymous:!1,inputs:[],name:"Unstaked"},{type:"function",inputs:[],name:"BASE_CHAIN_ID",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"MAX_BPS",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"beneficiary",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"beneficiaryShare",outputs:[{name:"",internalType:"uint16",type:"uint16"}],stateMutability:"view"},{type:"function",inputs:[{name:"_percentage",internalType:"uint16",type:"uint16"}],name:"bribe",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"bribeableShare",outputs:[{name:"",internalType:"uint16",type:"uint16"}],stateMutability:"view"},{type:"function",inputs:[{name:"_recipient",internalType:"address",type:"address"}],name:"claimFees",outputs:[{name:"claimed0",internalType:"uint256",type:"uint256"},{name:"claimed1",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_recipient",internalType:"address",type:"address"}],name:"claimRewards",outputs:[{name:"claimed",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"factory",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"gauge",outputs:[{name:"",internalType:"contract IGauge",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_duration",internalType:"uint32",type:"uint32"}],name:"increaseDuration",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_amount0",internalType:"uint256",type:"uint256"},{name:"_amount1",internalType:"uint256",type:"uint256"},{name:"_amount0Min",internalType:"uint256",type:"uint256"},{name:"_amount1Min",internalType:"uint256",type:"uint256"}],name:"increaseLiquidity",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_owner",internalType:"address",type:"address"},{name:"_pool",internalType:"address",type:"address"},{name:"_lp",internalType:"uint256",type:"uint256"},{name:"_lockedUntil",internalType:"uint32",type:"uint32"}
62,{name:"_beneficiary",internalType:"address",type:"address"},{name:"_beneficiaryShare",internalType:"uint16",type:"uint16"},{name:"_bribeableShare",internalType:"uint16",type:"uint16"}],name:"initialize",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"lockedUntil",outputs:[{name:"",internalType:"uint32",type:"uint32"}],stateMutability:"view"},{type:"function",inputs:[],name:"lp",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"owner",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"pool",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"poolType",outputs:[{name:"",internalType:"enum ILockerFactory.PoolType",type:"uint8"}],stateMutability:"view"},{type:"function",inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"rewardToken",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"root",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[],name:"router",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_bribeableShare",internalType:"uint16",type:"uint16"}],name:"setBribeableShare",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"stake",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"staked",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[],name:"token0",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"token1",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"newOwner",internalType:"address",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_recipient",internalType:"address",type:"address"},{name:"_refundAddress",internalType:"address",type:"address"}],name:"unlock",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"unstake",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"voter",outputs:[{name:"",internalType:"contract IVoter",type:"address"}],stateMutability:"view"}],KQ=[{type:"function",inputs:[{name:"_limit",type:"uint256"},{name:"_offset",type:"uint256"}],name:"forSwaps",outputs:[{name:"",type:"tuple[]",components:[{name:"lp",type:"address"},{name:"type",type:"int24"},{name:"token0",type:"address"},{name:"token1",type:"address"},{name:"factory",type:"address"},{name:"pool_fee",type:"uint256"}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_limit",type:"uint256"},{name:"_offset",type:"uint256"},{name:"_account",type:"address"},{name:"_addresses",type:"address[]"}],name:"tokens",outputs:[{name:"",type:"tuple[]",components:[{name:"token_address",type:"address"},{name:"symbol",type:"string"},{name:"decimals",type:"uint8"},{name:"account_balance",type:"uint256"},{name:"listed",type:"bool"},{name:"emerging",type:"bool"}]}],stateMutability:"view"},{type:"function",inputs:[],name:"count",outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"_limit",type:"uint256"},{name:"_offset",type:"uint256"},{name:"_filter",type:"uint256"}],name:"all",outputs:[{name:"",type:"tuple[]",components:[{name:"lp",type:"address"},{name:"symbol",type:"string"},{name:"decimals",type:"uint8"},{name:"liquidity",type:"uint256"},{name:"type",type:"int24"},{name:"tick",type:"int24"},{name:"sqrt_ratio",type:"uint160"},{name:"token0",type:"address"},{name:"reserve0",type:"uint256"},{name:"staked0",type:"uint256"},{name:"token1",type:"address"},{name:"reserve1",type:"uint256"},{name:"staked1",type:"uint256"},{name:"gauge",type:"address"},{name:"gauge_liquidity",type:"uint256"},{name:"gauge_alive",type:"bool"},{name:"fee",type:"address"},{name:"bribe",type:"address"},{name:"factory",type:"address"},{name:"emissions",type:"uint256"},{name:"emissions_token",type:"address"},{name:"emissions_cap",type:"uint256"},{name:"pool_fee",type:"uint256"},{name:"unstaked_fee",type:"uint256"},{name:"token0_fees",type:"uint256"},{name:"token1_fees",type:"uint256"},{name:"locked",type:"uint256"},{name:"emerging",type:"uint256"},{name:"created_at",type:"uint32"},{name:"nfpm",type:"address"},{name:"alm",type:"address"},{name:"root",type:"address"}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_limit",type:"uint256"},{name:"_offset",type:"uint256"},{name:"_account",type:"address"}],name:"positions",outputs:[{name:"",type:"tuple[]",components:[{name:"id",type:"uint256"},{name:"lp",type:"address"},{name:"liquidity",type:"uint256"},{name:"staked",type:"uint256"},{name:"amount0",type:"uint256"},{name:"amount1",type:"uint256"},{name:"staked0",type:"uint256"},{name:"staked1",type:"uint256"},{name:"unstaked_earned0",type:"uint256"},{name:"unstaked_earned1",type:"uint256"},{name:"emissions_earned",type:"uint256"},{name:"tick_lower",type:"int24"},{name:"tick_upper",type:"int24"},{name:"sqrt_ratio_lower",type:"uint160"},{name:"sqrt_ratio_upper",type:"uint160"},{name:"locker",type:"address"},{name:"unlocks_at",type:"uint32"},{name:"alm",type:"address"}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_limit",type:"uint256"},{name:"_offset",type:"uint256"},{name:"_account",type:"address"},{name:"_factory",type:"address"}],name:"positionsByFactory",outputs:[{name:"",type:"tuple[]",components:[{name:"id",type:"uint256"},{name:"lp",type:"address"},{name:"liquidity",type:"uint256"},{name:"staked",type:"uint256"},{name:"amount0",type:"uint256"},{name:"amount1",type:"uint256"},{name:"staked0",type:"uint256"},{name:"staked1",type:"uint256"},{name:"unstaked_earned0",type:"uint256"},{name:"unstaked_earned1",type:"uint256"},{name:"emissions_earned",type:"uint256"},{name:"tick_lower",type:"int24"},{name:"tick_upper",type:"int24"},{name:"sqrt_ratio_lower",type:"uint160"},{name:"sqrt_ratio_upper",type:"uint160"},{name:"locker",type:"address"},{name:"unlocks_at",type:"uint32"},{name:"alm",type:"address"}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_limit",type:"uint256"},{name:"_offset",type:"uint256"},{name:"_account",type:"address"}],name:"positionsUnstakedConcentrated",outputs:[{name:"",type:"tuple[]",components:[{name:"id",type:"uint256"},{name:"lp",type:"address"},{name:"liquidity",type:"uint256"},{name:"staked",type:"uint256"},{name:"amount0",type:"uint256"},{name:"amount1",type:"uint256"},{name:"staked0",type:"uint256"},{name:"staked1",type:"uint256"},{name:"unstaked_earned0",type:"uint256"},{name:"unstaked_earned1",type:"uint256"},{name:"emissions_earned",type:"uint256"},{name:"tick_lower",type:"int24"},{name:"tick_upper",type:"int24"},{name:"sqrt_ratio_lower",type:"uint160"},{name:"sqrt_ratio_upper",type:"uint160"},{name:"locker",type:"address"},{name:"unlocks_at",type:"uint32"},{name:"alm",type:"address"}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_wrapper",type:"address"},{name:"_amount0",type:"uint256"},{name:"_amount1",type:"uint256"}],name:"almEstimateAmounts",outputs:[{name:"",type:"uint256[3]"}],stateMutability:"view"},{type:"function",inputs:[],name:"MAX_TOKENS",outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"MAX_LPS",outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"MAX_POSITIONS",outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"MAX_TOKEN_SYMBOL_LEN",outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"MAX_FACTORIES",outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"MAX_ITERATIONS",outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"voter",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"registry",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"convertor",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"cl_helper",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"alm_factory",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"arg0",type:"uint256"},{name:"arg1",type:"address"}],name:"alm_map",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"arg0",type:"address"}],name:"launcher_map",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"token_sugar",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"lp_helper",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"arg0",type:"address"}],name:"locker_factory_map",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"constructor",inputs:[{name:"_voter",type:"address"},{name:"_registry",type:"address"},{name:"_convertor",type:"address"},{name:"_slipstream_helper",type:"address"},{name:"_alm_factory",type:"address"},{name:"_v2_factories",type:"address[]"},{name:"_v2_launchers",type:"address[]"},{name:"_cl_factories",type:"address[]"},{name:"_cl_launchers",type:"address[]"},{name:"_token_sugar",type:"address"},{name:"_lp_helper",type:"address"}],stateMutability:"nonpayable"}],YQ=[{type:"event",anonymous:!1,inputs:[{name:"sender",internalType:"address",type:"address",indexed:!0},{name:"fromTokenId",internalType:"uint256",type:"uint256",indexed:!0},{name:"toTokenId",internalType:"uint256",type:"uint256",indexed:!0}],name:"MigratedSlipstreamToSliptream"},{type:"function",inputs:[{name:"fromParams",internalType:"struct ILpMigrator.FromParams",type:"tuple",components:[{name:"nft",internalType:"address",type:"address"},{name:"tokenId",internalType:"uint256",type:"uint256"},{name:"amount0Min",internalType:"uint256",type:"uint256"},{name:"amount1Min",internalType:"uint256",type:"uint256"},{name:"amount0Extra",internalType:"uint256",type:"uint256"},{name:"amount1Extra",internalType:"uint256",type:"uint256"}]},{name:"toParams",internalType:"struct ILpMigrator.ToParams",type:"tuple",components:[{name:"nft",internalType:"address",type:"address"},{name:"tickSpacing",internalType:"int24",type:"int24"},{name:"tickLower",internalType:"int24",type:"int24"},{name:"tickUpper",internalType:"int24",type:"int24"},{name:"amount0Min",internalType:"uint256",type:"uint256"},{name:"amount1Min",internalType:"uint256",type:"uint256"},{name:"recipient",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"},{name:"pool",internalType:"address",type:"address"}]}],name:"migrateSlipstreamToSlipstream",outputs:[{name:"tokenId",internalType:"uint256",type:"uint256"},{name:"liquidity",internalType:"uint128",type:"uint128"},{name:"amount0",internalType:"uint256",type:"uint256"},{name:"amount1",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"},{name:"",internalType:"address",type:"address"},{name:"",internalType:"uint256",type:"uint256"},{name:"",internalType:"bytes",type:"bytes"}],name:"onERC721Received",outputs:[{name:"",internalType:"bytes4",type:"bytes4"}],stateMutability:"nonpayable"}
62],ZQ=[{type:"constructor",inputs:[{name:"_owner",internalType:"address",type:"address"},{name:"_factory",internalType:"address",type:"address"},{name:"_WETH9",internalType:"address",type:"address"},{name:"_tokenDescriptor",internalType:"address",type:"address"},{name:"name",internalType:"string",type:"string"},{name:"symbol",internalType:"string",type:"string"}],stateMutability:"nonpayable"},{type:"event",anonymous:!1,inputs:[{name:"owner",internalType:"address",type:"address",indexed:!0},{name:"approved",internalType:"address",type:"address",indexed:!0},{name:"tokenId",internalType:"uint256",type:"uint256",indexed:!0}],name:"Approval"},{type:"event",anonymous:!1,inputs:[{name:"owner",internalType:"address",type:"address",indexed:!0},{name:"operator",internalType:"address",type:"address",indexed:!0},{name:"approved",internalType:"bool",type:"bool",indexed:!1}],name:"ApprovalForAll"},{type:"event",anonymous:!1,inputs:[{name:"_fromTokenId",internalType:"uint256",type:"uint256",indexed:!1},{name:"_toTokenId",internalType:"uint256",type:"uint256",indexed:!1}],name:"BatchMetadataUpdate"},{type:"event",anonymous:!1,inputs:[{name:"tokenId",internalType:"uint256",type:"uint256",indexed:!0},{name:"recipient",internalType:"address",type:"address",indexed:!1},{name:"amount0",internalType:"uint256",type:"uint256",indexed:!1},{name:"amount1",internalType:"uint256",type:"uint256",indexed:!1}],name:"Collect"},{type:"event",anonymous:!1,inputs:[{name:"tokenId",internalType:"uint256",type:"uint256",indexed:!0},{name:"liquidity",internalType:"uint128",type:"uint128",indexed:!1},{name:"amount0",internalType:"uint256",type:"uint256",indexed:!1},{name:"amount1",internalType:"uint256",type:"uint256",indexed:!1}],name:"DecreaseLiquidity"},{type:"event",anonymous:!1,inputs:[{name:"tokenId",internalType:"uint256",type:"uint256",indexed:!0},{name:"liquidity",internalType:"uint128",type:"uint128",indexed:!1},{name:"amount0",internalType:"uint256",type:"uint256",indexed:!1},{name:"amount1",internalType:"uint256",type:"uint256",indexed:!1}],name:"IncreaseLiquidity"},{type:"event",anonymous:!1,inputs:[{name:"_tokenId",internalType:"uint256",type:"uint256",indexed:!1}],name:"MetadataUpdate"},{type:"event",anonymous:!1,inputs:[{name:"tokenDescriptor",internalType:"address",type:"address",indexed:!0}],name:"TokenDescriptorChanged"},{type:"event",anonymous:!1,inputs:[{name:"from",internalType:"address",type:"address",indexed:!0},{name:"to",internalType:"address",type:"address",indexed:!0},{name:"tokenId",internalType:"uint256",type:"uint256",indexed:!0}],name:"Transfer"},{type:"event",anonymous:!1,inputs:[{name:"owner",internalType:"address",type:"address",indexed:!0}],name:"TransferOwnership"},{type:"function",inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"view"},{type:"function",inputs:[],name:"PERMIT_TYPEHASH",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"view"},{type:"function",inputs:[],name:"WETH9",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"to",internalType:"address",type:"address"},{name:"tokenId",internalType:"uint256",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"owner",internalType:"address",type:"address"}],name:"balanceOf",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"baseURI",outputs:[{name:"",internalType:"string",type:"string"}],stateMutability:"pure"},{type:"function",inputs:[{name:"tokenId",internalType:"uint256",type:"uint256"}],name:"burn",outputs:[],stateMutability:"payable"},{type:"function",inputs:[{name:"params",internalType:"struct INonfungiblePositionManager.CollectParams",type:"tuple",components:[{name:"tokenId",internalType:"uint256",type:"uint256"},{name:"recipient",internalType:"address",type:"address"},{name:"amount0Max",internalType:"uint128",type:"uint128"},{name:"amount1Max",internalType:"uint128",type:"uint128"}]}],name:"collect",outputs:[{name:"amount0",internalType:"uint256",type:"uint256"},{name:"amount1",internalType:"uint256",type:"uint256"}],stateMutability:"payable"},{type:"function",inputs:[{name:"params",internalType:"struct INonfungiblePositionManager.DecreaseLiquidityParams",type:"tuple",components:[{name:"tokenId",internalType:"uint256",type:"uint256"},{name:"liquidity",internalType:"uint128",type:"uint128"},{name:"amount0Min",internalType:"uint256",type:"uint256"},{name:"amount1Min",internalType:"uint256",type:"uint256"},{name:"deadline",internalType:"uint256",type:"uint256"}]}],name:"decreaseLiquidity",outputs:[{name:"amount0",internalType:"uint256",type:"uint256"},{name:"amount1",internalType:"uint256",type:"uint256"}],stateMutability:"payable"},{type:"function",inputs:[],name:"factory",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenId",internalType:"uint256",type:"uint256"}],name:"getApproved",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"params",internalType:"struct INonfungiblePositionManager.IncreaseLiquidityParams",type:"tuple",components:[{name:"tokenId",internalType:"uint256",type:"uint256"},{name:"amount0Desired",internalType:"uint256",type:"uint256"},{name:"amount1Desired",internalType:"uint256",type:"uint256"},{name:"amount0Min",internalType:"uint256",type:"uint256"},{name:"amount1Min",internalType:"uint256",type:"uint256"},{name:"deadline",internalType:"uint256",type:"uint256"}]}],name:"increaseLiquidity",outputs:[{name:"liquidity",internalType:"uint128",type:"uint128"},{name:"amount0",internalType:"uint256",type:"uint256"},{name:"amount1",internalType:"uint256",type:"uint256"}],stateMutability:"payable"},{type:"function",inputs:[{name:"owner",internalType:"address",type:"address"},{name:"operator",internalType:"address",type:"address"}],name:"isApprovedForAll",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[{name:"params",internalType:"struct INonfungiblePositionManager.MintParams",type:"tuple",components:[{name:"token0",internalType:"address",type:"address"},{name:"token1",internalType:"address",type:"address"},{name:"tickSpacing",internalType:"int24",type:"int24"},{name:"tickLower",internalType:"int24",type:"int24"},{name:"tickUpper",internalType:"int24",type:"int24"},{name:"amount0Desired",internalType:"uint256",type:"uint256"},{name:"amount1Desired",internalType:"uint256",type:"uint256"},{name:"amount0Min",internalType:"uint256",type:"uint256"},{name:"amount1Min",internalType:"uint256",type:"uint256"},{name:"recipient",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"},{name:"sqrtPriceX96",internalType:"uint160",type:"uint160"}]}],name:"mint",outputs:[{name:"tokenId",internalType:"uint256",type:"uint256"},{name:"liquidity",internalType:"uint128",type:"uint128"},{name:"amount0",internalType:"uint256",type:"uint256"},{name:"amount1",internalType:"uint256",type:"uint256"}],stateMutability:"payable"},{type:"function",inputs:[{name:"data",internalType:"bytes[]",type:"bytes[]"}],name:"multicall",outputs:[{name:"results",internalType:"bytes[]",type:"bytes[]"}],stateMutability:"payable"},{type:"function",inputs:[],name:"name",outputs:[{name:"",internalType:"string",type:"string"}],stateMutability:"view"},{type:"function",inputs:[],name:"owner",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenId",internalType:"uint256",type:"uint256"}],name:"ownerOf",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"spender",internalType:"address",type:"address"},{name:"tokenId",internalType:"uint256",type:"uint256"},{name:"deadline",internalType:"uint256",type:"uint256"},{name:"v",internalType:"uint8",type:"uint8"},{name:"r",internalType:"bytes32",type:"bytes32"},{name:"s",internalType:"bytes32",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"payable"},{type:"function",inputs:[{name:"tokenId",internalType:"uint256",type:"uint256"}],name:"positions",outputs:[{name:"nonce",internalType:"uint96",type:"uint96"},{name:"operator",internalType:"address",type:"address"},{name:"token0",internalType:"address",type:"address"},{name:"token1",internalType:"address",type:"address"},{name:"tickSpacing",internalType:"int24",type:"int24"},{name:"tickLower",internalType:"int24",type:"int24"},{name:"tickUpper",internalType:"int24",type:"int24"},{name:"liquidity",internalType:"uint128",type:"uint128"},{name:"feeGrowthInside0LastX128",internalType:"uint256",type:"uint256"},{name:"feeGrowthInside1LastX128",internalType:"uint256",type:"uint256"},{name:"tokensOwed0",internalType:"uint128",type:"uint128"},{name:"tokensOwed1",internalType:"uint128",type:"uint128"}],stateMutability:"view"},{type:"function",inputs:[],name:"refundETH",outputs:[],stateMutability:"payable"},{type:"function",inputs:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"tokenId",internalType:"uint256",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"tokenId",internalType:"uint256",type:"uint256"},{name:"_data",internalType:"bytes",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable"}
62,{type:"function",inputs:[{name:"token",internalType:"address",type:"address"},{name:"value",internalType:"uint256",type:"uint256"},{name:"deadline",internalType:"uint256",type:"uint256"},{name:"v",internalType:"uint8",type:"uint8"},{name:"r",internalType:"bytes32",type:"bytes32"},{name:"s",internalType:"bytes32",type:"bytes32"}],name:"selfPermit",outputs:[],stateMutability:"payable"},{type:"function",inputs:[{name:"token",internalType:"address",type:"address"},{name:"nonce",internalType:"uint256",type:"uint256"},{name:"expiry",internalType:"uint256",type:"uint256"},{name:"v",internalType:"uint8",type:"uint8"},{name:"r",internalType:"bytes32",type:"bytes32"},{name:"s",internalType:"bytes32",type:"bytes32"}],name:"selfPermitAllowed",outputs:[],stateMutability:"payable"},{type:"function",inputs:[{name:"token",internalType:"address",type:"address"},{name:"nonce",internalType:"uint256",type:"uint256"},{name:"expiry",internalType:"uint256",type:"uint256"},{name:"v",internalType:"uint8",type:"uint8"},{name:"r",internalType:"bytes32",type:"bytes32"},{name:"s",internalType:"bytes32",type:"bytes32"}],name:"selfPermitAllowedIfNecessary",outputs:[],stateMutability:"payable"},{type:"function",inputs:[{name:"token",internalType:"address",type:"address"},{name:"value",internalType:"uint256",type:"uint256"},{name:"deadline",internalType:"uint256",type:"uint256"},{name:"v",internalType:"uint8",type:"uint8"},{name:"r",internalType:"bytes32",type:"bytes32"},{name:"s",internalType:"bytes32",type:"bytes32"}],name:"selfPermitIfNecessary",outputs:[],stateMutability:"payable"},{type:"function",inputs:[{name:"operator",internalType:"address",type:"address"},{name:"approved",internalType:"bool",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_owner",internalType:"address",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_tokenDescriptor",internalType:"address",type:"address"}],name:"setTokenDescriptor",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"interfaceId",internalType:"bytes4",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[{name:"token",internalType:"address",type:"address"},{name:"amountMinimum",internalType:"uint256",type:"uint256"},{name:"recipient",internalType:"address",type:"address"}],name:"sweepToken",outputs:[],stateMutability:"payable"},{type:"function",inputs:[],name:"symbol",outputs:[{name:"",internalType:"string",type:"string"}],stateMutability:"view"},{type:"function",inputs:[{name:"index",internalType:"uint256",type:"uint256"}],name:"tokenByIndex",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"tokenDescriptor",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"owner",internalType:"address",type:"address"},{name:"index",internalType:"uint256",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenId",internalType:"uint256",type:"uint256"}],name:"tokenURI",outputs:[{name:"",internalType:"string",type:"string"}],stateMutability:"view"},{type:"function",inputs:[],name:"totalSupply",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"tokenId",internalType:"uint256",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"amount0Owed",internalType:"uint256",type:"uint256"},{name:"amount1Owed",internalType:"uint256",type:"uint256"},{name:"data",internalType:"bytes",type:"bytes"}],name:"uniswapV3MintCallback",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"amountMinimum",internalType:"uint256",type:"uint256"},{name:"recipient",internalType:"address",type:"address"}],name:"unwrapWETH9",outputs:[],stateMutability:"payable"},{type:"receive",stateMutability:"payable"}],XQ=[{type:"constructor",inputs:[{name:"_owner",internalType:"address",type:"address"},{name:"_nfpManager",internalType:"address",type:"address"},{name:"_lockerFactory",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"error",inputs:[],name:"InsufficientPoolLauncherUnlockMin"},{type:"error",inputs:[],name:"InsufficientTokenToPairUnlockMin"},{type:"error",inputs:[],name:"InvalidLocker"},{type:"error",inputs:[],name:"InvalidLockerForPool"},{type:"error",inputs:[],name:"InvalidNewPoolLauncher"},{type:"error",inputs:[],name:"InvalidPoolLauncherToken"},{type:"error",inputs:[],name:"InvalidRefundAddress"},{type:"error",inputs:[],name:"InvalidTimestamp"},{type:"error",inputs:[],name:"InvalidToken"},{type:"error",inputs:[],name:"NewPoolLauncherNotSet"},{type:"error",inputs:[],name:"NotLocked"},{type:"error",inputs:[],name:"NotLockerOwner"},{type:"error",inputs:[{name:"owner",internalType:"address",type:"address"}],name:"OwnableInvalidOwner"},{type:"error",inputs:[{name:"account",internalType:"address",type:"address"}],name:"OwnableUnauthorizedAccount"},{type:"error",inputs:[],name:"PoolAlreadyExists"},{type:"error",inputs:[],name:"PoolNotInPoolLauncher"},{type:"error",inputs:[],name:"ReentrancyGuardReentrantCall"}
62,{type:"error",inputs:[{name:"token",internalType:"address",type:"address"}],name:"SafeERC20FailedOperation"},{type:"error",inputs:[],name:"TokenAlreadyRegistered"},{type:"error",inputs:[],name:"TokenNotRegistered"},{type:"error",inputs:[],name:"ZeroAddress"},{type:"error",inputs:[],name:"ZeroTimestamp"},{type:"event",anonymous:!1,inputs:[{name:"pool",internalType:"address",type:"address",indexed:!0},{name:"createdAt",internalType:"uint256",type:"uint256",indexed:!1}],name:"CreationTimestampSet"},{type:"event",anonymous:!1,inputs:[{name:"pool",internalType:"address",type:"address",indexed:!0},{name:"timestamp",internalType:"uint256",type:"uint256",indexed:!0}],name:"EmergingFlagged"},{type:"event",anonymous:!1,inputs:[{name:"pool",internalType:"address",type:"address",indexed:!0}],name:"EmergingUnflagged"},{type:"event",anonymous:!1,inputs:[{name:"poolLauncherToken",internalType:"address",type:"address",indexed:!0},{name:"pool",internalType:"address",type:"address",indexed:!0},{name:"sender",internalType:"address",type:"address",indexed:!0},{name:"poolLauncherPool",internalType:"struct IPoolLauncher.PoolLauncherPool",type:"tuple",components:[{name:"createdAt",internalType:"uint32",type:"uint32"},{name:"pool",internalType:"address",type:"address"},{name:"poolLauncherToken",internalType:"address",type:"address"},{name:"tokenToPair",internalType:"address",type:"address"}],indexed:!1}],name:"Launch"},{type:"event",anonymous:!1,inputs:[{name:"underlyingPool",internalType:"address",type:"address",indexed:!0},{name:"locker",internalType:"address",type:"address",indexed:!0},{name:"newPoolLauncherPool",internalType:"struct IPoolLauncher.PoolLauncherPool",type:"tuple",components:[{name:"createdAt",internalType:"uint32",type:"uint32"},{name:"pool",internalType:"address",type:"address"},{name:"poolLauncherToken",internalType:"address",type:"address"},{name:"tokenToPair",internalType:"address",type:"address"}],indexed:!1},{name:"newLocker",internalType:"address",type:"address",indexed:!1}],name:"Migrate"},{type:"event",anonymous:!1,inputs:[{name:"newPoolLauncher",internalType:"address",type:"address",indexed:!0}],name:"NewPoolLauncherSet"},{type:"event",anonymous:!1,inputs:[{name:"previousOwner",internalType:"address",type:"address",indexed:!0},{name:"newOwner",internalType:"address",type:"address",indexed:!0}],name:"OwnershipTransferred"},{type:"event",anonymous:!1,inputs:[{name:"token",internalType:"address",type:"address",indexed:!0}],name:"PairableTokenAdded"},{type:"event",anonymous:!1,inputs:[{name:"token",internalType:"address",type:"address",indexed:!0}],name:"PairableTokenRemoved"},{type:"function",inputs:[{name:"_token",internalType:"address",type:"address"}],name:"addPairableToken",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"clFactory",outputs:[{name:"",internalType:"contract ICLFactory",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_pool",internalType:"address",type:"address"}],name:"emerging",outputs:[{name:"_timestamp",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"_pool",internalType:"address",type:"address"},{name:"_timestamp",internalType:"uint256",type:"uint256"}],name:"flagEmerging",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"getAllPairableTokens",outputs:[{name:"",internalType:"address[]",type:"address[]"}],stateMutability:"view"},{type:"function",inputs:[{name:"_index",internalType:"uint256",type:"uint256"}],name:"getPairableTokenAt",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"getPairableTokensCount",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"_tokenA",internalType:"address",type:"address"},{name:"_tokenB",internalType:"address",type:"address"},{name:"_tickSpacing",internalType:"int24",type:"int24"}],name:"getPool",outputs:[{name:"underlyingPool",internalType:"address",type:"address"}],stateMutability:"view"}
62,{type:"function",inputs:[{name:"_token",internalType:"address",type:"address"}],name:"isPairableToken",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[{name:"_params",internalType:"struct ICLPoolLauncher.LaunchParams",type:"tuple",components:[{name:"poolLauncherToken",internalType:"address",type:"address"},{name:"tokenToPair",internalType:"address",type:"address"},{name:"tickSpacing",internalType:"int24",type:"int24"},{name:"liquidity",internalType:"struct ICLPoolLauncher.LiquidityParams",type:"tuple",components:[{name:"amountPoolLauncherToken",internalType:"uint256",type:"uint256"},{name:"amountTokenToPair",internalType:"uint256",type:"uint256"},{name:"amountPoolLauncherTokenMin",internalType:"uint256",type:"uint256"},{name:"amountTokenToPairMin",internalType:"uint256",type:"uint256"},{name:"initialSqrtPriceX96",internalType:"uint160",type:"uint160"},{name:"tickLower",internalType:"int24",type:"int24"},{name:"tickUpper",internalType:"int24",type:"int24"},{name:"lockDuration",internalType:"uint32",type:"uint32"}]}]},{name:"_recipient",internalType:"address",type:"address"}],name:"launch",outputs:[{name:"",internalType:"struct IPoolLauncher.PoolLauncherPool",type:"tuple",components:[{name:"createdAt",internalType:"uint32",type:"uint32"},{name:"pool",internalType:"address",type:"address"},{name:"poolLauncherToken",internalType:"address",type:"address"},{name:"tokenToPair",internalType:"address",type:"address"}]},{name:"",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"lockerFactory",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_locker",internalType:"address",type:"address"},{name:"_poolLauncherUnlockMin",internalType:"uint256",type:"uint256"},{name:"_tokenToPairUnlockMin",internalType:"uint256",type:"uint256"},{name:"_poolLauncherAmountMin",internalType:"uint256",type:"uint256"},{name:"_tokenToPairAmountMin",internalType:"uint256",type:"uint256"}],name:"migrate",outputs:[{name:"",internalType:"struct IPoolLauncher.PoolLauncherPool",type:"tuple",components:[{name:"createdAt",internalType:"uint32",type:"uint32"},{name:"pool",internalType:"address",type:"address"},{name:"poolLauncherToken",internalType:"address",type:"address"},{name:"tokenToPair",internalType:"address",type:"address"}]},{name:"",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"newPoolLauncher",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"nfpManager",outputs:[{name:"",internalType:"contract INonfungiblePositionManager",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"owner",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_underlyingPool",internalType:"address",type:"address"}],name:"pools",outputs:[{name:"",internalType:"struct IPoolLauncher.PoolLauncherPool",type:"tuple",components:[{name:"createdAt",internalType:"uint32",type:"uint32"},{name:"pool",internalType:"address",type:"address"},{name:"poolLauncherToken",internalType:"address",type:"address"},{name:"tokenToPair",internalType:"address",type:"address"}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_token",internalType:"address",type:"address"}],name:"removePairableToken",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_pool",internalType:"address",type:"address"},{name:"_createdAt",internalType:"uint32",type:"uint32"}],name:"setCreationTimestamp",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_newPoolLauncher",internalType:"address",type:"address"}],name:"setNewPoolLauncher",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"newOwner",internalType:"address",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_pool",internalType:"address",type:"address"}],name:"unflagEmerging",outputs:[],stateMutability:"nonpayable"}],QQ=[{type:"constructor",inputs:[{name:"_owner",internalType:"address",type:"address"},{name:"_v2Factory",internalType:"address",type:"address"},{name:"_v2Router",internalType:"address",type:"address"},{name:"_lockerFactory",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"error",inputs:[],name:"InsufficientPoolLauncherUnlockMin"},{type:"error",inputs:[],name:"InsufficientTokenToPairUnlockMin"},{type:"error",inputs:[],name:"InvalidLocker"},{type:"error",inputs:[],name:"InvalidLockerForPool"},{type:"error",inputs:[],name:"InvalidNewPoolLauncher"},{type:"error",inputs:[],name:"InvalidPoolLauncherToken"},{type:"error",inputs:[],name:"InvalidRefundAddress"},{type:"error",inputs:[],name:"InvalidTimestamp"},{type:"error",inputs:[],name:"InvalidToken"},{type:"error",inputs:[],name:"NewPoolLauncherNotSet"},{type:"error",inputs:[],name:"NotLocked"},{type:"error",inputs:[],name:"NotLockerOwner"},{type:"error",inputs:[{name:"owner",internalType:"address",type:"address"}],name:"OwnableInvalidOwner"},{type:"error",inputs:[{name:"account",internalType:"address",type:"address"}],name:"OwnableUnauthorizedAccount"},{type:"error",inputs:[],name:"PoolAlreadyExists"},{type:"error",inputs:[],name:"PoolNotInPoolLauncher"},{type:"error",inputs:[],name:"ReentrancyGuardReentrantCall"}
62,{type:"error",inputs:[{name:"token",internalType:"address",type:"address"}],name:"SafeERC20FailedOperation"},{type:"error",inputs:[],name:"TokenAlreadyRegistered"},{type:"error",inputs:[],name:"TokenNotRegistered"},{type:"error",inputs:[],name:"ZeroAddress"},{type:"error",inputs:[],name:"ZeroTimestamp"},{type:"event",anonymous:!1,inputs:[{name:"pool",internalType:"address",type:"address",indexed:!0},{name:"createdAt",internalType:"uint256",type:"uint256",indexed:!1}],name:"CreationTimestampSet"},{type:"event",anonymous:!1,inputs:[{name:"pool",internalType:"address",type:"address",indexed:!0},{name:"timestamp",internalType:"uint256",type:"uint256",indexed:!0}],name:"EmergingFlagged"},{type:"event",anonymous:!1,inputs:[{name:"pool",internalType:"address",type:"address",indexed:!0}],name:"EmergingUnflagged"},{type:"event",anonymous:!1,inputs:[{name:"poolLauncherToken",internalType:"address",type:"address",indexed:!0},{name:"pool",internalType:"address",type:"address",indexed:!0},{name:"sender",internalType:"address",type:"address",indexed:!0},{name:"poolLauncherPool",internalType:"struct IPoolLauncher.PoolLauncherPool",type:"tuple",components:[{name:"createdAt",internalType:"uint32",type:"uint32"},{name:"pool",internalType:"address",type:"address"},{name:"poolLauncherToken",internalType:"address",type:"address"},{name:"tokenToPair",internalType:"address",type:"address"}],indexed:!1}],name:"Launch"},{type:"event",anonymous:!1,inputs:[{name:"underlyingPool",internalType:"address",type:"address",indexed:!0},{name:"locker",internalType:"address",type:"address",indexed:!0},{name:"newPoolLauncherPool",internalType:"struct IPoolLauncher.PoolLauncherPool",type:"tuple",components:[{name:"createdAt",internalType:"uint32",type:"uint32"},{name:"pool",internalType:"address",type:"address"},{name:"poolLauncherToken",internalType:"address",type:"address"},{name:"tokenToPair",internalType:"address",type:"address"}],indexed:!1},{name:"newLocker",internalType:"address",type:"address",indexed:!1}],name:"Migrate"},{type:"event",anonymous:!1,inputs:[{name:"newPoolLauncher",internalType:"address",type:"address",indexed:!0}],name:"NewPoolLauncherSet"},{type:"event",anonymous:!1,inputs:[{name:"previousOwner",internalType:"address",type:"address",indexed:!0},{name:"newOwner",internalType:"address",type:"address",indexed:!0}],name:"OwnershipTransferred"},{type:"event",anonymous:!1,inputs:[{name:"token",internalType:"address",type:"address",indexed:!0}],name:"PairableTokenAdded"},{type:"event",anonymous:!1,inputs:[{name:"token",internalType:"address",type:"address",indexed:!0}],name:"PairableTokenRemoved"},{type:"function",inputs:[{name:"_token",internalType:"address",type:"address"}],name:"addPairableToken",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_pool",internalType:"address",type:"address"}],name:"emerging",outputs:[{name:"_timestamp",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"_pool",internalType:"address",type:"address"},{name:"_timestamp",internalType:"uint256",type:"uint256"}],name:"flagEmerging",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"getAllPairableTokens",outputs:[{name:"",internalType:"address[]",type:"address[]"}],stateMutability:"view"},{type:"function",inputs:[{name:"_index",internalType:"uint256",type:"uint256"}],name:"getPairableTokenAt",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"getPairableTokensCount",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"_tokenA",internalType:"address",type:"address"},{name:"_tokenB",internalType:"address",type:"address"},{name:"_stable",internalType:"bool",type:"bool"}],name:"getPool",outputs:[{name:"underlyingPool",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_token",internalType:"address",type:"address"}],name:"isPairableToken",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[{name:"_params",internalType:"struct IV2PoolLauncher.Launc
62hParams",type:"tuple",components:[{name:"poolLauncherToken",internalType:"address",type:"address"},{name:"tokenToPair",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"liquidity",internalType:"struct IV2PoolLauncher.LiquidityParams",type:"tuple",components:[{name:"amountPoolLauncherToken",internalType:"uint256",type:"uint256"},{name:"amountTokenToPair",internalType:"uint256",type:"uint256"},{name:"amountPoolLauncherTokenMin",internalType:"uint256",type:"uint256"},{name:"amountTokenToPairMin",internalType:"uint256",type:"uint256"},{name:"lockDuration",internalType:"uint32",type:"uint32"}]}]},{name:"_recipient",internalType:"address",type:"address"},{name:"_refundAddress",internalType:"address",type:"address"}],name:"launch",outputs:[{name:"",internalType:"struct IPoolLauncher.PoolLauncherPool",type:"tuple",components:[{name:"createdAt",internalType:"uint32",type:"uint32"},{name:"pool",internalType:"address",type:"address"},{name:"poolLauncherToken",internalType:"address",type:"address"},{name:"tokenToPair",internalType:"address",type:"address"}]},{name:"",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"lockerFactory",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_locker",internalType:"address",type:"address"},{name:"_poolLauncherUnlockMin",internalType:"uint256",type:"uint256"},{name:"_tokenToPairUnlockMin",internalType:"uint256",type:"uint256"},{name:"_poolLauncherAmountMin",internalType:"uint256",type:"uint256"},{name:"_tokenToPairAmountMin",internalType:"uint256",type:"uint256"}],name:"migrate",outputs:[{name:"",internalType:"struct IPoolLauncher.PoolLauncherPool",type:"tuple",components:[{name:"createdAt",internalType:"uint32",type:"uint32"},{name:"pool",internalType:"address",type:"address"},{name:"poolLauncherToken",internalType:"address",type:"address"},{name:"tokenToPair",internalType:"address",type:"address"}]},{name:"",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"newPoolLauncher",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"owner",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_underlyingPool",internalType:"address",type:"address"}],name:"pools",outputs:[{name:"",internalType:"struct IPoolLauncher.PoolLauncherPool",type:"tuple",components:[{name:"createdAt",internalType:"uint32",type:"uint32"},{name:"pool",internalType:"address",type:"address"},{name:"poolLauncherToken",internalType:"address",type:"address"},{name:"tokenToPair",internalType:"address",type:"address"}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_token",internalType:"address",type:"address"}],name:"removePairableToken",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_pool",internalType:"address",type:"address"},{name:"_createdAt",internalType:"uint32",type:"uint32"}],name:"setCreationTimestamp",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_newPoolLauncher",internalType:"address",type:"address"}],name:"setNewPoolLauncher",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"newOwner",internalType:"address",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_pool",internalType:"address",type:"address"}],name:"unflagEmerging",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"v2Factory",outputs:[{name:"",internalType:"contract IV2Factory",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"v2Router",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"}],JQ=[{type:"constructor",inputs:[{name:"_multiWrapper",internalType:"contract MultiWrapper",type:"address"},{name:"existingOracles",internalType:"contract IOracle[]",type:"address[]"},{name:"oracleTypes",internalType:"enum OffchainOracle.OracleType[]",type:"uint8[]"},{name:"existingConnectors",internalType:"contract IERC20[]",type:"address[]"},{name:"wBase",internalType:"contract IERC20",type:"address"},{name:"owner_",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"error",inputs:[],name:"ArraysLengthMismatch"},{type:"error",inputs:[],name:"ConnectorAlreadyAdded"},{type:"error",inputs:[],name:"InvalidOracleTokenKind"},{type:"error",inputs:[],name:"MathOverflowedMulDiv"},{type:"error",inputs:[],name:"OracleAlreadyAdded"},{type:"error",inputs:[{name:"owner",internalType:"address",type:"address"}],name:"OwnableInvalidOwner"},{type:"error",inputs:[{name:"account",internalType:"address",type:"address"}],name:"OwnableUnauthorizedAccount"},{type:"error",inputs:[],name:"SameTokens"},{type:"error",inputs:[],name:"TooBigThreshold"},{type:"error",inputs:[],name:"UnknownConnector"},{type:"error",inputs:[],name:"UnknownOracle"},{type:"event",anonymous:!1,inputs:[{name:"connector",internalType:"contract IERC20",type:"address",indexed:!1}
62],name:"ConnectorAdded"},{type:"event",anonymous:!1,inputs:[{name:"connector",internalType:"contract IERC20",type:"address",indexed:!1}],name:"ConnectorRemoved"},{type:"event",anonymous:!1,inputs:[{name:"multiWrapper",internalType:"contract MultiWrapper",type:"address",indexed:!1}],name:"MultiWrapperUpdated"},{type:"event",anonymous:!1,inputs:[{name:"oracle",internalType:"contract IOracle",type:"address",indexed:!1},{name:"oracleType",internalType:"enum OffchainOracle.OracleType",type:"uint8",indexed:!1}],name:"OracleAdded"},{type:"event",anonymous:!1,inputs:[{name:"oracle",internalType:"contract IOracle",type:"address",indexed:!1},{name:"oracleType",internalType:"enum OffchainOracle.OracleType",type:"uint8",indexed:!1}],name:"OracleRemoved"},{type:"event",anonymous:!1,inputs:[{name:"previousOwner",internalType:"address",type:"address",indexed:!0},{name:"newOwner",internalType:"address",type:"address",indexed:!0}],name:"OwnershipTransferred"},{type:"function",inputs:[{name:"connector",internalType:"contract IERC20",type:"address"}],name:"addConnector",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"oracle",internalType:"contract IOracle",type:"address"},{name:"oracleKind",internalType:"enum OffchainOracle.OracleType",type:"uint8"}],name:"addOracle",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"connectors",outputs:[{name:"allConnectors",internalType:"contract IERC20[]",type:"address[]"}],stateMutability:"view"},{type:"function",inputs:[{name:"srcTokens",internalType:"contract IERC20[]",type:"address[]"},{name:"useWrappers",internalType:"bool",type:"bool"},{name:"customConnectors",internalType:"contract IERC20[]",type:"address[]"},{name:"thresholdFilter",internalType:"uint256",type:"uint256"}],name:"getManyRatesToEthWithCustomConnectors",outputs:[{name:"weightedRates",internalType:"uint256[]",type:"uint256[]"}],stateMutability:"view"},{type:"function",inputs:[{name:"srcTokens",internalType:"contract IERC20[]",type:"address[]"},{name:"dstToken",internalType:"contract IERC20",type:"address"},{name:"useWrappers",internalType:"bool",type:"bool"},{name:"customConnectors",internalType:"contract IERC20[]",type:"address[]"},{name:"thresholdFilter",internalType:"uint256",type:"uint256"}],name:"getManyRatesWithCustomConnectors",outputs:[{name:"weightedRates",internalType:"uint256[]",type:"uint256[]"}],stateMutability:"view"},{type:"function",inputs:[{name:"srcTokens",internalType:"contract IERC20[]",type:"address[]"},{name:"dstToken",internalType:"contract IERC20",type:"address"},{name:"useWrappers",internalType:"bool",type:"bool"},{name:"customConnectors",internalType:"contract IERC20[]",type:"address[]"},{name:"customOracles",internalType:"contract IOracle[]",type:"address[]"},{name:"thresholdFilter",internalType:"uint256",type:"uint256"}],name:"getManyRatesWithCustomConnectorsAndOracles",outputs:[{name:"weightedRates",internalType:"uint256[]",type:"uint256[]"}],stateMutability:"view"},{type:"function",inputs:[{name:"srcToken",internalType:"contract IERC20",type:"address"},{name:"dstToken",internalType:"contract IERC20",type:"address"},{name:"useWrappers",internalType:"bool",type:"bool"}],name:"getRate",outputs:[{name:"weightedRate",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"srcToken",internalType:"contract IERC20",type:"address"},{name:"useSrcWrappers",internalType:"bool",type:"bool"}],name:"getRateToEth",outputs:[{name:"weightedRate",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"srcToken",internalType:"contract IERC20",type:"address"},{name:"useSrcWrappers",internalType:"bool",type:"bool"},{name:"customConnectors",internalType:"contract IERC20[]",type:"address[]"},{name:"thresholdFilter",internalType:"uint256",type:"uint256"}],name:"getRateToEthWithCustomConnectors",outputs:[{name:"weightedRate",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"srcToken",internalType:"contract IERC20",type:"address"},{name:"useSrcWrappers",internalType:"bool",type:"bool"},{name:"thresholdFilter",internalType:"uint256",type:"uint256"}],name:"getRateToEthWithThreshold",outputs:[{name:"weightedRate",internalType:"uint256",type:"uint256"}],stateMutability:"view"}
62,{type:"function",inputs:[{name:"srcToken",internalType:"contract IERC20",type:"address"},{name:"dstToken",internalType:"contract IERC20",type:"address"},{name:"useWrappers",internalType:"bool",type:"bool"},{name:"customConnectors",internalType:"contract IERC20[]",type:"address[]"},{name:"thresholdFilter",internalType:"uint256",type:"uint256"}],name:"getRateWithCustomConnectors",outputs:[{name:"weightedRate",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"srcToken",internalType:"contract IERC20",type:"address"},{name:"dstToken",internalType:"contract IERC20",type:"address"},{name:"useWrappers",internalType:"bool",type:"bool"},{name:"customConnectors",internalType:"contract IERC20[]",type:"address[]"},{name:"customOracles",internalType:"contract IOracle[]",type:"address[]"},{name:"thresholdFilter",internalType:"uint256",type:"uint256"}],name:"getRateWithCustomConnectorsAndOracles",outputs:[{name:"weightedRate",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"srcToken",internalType:"contract IERC20",type:"address"},{name:"dstToken",internalType:"contract IERC20",type:"address"},{name:"useWrappers",internalType:"bool",type:"bool"},{name:"thresholdFilter",internalType:"uint256",type:"uint256"}],name:"getRateWithThreshold",outputs:[{name:"weightedRate",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"multiWrapper",outputs:[{name:"",internalType:"contract MultiWrapper",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"oracles",outputs:[{name:"allOracles",internalType:"contract IOracle[]",type:"address[]"},{name:"oracleTypes",internalType:"enum OffchainOracle.OracleType[]",type:"uint8[]"}],stateMutability:"view"},{type:"function",inputs:[],name:"owner",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"connector",internalType:"contract IERC20",type:"address"}],name:"removeConnector",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"oracle",internalType:"contract IOracle",type:"address"},{name:"oracleKind",internalType:"enum OffchainOracle.OracleType",type:"uint8"}],name:"removeOracle",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_multiWrapper",internalType:"contract MultiWrapper",type:"address"}],name:"setMultiWrapper",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"newOwner",internalType:"address",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable"}],eJ=[{type:"function",inputs:[{name:"_account",type:"address"}],name:"all",outputs:[{name:"",type:"tuple[]",components:[{name:"venft_id",type:"uint256"},{name:"decimals",type:"uint8"},{name:"amount",type:"uint128"},{name:"voting_amount",type:"uint256"},{name:"used_voting_amount",type:"uint256"},{name:"voted_at",type:"uint256"},{name:"votes",type:"tuple[]",components:[{name:"lp",type:"address"},{name:"weight",type:"uint256"}]},{name:"token",type:"address"},{name:"compounded",type:"uint256"},{name:"withdrawable",type:"uint256"},{name:"run_at",type:"uint256"},{name:"managers",type:"address[]"},{name:"relay",type:"address"},{name:"compounder",type:"bool"},{name:"inactive",type:"bool"},{name:"name",type:"string"},{name:"account_venfts",type:"tuple[]",components:[{name:"id",type:"uint256"},{name:"amount",type:"uint256"},{name:"earned",type:"uint256"}]}]}],stateMutability:"view"},{type:"function",inputs:[{name:"arg0",type:"uint256"}],name:"registries",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"voter",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"swapper",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"ve",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"token",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"constructor",inputs:[{name:"_registries",type:"address[]"},{name:"_voter",type:"address"},{name:"_swapper",type:"address"}],stateMutability:"nonpayable"}],tJ=[{type:"function",inputs:[{name:"_limit",type:"uint256"},{name:"_offset",type:"uint256"}],name:"epochsLatest",outputs:[{name:"",type:"tuple[]",components:[{name:"ts",type:"uint256"},{name:"lp",type:"address"},{name:"votes",type:"uint256"},{name:"emissions",type:"uint256"},{name:"bribes",type:"tuple[]",components:[{name:"token",type:"address"},{name:"amount",type:"uint256"}]},{name:"fees",type:"tuple[]",components:[{name:"token",type:"address"},{name:"amount",type:"uint256"}]}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_limit",type:"uint256"},{name:"_offset",type:"uint256"},{name:"_address",type:"address"}],name:"epochsByAddress",outputs:[{name:"",type:"tuple[]",components:[{name:"ts",type:"uint256"},{name:"lp",type:"address"},{name:"votes",type:"uint256"},{name:"emissions",type:"uint256"},{name:"bribes",type:"tuple[]",components:[{name:"token",type:"address"},{name:"amount",type:"uint256"}]},{name:"fees",type:"tuple[]",components:[{name:"token",type:"address"},{name:"amount",type:"uint256"}]}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_limit",type:"uint256"},{name:"_offset",type:"uint256"},{name:"_venft_id",type:"uint256"}],name:"rewards",outputs:[{name:"",type:"tuple[]",components:[{name:"venft_id",type:"uint256"},{name:"lp",type:"address"},{name:"amount",type:"uint256"},{name:"token",type:"address"},{name:"fee",type:"address"},{name:"bribe",type:"address"}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_venft_id",type:"uint256"},{name:"_pool",type:"address"}],name:"rewardsByAddress",outputs:[{name:"",type:"tuple[]",components:[{name:"venft_id",type:"uint256"},{name:"lp",type:"address"},{name:"amount",type:"uint256"},{name:"token",type:"address"},{name:"fee",type:"address"},{name:"bribe",type:"address"}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_root_pool",type:"address"}],name:"forRoot",outputs:[{name:"",type:"address[3]"}],stateMutability:"view"},{type:"function",inputs:[],name:"MAX_EPOCHS",outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"MAX_REWARDS",outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"WEEK",outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{type:"constructor",inputs:[{name:"_voter",type:"address"},{name:"_registry",type:"address"},{name:"_convertor",type:"address"}],stateMutability:"nonpayable"}],nJ=[{type:"constructor",inputs:[{name:"_factory",internalType:"address",type:"address"},{name:"_legacyCLFactory",internalType:"address",type:"address"},{name:"_legacyCLFactory2",internalType:"address",type:"address"},{name:"_factoryV2",internalType:"address",type:"address"},{name:"_WETH9",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"WETH9",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"factory",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"factoryV2",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"legacyCLFactory",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"legacyCLFactory2",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"path",internalType:"bytes",type:"bytes"},{name:"amountIn",internalType:"uint256",type:"uint256"}],name:"quoteExactInput",outputs:[{name:"amountOut",internalType:"uint256",type:"uint256"},{name:"v3SqrtPriceX96AfterList",internalType:"uint160[]",type:"uint160[]"},{name:"v3InitializedTicksCrossedList",internalType:"uint32[]",type:"uint32[]"},{name:"v3SwapGasEstimate",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"params",internalType:"struct IMixedRouteQuoterV2.QuoteExactInputSingleV2Params",type:"tuple",components:[{name:"tokenIn",internalType:"address",type:"address"},{name:"tokenOut",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"amountIn",internalType:"uint256",type:"uint256"}]}],name:"quoteExactInputSingleV2",outputs:[{name:"amountOut",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"params",internalType:"struct IMixedRouteQuoterV2.QuoteExactInputSingleV3Params",type:"tuple",components:[{name:"tokenIn",internalType:"address",type:"address"},{name:"tokenOut",internalType:"address",type:"address"},{name:"amountIn",internalType:"uint256",type:"uint256"},{name:"tickSpacing",internalType:"int24",type:"int24"},{name:"sqrtPriceLimitX96",internalType:"uint160",type:"uint160"}]}],name:"quoteExactInputSingleV3",outputs:[{name:"amountOut",internalType:"uint256",type:"uint256"},{name:"sqrtPriceX96After",internalType:"uint160",type:"uint160"},{name:"initializedTicksCrossed",internalType:"uint32",type:"uint32"},{name:"gasEstimate",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"path",internalType:"bytes",type:"bytes"},{name:"amountOut",internalType:"uint256",type:"uint256"}],name:"quoteExactOutput",outputs:[{name:"amountIn",internalType:"uint256",type:"uint256"},{name:"sqrtPriceX96AfterList",internalType:"uint160[]",type:"uint160[]"},{name:"initializedTicksCrossedList",internalType:"uint32[]",type:"uint32[]"},{name:"gasEstimate",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"params",internalType:"struct IMixedRouteQuoterV2.QuoteExactOutputSingleV3Params",type:"tuple",components:[{name:"tokenIn",internalType:"address",type:"address"},{name:"tokenOut",internalType:"address",type:"address"},{name:"amountOut",internalType:"uint256",type:"uint256"},{name:"tickSpacing",internalType:"int24",type:"int24"},{name:"sqrtPriceLimitX96",internalType:"uint160",type:"uint160"}]}],name:"quoteExactOutputSingleV3",outputs:[{name:"amountIn",internalType:"uint256",type:"uint256"},{name:"sqrtPriceX96After",internalType:"uint160",type:"uint160"},{name:"initializedTicksCrossed",internalType:"uint32",type:"uint32"},{name:"gasEstimate",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"amount0Delta",internalType:"int256",type:"int256"},{name:"amount1Delta",internalType:"int256",type:"int256"},{name:"path",internalType:"bytes",type:"bytes"}],name:"uniswapV3SwapCallback",outputs:[],stateMutability:"view"}],rJ=[{type:"constructor",inputs:[{name:"_forwarder",internalType:"address",type:"address"},{name:"_factoryRegistry",internalType:"address",type:"address"},{name:"_v1Factory",internalType:"address",type:"address"},{name:"_factory",internalType:"address",type:"address"},{name:"_voter",internalType:"address",type:"address"},{name:"_weth",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"error",inputs:[],name:"ConversionFromV2ToV1VeloProhibited"},{type:"error",inputs:[],name:"ETHTransferFailed"},{type:"error",inputs:[],name:"Expired"},{type:"error",inputs:[],name:"InsufficientAmount"},{type:"error",inputs:[],name:"InsufficientAmountA"},{type:"error",inputs:[],name:"InsufficientAmountADesired"},{type:"error",inputs:[],name:"InsufficientAmountAOptimal"},{type:"error",inputs:[],name:"InsufficientAmountB"},{type:"error",inputs:[],name:"InsufficientAmountBDesired"},{type:"error",inputs:[],name:"InsufficientLiquidity"},{type:"error",inputs:[],name:"InsufficientOutputAmount"},{type:"error",inputs:[],name:"InvalidAmountInForETHDeposit"},{type:"error",inputs:[],name:"InvalidPath"},{type:"error",inputs:[],name:"InvalidRouteA"},{type:"error",inputs:[],name:"InvalidRouteB"},{type:"error",inputs:[],name:"InvalidTokenInForETHDeposit"},{type:"error",inputs:[],name:"OnlyWETH"},{type:"error",inputs:[],name:"PoolDoesNotExist"},{type:"error",inputs:[],name:"PoolFactoryDoesNotExist"},{type:"error",inputs:[],name:"SameAddresses"},{type:"error",inputs:[],name:"ZeroAddress"},{type:"function",inputs:[],name:"ETHER",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"amounts",internalType:"uint256[]",type:"uint256[]"},{name:"routes",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]},{name:"to",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"UNSAFE_swapExactTokensForTokens",outputs:[{name:"",internalType:"uint256[]",type:"uint256[]"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"amountADesired",internalType:"uint256",type:"uint256"},{name:"amountBDesired",internalType:"uint256",type:"uint256"},{name:"amountAMin",internalType:"uint256",type:"uint256"},{name:"amountBMin",internalType:"uint256",type:"uint256"},{name:"to",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"addLiquidity",outputs:[{name:"amountA",internalType:"uint256",type:"uint256"},{name:"amountB",internalType:"uint256",type:"uint256"},{name:"liquidity",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"}
62,{type:"function",inputs:[{name:"token",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"amountTokenDesired",internalType:"uint256",type:"uint256"},{name:"amountTokenMin",internalType:"uint256",type:"uint256"},{name:"amountETHMin",internalType:"uint256",type:"uint256"},{name:"to",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"addLiquidityETH",outputs:[{name:"amountToken",internalType:"uint256",type:"uint256"},{name:"amountETH",internalType:"uint256",type:"uint256"},{name:"liquidity",internalType:"uint256",type:"uint256"}],stateMutability:"payable"},{type:"function",inputs:[],name:"defaultFactory",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"factoryRegistry",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"_factory",internalType:"address",type:"address"},{name:"amountInA",internalType:"uint256",type:"uint256"},{name:"amountInB",internalType:"uint256",type:"uint256"},{name:"routesA",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]},{name:"routesB",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]}],name:"generateZapInParams",outputs:[{name:"amountOutMinA",internalType:"uint256",type:"uint256"},{name:"amountOutMinB",internalType:"uint256",type:"uint256"},{name:"amountAMin",internalType:"uint256",type:"uint256"},{name:"amountBMin",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"_factory",internalType:"address",type:"address"},{name:"liquidity",internalType:"uint256",type:"uint256"},{name:"routesA",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]},{name:"routesB",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]}],name:"generateZapOutParams",outputs:[{name:"amountOutMinA",internalType:"uint256",type:"uint256"},{name:"amountOutMinB",internalType:"uint256",type:"uint256"},{name:"amountAMin",internalType:"uint256",type:"uint256"},{name:"amountBMin",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"amountIn",internalType:"uint256",type:"uint256"},{name:"routes",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]}],name:"getAmountsOut",outputs:[{name:"amounts",internalType:"uint256[]",type:"uint256[]"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"_factory",internalType:"address",type:"address"}],name:"getReserves",outputs:[{name:"reserveA",internalType:"uint256",type:"uint256"},{name:"reserveB",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"forwarder",internalType:"address",type:"address"}],name:"isTrustedForwarder",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"_factory",internalType:"address",type:"address"}],name:"pairFor",outputs:[{name:"pool",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"_factory",internalType:"address",type:"address"}],name:"poolFor",outputs:[{name:"pool",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"_factory",internalType:"address",type:"address"},{name:"amountADesired",internalType:"uint256",type:"uint256"},{name:"amountBDesired",internalType:"uint256",type:"uint256"}],name:"quoteAddLiquidity",outputs:[{name:"amountA",internalType:"uint256",type:"uint256"},{name:"amountB",internalType:"uint256",type:"uint256"},{name:"liquidity",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"_factory",internalType:"address",type:"address"},{name:"liquidity",internalType:"uint256",type:"uint256"}],name:"quoteRemoveLiquidity",outputs:[{name:"amountA",internalType:"uint256",type:"uint256"},{name:"amountB",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"},{name:"_factory",internalType:"address",type:"address"}
62],name:"quoteStableLiquidityRatio",outputs:[{name:"ratio",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"liquidity",internalType:"uint256",type:"uint256"},{name:"amountAMin",internalType:"uint256",type:"uint256"},{name:"amountBMin",internalType:"uint256",type:"uint256"},{name:"to",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"removeLiquidity",outputs:[{name:"amountA",internalType:"uint256",type:"uint256"},{name:"amountB",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"token",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"liquidity",internalType:"uint256",type:"uint256"},{name:"amountTokenMin",internalType:"uint256",type:"uint256"},{name:"amountETHMin",internalType:"uint256",type:"uint256"},{name:"to",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"removeLiquidityETH",outputs:[{name:"amountToken",internalType:"uint256",type:"uint256"},{name:"amountETH",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"token",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"liquidity",internalType:"uint256",type:"uint256"},{name:"amountTokenMin",internalType:"uint256",type:"uint256"},{name:"amountETHMin",internalType:"uint256",type:"uint256"},{name:"to",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{name:"amountETH",internalType:"uint256",type:"uint256"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"}],name:"sortTokens",outputs:[{name:"token0",internalType:"address",type:"address"},{name:"token1",internalType:"address",type:"address"}],stateMutability:"pure"},{type:"function",inputs:[{name:"amountOutMin",internalType:"uint256",type:"uint256"},{name:"routes",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]},{name:"to",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{name:"amounts",internalType:"uint256[]",type:"uint256[]"}],stateMutability:"payable"},{type:"function",inputs:[{name:"amountOutMin",internalType:"uint256",type:"uint256"},{name:"routes",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]},{name:"to",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable"},{type:"function",inputs:[{name:"amountIn",internalType:"uint256",type:"uint256"},{name:"amountOutMin",internalType:"uint256",type:"uint256"},{name:"routes",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]},{name:"to",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{name:"amounts",internalType:"uint256[]",type:"uint256[]"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"amountIn",internalType:"uint256",type:"uint256"},{name:"amountOutMin",internalType:"uint256",type:"uint256"},{name:"routes",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]},{name:"to",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"amountIn",internalType:"uint256",type:"uint256"},{name:"amountOutMin",internalType:"uint256",type:"uint256"},{name:"routes",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]},{name:"to",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{name:"amounts",internalType:"uint256[]",type:"uint256[]"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"amountIn",internalType:"uint256",type:"uint256"},{name:"amountOutMin",internalType:"uint256",type:"uint256"},{name:"routes",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]},{name:"to",internalType:"address",type:"address"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"v1Factory",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"voter",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"weth",outputs:[{name:"",internalType:"contract IWETH",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"tokenIn",internalType:"address",type:"address"},{name:"amountInA",internalType:"uint256",type:"uint256"},{name:"amountInB",internalType:"uint256",type:"uint256"},{name:"zapInPool",internalType:"struct IRouter.Zap",type:"tuple",components:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"},{name:"amountOutMinA",internalType:"uint256",type:"uint256"},{name:"amountOutMinB",internalType:"uint256",type:"uint256"},{name:"amountAMin",internalType:"uint256",type:"uint256"},{name:"amountBMin",internalType:"uint256",type:"uint256"}]},{name:"routesA",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]},{name:"routesB",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]},{name:"to",internalType:"address",type:"address"},{name:"stake",internalType:"bool",type:"bool"}],name:"zapIn",outputs:[{name:"liquidity",internalType:"uint256",type:"uint256"}],stateMutability:"payable"},{type:"function",inputs:[{name:"tokenOut",internalType:"address",type:"address"},{name:"liquidity",internalType:"uint256",type:"uint256"},{name:"zapOutPool",internalType:"struct IRouter.Zap",type:"tuple",components:[{name:"tokenA",internalType:"address",type:"address"},{name:"tokenB",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"},{name:"amountOutMinA",internalType:"uint256",type:"uint256"},{name:"amountOutMinB",internalType:"uint256",type:"uint256"},{name:"amountAMin",internalType:"uint256",type:"uint256"},{name:"amountBMin",internalType:"uint256",type:"uint256"}]},{name:"routesA",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]},{name:"routesB",internalType:"struct IRouter.Route[]",type:"tuple[]",components:[{name:"from",internalType:"address",type:"address"},{name:"to",internalType:"address",type:"address"},{name:"stable",internalType:"bool",type:"bool"},{name:"factory",internalType:"address",type:"address"}]}],name:"zapOut",outputs:[],stateMutability:"nonpayable"},{type:"receive",stateMutability:"payable"}],iJ=[{type:"function",inputs:[{name:"amount1",internalType:"uint256",type:"uint256"},{name:"pool",internalType:"address",type:"address"},{name:"sqrtRatioX96",internalType:"uint160",type:"uint160"},{name:"tickLow",internalType:"int24",type:"int24"},{name:"tickHigh",internalType:"int24",type:"int24"}],name:"estimateAmount0",outputs:[{name:"amount0",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"amount0",internalType:"uint256",type:"uint256"},{name:"pool",internalType:"address",type:"address"},{name:"sqrtRatioX96",internalType:"uint160",type:"uint160"},{name:"tickLow",internalType:"int24",type:"int24"},{name:"tickHigh",internalType:"int24",type:"int24"}],name:"estimateAmount1",outputs:[{name:"amount1",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"positionManager",internalType:"contract INonfungiblePositionManager",type:"address"},{name:"tokenId",internalType:"uint256",type:"uint256"}],name:"fees",outputs:[{name:"amount0",internalType:"uint256",type:"uint256"},{name:"amount1",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"sqrtRatioAX96",internalType:"uint160",type:"uint160"},{name:"sqrtRatioBX96",internalType:"uint160",type:"uint160"},{name:"liquidity",internalType:"uint128",type:"uint128"},{name:"roundUp",internalType:"bool",type:"bool"}],name:"getAmount0Delta",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"pure"},{type:"function",inputs:[{name:"sqrtRatioAX96",internalType:"uint160",type:"uint160"},{name:"sqrtRatioBX96",internalType:"uint160",type:"uint160"},{name:"liquidity",internalType:"int128",type:"int128"}],name:"getAmount0Delta",outputs:[{name:"",internalType:"int256",type:"int256"}],stateMutability:"pure"},{type:"function",inputs:[{name:"sqrtRatioAX96",internalType:"uint160",type:"uint160"},{name:"sqrtRatioBX96",internalType:"uint160",type:"uint160"},{name:"liquidity",internalType:"int128",type:"int128"}
62],name:"getAmount1Delta",outputs:[{name:"",internalType:"int256",type:"int256"}],stateMutability:"pure"},{type:"function",inputs:[{name:"sqrtRatioAX96",internalType:"uint160",type:"uint160"},{name:"sqrtRatioBX96",internalType:"uint160",type:"uint160"},{name:"liquidity",internalType:"uint128",type:"uint128"},{name:"roundUp",internalType:"bool",type:"bool"}],name:"getAmount1Delta",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"pure"},{type:"function",inputs:[{name:"sqrtRatioX96",internalType:"uint160",type:"uint160"},{name:"sqrtRatioAX96",internalType:"uint160",type:"uint160"},{name:"sqrtRatioBX96",internalType:"uint160",type:"uint160"},{name:"liquidity",internalType:"uint128",type:"uint128"}],name:"getAmountsForLiquidity",outputs:[{name:"amount0",internalType:"uint256",type:"uint256"},{name:"amount1",internalType:"uint256",type:"uint256"}],stateMutability:"pure"},{type:"function",inputs:[{name:"amount0",internalType:"uint256",type:"uint256"},{name:"amount1",internalType:"uint256",type:"uint256"},{name:"sqrtRatioX96",internalType:"uint160",type:"uint160"},{name:"sqrtRatioAX96",internalType:"uint160",type:"uint160"},{name:"sqrtRatioBX96",internalType:"uint160",type:"uint160"}],name:"getLiquidityForAmounts",outputs:[{name:"liquidity",internalType:"uint256",type:"uint256"}],stateMutability:"pure"},{type:"function",inputs:[{name:"pool",internalType:"address",type:"address"},{name:"startTick",internalType:"int24",type:"int24"}],name:"getPopulatedTicks",outputs:[{name:"populatedTicks",internalType:"struct ISlipstreamSugar.PopulatedTick[]",type:"tuple[]",components:[{name:"tick",internalType:"int24",type:"int24"},{name:"sqrtRatioX96",internalType:"uint160",type:"uint160"},{name:"liquidityNet",internalType:"int128",type:"int128"},{name:"liquidityGross",internalType:"uint128",type:"uint128"}]}],stateMutability:"view"},{type:"function",inputs:[{name:"tick",internalType:"int24",type:"int24"}],name:"getSqrtRatioAtTick",outputs:[{name:"sqrtRatioX96",internalType:"uint160",type:"uint160"}],stateMutability:"pure"},{type:"function",inputs:[{name:"sqrtPriceX96",internalType:"uint160",type:"uint160"}],name:"getTickAtSqrtRatio",outputs:[{name:"tick",internalType:"int24",type:"int24"}],stateMutability:"pure"},{type:"function",inputs:[{name:"pool",internalType:"address",type:"address"},{name:"liquidity",internalType:"uint128",type:"uint128"},{name:"tickCurrent",internalType:"int24",type:"int24"},{name:"tickLower",internalType:"int24",type:"int24"},{name:"tickUpper",internalType:"int24",type:"int24"}],name:"poolFees",outputs:[{name:"amount0",internalType:"uint256",type:"uint256"},{name:"amount1",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"positionManager",internalType:"contract INonfungiblePositionManager",type:"address"},{name:"tokenId",internalType:"uint256",type:"uint256"},{name:"sqrtRatioX96",internalType:"uint160",type:"uint160"}],name:"principal",outputs:[{name:"amount0",internalType:"uint256",type:"uint256"},{name:"amount1",internalType:"uint256",type:"uint256"}],stateMutability:"view"}],sJ=[{type:"constructor",inputs:[{name:"_owner",internalType:"address",type:"address"},{name:"_xerc20",internalType:"address",type:"address"},{name:"_module",internalType:"address",type:"address"},{name:"_paymasterVault",internalType:"address",type:"address"},{name:"_ism",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"error",inputs:[{name:"target",internalType:"address",type:"address"}],name:"AddressEmptyCode"},{type:"error",inputs:[{name:"account",internalType:"address",type:"address"}],name:"AddressInsufficientBalance"},{type:"error",inputs:[],name:"AlreadyRegistered"},{type:"error",inputs:[],name:"FailedInnerCall"},{type:"error",inputs:[],name:"InsufficientBalance"},{type:"error",inputs:[],name:"InvalidAddress"},{type:"error",inputs:[],name:"InvalidChain"},{type:"error",inputs:[],name:"InvalidCommand"},{type:"error",inputs:[],name:"NotBridge"},{type:"error",inputs:[],name:"NotMailbox"},{type:"error",inputs:[],name:"NotPaymasterVault"},{type:"error",inputs:[],name:"NotRegistered"},{type:"error",inputs:[],name:"NotRoot"},{type:"error",inputs:[{name:"owner",internalType:"address",type:"address"}],name:"OwnableInvalidOwner"},{type:"error",inputs:[{name:"account",internalType:"address",type:"address"}],name:"OwnableUnauthorizedAccount"},{type:"error",inputs:[{name:"spender",internalType:"address",type:"address"},{name:"currentAllowance",internalType:"uint256",type:"uint256"},{name:"requestedDecrease",internalType:"uint256",type:"uint256"}],name:"SafeERC20FailedDecreaseAllowance"}
62,{type:"error",inputs:[{name:"token",internalType:"address",type:"address"}],name:"SafeERC20FailedOperation"},{type:"error",inputs:[],name:"ZeroAddress"},{type:"error",inputs:[],name:"ZeroAmount"},{type:"event",anonymous:!1,inputs:[{name:"_chainid",internalType:"uint256",type:"uint256",indexed:!0}],name:"ChainDeregistered"},{type:"event",anonymous:!1,inputs:[{name:"_chainid",internalType:"uint256",type:"uint256",indexed:!0}],name:"ChainRegistered"},{type:"event",anonymous:!1,inputs:[{name:"_newHook",internalType:"address",type:"address",indexed:!0}],name:"HookSet"},{type:"event",anonymous:!1,inputs:[{name:"_new",internalType:"address",type:"address",indexed:!0}],name:"InterchainSecurityModuleSet"},{type:"event",anonymous:!1,inputs:[{name:"_sender",internalType:"address",type:"address",indexed:!0},{name:"_module",internalType:"address",type:"address",indexed:!0}],name:"ModuleSet"},{type:"event",anonymous:!1,inputs:[{name:"previousOwner",internalType:"address",type:"address",indexed:!0},{name:"newOwner",internalType:"address",type:"address",indexed:!0}],name:"OwnershipTransferred"},{type:"event",anonymous:!1,inputs:[{name:"_newPaymaster",internalType:"address",type:"address",indexed:!0}],name:"PaymasterVaultSet"},{type:"event",anonymous:!1,inputs:[{name:"_origin",internalType:"uint32",type:"uint32",indexed:!0},{name:"_sender",internalType:"bytes32",type:"bytes32",indexed:!0},{name:"_value",internalType:"uint256",type:"uint256",indexed:!1},{name:"_message",internalType:"string",type:"string",indexed:!1}],name:"ReceivedMessage"},{type:"event",anonymous:!1,inputs:[{name:"_destination",internalType:"uint32",type:"uint32",indexed:!0},{name:"_recipient",internalType:"bytes32",type:"bytes32",indexed:!0},{name:"_value",internalType:"uint256",type:"uint256",indexed:!1},{name:"_message",internalType:"string",type:"string",indexed:!1},{name:"_metadata",internalType:"string",type:"string",indexed:!1}],name:"SentMessage"},{type:"event",anonymous:!1,inputs:[{name:"_account",internalType:"address",type:"address",indexed:!0},{name:"_state",internalType:"bool",type:"bool",indexed:!0}],name:"WhitelistSet"},{type:"function",inputs:[],name:"GAS_LIMIT",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"pure"},{type:"function",inputs:[],name:"chainids",outputs:[{name:"",internalType:"uint256[]",type:"uint256[]"}],stateMutability:"view"},{type:"function",inputs:[{name:"_chainid",internalType:"uint256",type:"uint256"}],name:"contains",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[{name:"_chainid",internalType:"uint256",type:"uint256"}],name:"deregisterChain",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"erc20",outputs:[{name:"",internalType:"contract IERC20",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"escrow",outputs:[{name:"",internalType:"contract IVotingEscrow",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_origin",internalType:"uint32",type:"uint32"},{name:"_sender",internalType:"bytes32",type:"bytes32"},{name:"_message",internalType:"bytes",type:"bytes"}],name:"handle",outputs:[],stateMutability:"payable"},{type:"function",inputs:[],name:"hook",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"interchainSecurityModule",outputs:[{name:"",internalType:"contract IInterchainSecurityModule",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_account",internalType:"address",type:"address"}],name:"isWhitelisted",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[],name:"lockbox",outputs:[{name:"",internalType:"contract IXERC20Lockbox",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"mailbox",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"module",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"owner",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"paymasterVault",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_chainid",internalType:"uint256",type:"uint256"}],name:"registerChain",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"securityModule",outputs:[{name:"",internalType:"contract IInterchainSecurityModule",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_recipient",internalType:"address",type:"address"},{name:"_amount",internalType:"uint256",type:"uint256"},{name:"_chainid",internalType:"uint256",type:"uint256"}],name:"sendToken",outputs:[],stateMutability:"payable"},{type:"function",inputs:[{name:"_hook",internalType:"address",type:"address"}],name:"setHook",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_ism",internalType:"address",type:"address"}],name:"setInterchainSecurityModule",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_module",internalType:"address",type:"address"}],name:"setModule",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_paymasterVault",internalType:"address",type:"address"}],name:"setPaymasterVault",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"newOwner",internalType:"address",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"whitelist",outputs:[{name:"",internalType:"address[]",type:"address[]"}],stateMutability:"view"},{type:"function",inputs:[{name:"_account",internalType:"address",type:"address"},{name:"_state",internalType:"bool",type:"bool"}],name:"whitelistForSponsorship",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"whitelistLength",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"xerc20",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"receive",stateMutability:"payable"}],xO=[{type:"constructor",inputs:[{name:"params",internalType:"struct RouterDeployParameters",type:"tuple",components:[{name:"permit2",internalType:"address",type:"address"},{name:"weth9",internalType:"address",type:"address"},{name:"v2Factory",internalType:"address",type:"address"},{name:"v3Factory",internalType:"address",type:"address"},{name:"pairInitCodeHash",internalType:"bytes32",type:"bytes32"},{name:"poolInitCodeHash",internalType:"bytes32",type:"bytes32"},{name:"v4PoolManager",internalType:"address",type:"address"},{name:"veloV2Factory",internalType:"address",type:"address"},{name:"veloCLFactory",internalType:"address",type:"address"},{name:"veloV2InitCodeHash",internalType:"bytes32",type:"bytes32"},{name:"veloCLInitCodeHash",internalType:"bytes32",type:"bytes32"},{name:"veloCLFactory2",internalType:"address",type:"address"},{name:"veloCLInitCodeHash2",internalType:"bytes32",type:"bytes32"},{name:"veloCLFactory3",internalType:"address",type:"address"},{name:"veloCLInitCodeHash3",internalType:"bytes32",type:"bytes32"}]}],stateMutability:"nonpayable"},{type:"error",inputs:[],name:"BalanceTooLow"},{type:"error",inputs:[],name:"ContractLocked"},{type:"error",inputs:[{name:"currency",internalType:"Currency",type:"address"}],name:"DeltaNotNegative"},{type:"error",inputs:[{name:"currency",internalType:"Currency",type:"address"}],name:"DeltaNotPositive"},{type:"error",inputs:[],name:"ETHNotAccepted"},{type:"error",inputs:[{name:"commandIndex",internalType:"uint256",type:"uint256"},{name:"message",internalType:"bytes",type:"bytes"}],name:"ExecutionFailed"},{type:"error",inputs:[],name:"FromAddressIsNotOwner"},{type:"error",inputs:[],name:"InputLengthMismatch"},{type:"error",inputs:[],name:"InsufficientBalance"},{type:"error",inputs:[],name:"InsufficientETH"},{type:"error",inputs:[],name:"InsufficientToken"},{type:"error",inputs:[],name:"InvalidBips"},{type:"error",inputs:[{name:"bridgeType",internalType:"uint8",type:"uint8"}],name:"InvalidBridgeType"},{type:"error",inputs:[{name:"commandType",internalType:"uint256",type:"uint256"}],name:"InvalidCommandType"},{type:"error",inputs:[],name:"InvalidEthSender"},{type:"error",inputs:[],name:"InvalidPath"},{type:"error",inputs:[],name:"InvalidRecipient"},{type:"error",inputs:[],name:"InvalidReserves"},{type:"error",inputs:[],name:"InvalidTokenAddress"},{type:"error",inputs:[],name:"LengthMismatch"},{type:"error",inputs:[],name:"NotPoolManager"},{type:"error",inputs:[],name:"SliceOutOfBounds"},{type:"error",inputs:[],name:"StableExactOutputUnsupported"},{type:"error",inputs:[{name:"tokenFee",internalType:"uint256",type:"uint256"},{name:"maxTokenFee",internalType:"uint256",type:"uint256"}],name:"TokenFeeExceedsMax"},{type:"error",inputs:[],name:"TransactionDeadlinePassed"},{type:"error",inputs:[],name:"UnsafeCast"},{type:"error",inputs:[{name:"action",internalType:"uint256",type:"uint256"}],name:"UnsupportedAction"},{type:"error",inputs:[],name:"V2InvalidPath"},{type:"error",inputs:[],name:"V2TooLittleReceived"},{type:"error",inputs:[],name:"V2TooMuchRequested"},{type:"error",inputs:[],name:"V3InvalidAmountOut"},{type:"error",inputs:[],name:"V3InvalidCaller"},{type:"error",inputs:[],name:"V3InvalidSwap"},{type:"error",inputs:[],name:"V3TooLittleReceived"},{type:"error",inputs:[],name:"V3TooMuchRequested"},{type:"error",inputs:[{name:"minAmountOutReceived",internalType:"uint256",type:"uint256"},{name:"amountReceived",internalType:"uint256",type:"uint256"}],name:"V4TooLittleReceived"},{type:"error",inputs:[{name:"maxAmountInRequested",internalType:"uint256",type:"uint256"},{name:"amountRequested",internalType:"uint256",type:"uint256"}],name:"V4TooMuchRequested"},{type:"event",anonymous:!1,inputs:[{name:"caller",internalType:"address",type:"address",indexed:!0},{name:"localRouter",internalType:"address",type:"address",indexed:!0},{name:"destinationDomain",internalType:"uint32",type:"uint32",indexed:!0},{name:"commitment",internalType:"bytes32",type:"bytes32",indexed:!1}
62],name:"CrossChainSwap"},{type:"event",anonymous:!1,inputs:[{name:"sender",internalType:"address",type:"address",indexed:!0},{name:"recipient",internalType:"address",type:"address",indexed:!0},{name:"token",internalType:"address",type:"address",indexed:!0},{name:"amount",internalType:"uint256",type:"uint256",indexed:!1},{name:"domain",internalType:"uint32",type:"uint32",indexed:!1}],name:"UniversalRouterBridge"},{type:"event",anonymous:!1,inputs:[{name:"sender",internalType:"address",type:"address",indexed:!0},{name:"recipient",internalType:"address",type:"address",indexed:!0}],name:"UniversalRouterSwap"},{type:"function",inputs:[],name:"OPTIMISM_CHAIN_ID",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"PERMIT2",outputs:[{name:"",internalType:"contract IPermit2",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"WETH9",outputs:[{name:"",internalType:"contract IWETH9",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"commands",internalType:"bytes",type:"bytes"},{name:"inputs",internalType:"bytes[]",type:"bytes[]"}],name:"execute",outputs:[],stateMutability:"payable"},{type:"function",inputs:[{name:"commands",internalType:"bytes",type:"bytes"},{name:"inputs",internalType:"bytes[]",type:"bytes[]"},{name:"deadline",internalType:"uint256",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable"},{type:"function",inputs:[],name:"msgSender",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"poolManager",outputs:[{name:"",internalType:"contract IPoolManager",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"amount0Delta",internalType:"int256",type:"int256"},{name:"amount1Delta",internalType:"int256",type:"int256"},{name:"data",internalType:"bytes",type:"bytes"}],name:"uniswapV3SwapCallback",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"data",internalType:"bytes",type:"bytes"}],name:"unlockCallback",outputs:[{name:"",internalType:"bytes",type:"bytes"}],stateMutability:"nonpayable"},{type:"receive",stateMutability:"payable"}],oJ=[{type:"constructor",inputs:[{name:"_voter",type:"address"},{name:"_rewards_distributor",type:"address"},{name:"_gov",type:"address"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_limit",type:"uint256"},{name:"_offset",type:"uint256"}],name:"all",outputs:[{name:"",type:"tuple[]",components:[{name:"id",type:"uint256"},{name:"account",type:"address"},{name:"decimals",type:"uint8"},{name:"amount",type:"uint128"},{name:"voting_amount",type:"uint256"},{name:"governance_amount",type:"uint256"},{name:"rebase_amount",type:"uint256"},{name:"expires_at",type:"uint256"},{name:"voted_at",type:"uint256"},{name:"votes",type:"tuple[]",components:[{name:"lp",type:"address"},{name:"weight",type:"uint256"}]},{name:"token",type:"address"},{name:"permanent",type:"bool"},{name:"delegate_id",type:"uint256"},{name:"managed_id",type:"uint256"}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_account",type:"address"}],name:"byAccount",outputs:[{name:"",type:"tuple[]",components:[{name:"id",type:"uint256"},{name:"account",type:"address"},{name:"decimals",type:"uint8"},{name:"amount",type:"uint128"},{name:"voting_amount",type:"uint256"},{name:"governance_amount",type:"uint256"},{name:"rebase_amount",type:"uint256"},{name:"expires_at",type:"uint256"},{name:"voted_at",type:"uint256"},{name:"votes",type:"tuple[]",components:[{name:"lp",type:"address"},{name:"weight",type:"uint256"}]},{name:"token",type:"address"},{name:"permanent",type:"bool"},{name:"delegate_id",type:"uint256"},{name:"managed_id",type:"uint256"}]}],stateMutability:"view"},{type:"function",inputs:[{name:"_id",type:"uint256"}],name:"byId",outputs:[{name:"",type:"tuple",components:[{name:"id",type:"uint256"},{name:"account",type:"address"},{name:"decimals",type:"uint8"},{name:"amount",type:"uint128"},{name:"voting_amount",type:"uint256"},{name:"governance_amount",type:"uint256"},{name:"rebase_amount",type:"uint256"},{name:"expires_at",type:"uint256"},{name:"voted_at",type:"uint256"},{name:"votes",type:"tuple[]",components:[{name:"lp",type:"address"},{name:"weight",type:"uint256"}]},{name:"token",type:"address"},{name:"permanent",type:"bool"},{name:"delegate_id",type:"uint256"},{name:"managed_id",type:"uint256"}]}],stateMutability:"view"},{type:"function",inputs:[],name:"voter",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"token",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"ve",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"dist",outputs:[{name:"",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"gov",outputs:[{name:"",type:"address"}],stateMutability:"view"}],$9=[{type:"constructor",inputs:[{name:"_forwarder",internalType:"address",type:"address"},{name:"_ve",internalType:"address",type:"address"},{name:"_factoryRegistry",internalType:"address",type:"address"},{name:"_v1Factory",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"error",inputs:[],name:"AlreadyVotedOrDeposited"},{type:"error",inputs:[],name:"DistributeWindow"},{type:"error",inputs:[],name:"FactoryPathNotApproved"},{type:"error",inputs:[],name:"GaugeAlreadyKilled"},{type:"error",inputs:[],name:"GaugeAlreadyRevived"},{type:"error",inputs:[{name:"_pool",internalType:"address",type:"address"}],name:"GaugeDoesNotExist"},{type:"error",inputs:[],name:"GaugeExists"},{type:"error",inputs:[{name:"_gauge",internalType:"address",type:"address"}],name:"GaugeNotAlive"},{type:"error",inputs:[],name:"InactiveManagedNFT"},{type:"error",inputs:[],name:"MaximumVotingNumberTooLow"},{type:"error",inputs:[],name:"NonZeroVotes"},{type:"error",inputs:[],name:"NotAPool"},{type:"error",inputs:[],name:"NotApprovedOrOwner"},{type:"error",inputs:[],name:"NotEmergencyCouncil"},{type:"error",inputs:[],name:"NotGovernor"},{type:"error",inputs:[],name:"NotMinter"},{type:"error",inputs:[],name:"NotWhitelistedNFT"},{type:"error",inputs:[],name:"NotWhitelistedToken"},{type:"error",inputs:[],name:"SameValue"},{type:"error",inputs:[],name:"SpecialVotingWindow"},{type:"error",inputs:[],name:"TooManyPools"},{type:"error",inputs:[],name:"UnequalLengths"},{type:"error",inputs:[],name:"ZeroAddress"},{type:"error",inputs:[],name:"ZeroBalance"},{type:"event",anonymous:!1,inputs:[{name:"voter",internalType:"address",type:"address",indexed:!0},{name:"pool",internalType:"address",type:"address",indexed:!0},{name:"tokenId",internalType:"uint256",type:"uint256",indexed:!0},{name:"weight",internalType:"uint256",type:"uint256",indexed:!1}
62,{name:"totalWeight",internalType:"uint256",type:"uint256",indexed:!1},{name:"timestamp",internalType:"uint256",type:"uint256",indexed:!1}],name:"Abstained"},{type:"event",anonymous:!1,inputs:[{name:"sender",internalType:"address",type:"address",indexed:!0},{name:"gauge",internalType:"address",type:"address",indexed:!0},{name:"amount",internalType:"uint256",type:"uint256",indexed:!1}],name:"DistributeReward"},{type:"event",anonymous:!1,inputs:[{name:"poolFactory",internalType:"address",type:"address",indexed:!0},{name:"votingRewardsFactory",internalType:"address",type:"address",indexed:!0},{name:"gaugeFactory",internalType:"address",type:"address",indexed:!0},{name:"pool",internalType:"address",type:"address",indexed:!1},{name:"bribeVotingReward",internalType:"address",type:"address",indexed:!1},{name:"feeVotingReward",internalType:"address",type:"address",indexed:!1},{name:"gauge",internalType:"address",type:"address",indexed:!1},{name:"creator",internalType:"address",type:"address",indexed:!1}],name:"GaugeCreated"},{type:"event",anonymous:!1,inputs:[{name:"gauge",internalType:"address",type:"address",indexed:!0}],name:"GaugeKilled"},{type:"event",anonymous:!1,inputs:[{name:"gauge",internalType:"address",type:"address",indexed:!0}],name:"GaugeRevived"},{type:"event",anonymous:!1,inputs:[{name:"sender",internalType:"address",type:"address",indexed:!0},{name:"reward",internalType:"address",type:"address",indexed:!0},{name:"amount",internalType:"uint256",type:"uint256",indexed:!1}],name:"NotifyReward"},{type:"event",anonymous:!1,inputs:[{name:"voter",internalType:"address",type:"address",indexed:!0},{name:"pool",internalType:"address",type:"address",indexed:!0},{name:"tokenId",internalType:"uint256",type:"uint256",indexed:!0},{name:"weight",internalType:"uint256",type:"uint256",indexed:!1},{name:"totalWeight",internalType:"uint256",type:"uint256",indexed:!1},{name:"timestamp",internalType:"uint256",type:"uint256",indexed:!1}],name:"Voted"},{type:"event",anonymous:!1,inputs:[{name:"whitelister",internalType:"address",type:"address",indexed:!0},{name:"tokenId",internalType:"uint256",type:"uint256",indexed:!0},{name:"_bool",internalType:"bool",type:"bool",indexed:!0}],name:"WhitelistNFT"},{type:"event",anonymous:!1,inputs:[{name:"whitelister",internalType:"address",type:"address",indexed:!0},{name:"token",internalType:"address",type:"address",indexed:!0},{name:"_bool",internalType:"bool",type:"bool",indexed:!0}],name:"WhitelistToken"},{type:"function",inputs:[{name:"_bribes",internalType:"address[]",type:"address[]"},{name:"_tokens",internalType:"address[][]",type:"address[][]"},{name:"_tokenId",internalType:"uint256",type:"uint256"}],name:"claimBribes",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_fees",internalType:"address[]",type:"address[]"},{name:"_tokens",internalType:"address[][]",type:"address[][]"},{name:"_tokenId",internalType:"uint256",type:"uint256"}],name:"claimFees",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_gauges",internalType:"address[]",type:"address[]"}],name:"claimRewards",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"claimable",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"_poolFactory",internalType:"address",type:"address"},{name:"_pool",internalType:"address",type:"address"}],name:"createGauge",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_tokenId",internalType:"uint256",type:"uint256"},{name:"_mTokenId",internalType:"uint256",type:"uint256"}],name:"depositManaged",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_gauges",internalType:"address[]",type:"address[]"}],name:"distribute",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_start",internalType:"uint256",type:"uint256"},{name:"_finish",internalType:"uint256",type:"uint256"}],name:"distribute",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"emergencyCouncil",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"epochGovernor",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_timestamp",internalType:"uint256",type:"uint256"}],name:"epochNext",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"pure"},{type:"function",inputs:[{name:"_timestamp",internalType:"uint256",type:"uint256"}],name:"epochStart",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"pure"},{type:"function",inputs:[{name:"_timestamp",internalType:"uint256",type:"uint256"}],name:"epochVoteEnd",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"pure"},{type:"function",inputs:[{name:"_timestamp",internalType:"uint256",type:"uint256"}],name:"epochVoteStart",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"pure"},{type:"function",inputs:[],name:"factoryRegistry",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"forwarder",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"gaugeToBribe",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"gaugeToFees",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"gauges",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"governor",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_tokens",internalType:"address[]",type:"address[]"},{name:"_minter",internalType:"address",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"isAlive",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"isGauge",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[{name:"forwarder",internalType:"address",type:"address"}],name:"isTrustedForwarder",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"uint256",type:"uint256"}],name:"isWhitelistedNFT",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"isWhitelistedToken",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[{name:"_gauge",internalType:"address",type:"address"}],name:"killGauge",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"",internalType:"uint256",type:"uint256"}],name:"lastVoted",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"length",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"maxVotingNum",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"minter",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_amount",internalType:"uint256",type:"uint256"}],name:"notifyRewardAmount",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_tokenId",internalType:"uint256",type:"uint256"}],name:"poke",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"poolForGauge",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"uint256",type:"uint256"},{name:"",internalType:"uint256",type:"uint256"}],name:"poolVote",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"uint256",type:"uint256"}],name:"pools",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_tokenId",internalType:"uint256",type:"uint256"}],name:"reset",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_gauge",internalType:"address",type:"address"}],name:"reviveGauge",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_council",internalType:"address",type:"address"}],name:"setEmergencyCouncil",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_epochGovernor",internalType:"address",type:"address"}],name:"setEpochGovernor",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_governor",internalType:"address",type:"address"}],name:"setGovernor",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_maxVotingNum",internalType:"uint256",type:"uint256"}],name:"setMaxVotingNum",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"totalWeight",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"_gauge",internalType:"address",type:"address"}],name:"updateFor",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"start",internalType:"uint256",type:"uint256"},{name:"end",internalType:"uint256",type:"uint256"}],name:"updateFor",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_gauges",internalType:"address[]",type:"address[]"}],name:"updateFor",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"",internalType:"uint256",type:"uint256"}],name:"usedWeights",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"v1Factory",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"ve",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"_tokenId",internalType:"uint256",type:"uint256"},{name:"_poolVote",internalType:"address[]",type:"address[]"},{name:"_weights",internalType:"uint256[]",type:"uint256[]"}],name:"vote",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"",internalType:"uint256",type:"uint256"},{name:"",internalType:"address",type:"address"}],name:"votes",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"weights",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"_tokenId",internalType:"uint256",type:"uint256"},{name:"_bool",internalType:"bool",type:"bool"}],name:"whitelistNFT",outputs:[],stateMutability:"nonpayable"}
62,{type:"function",inputs:[{name:"_token",internalType:"address",type:"address"},{name:"_bool",internalType:"bool",type:"bool"}],name:"whitelistToken",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"_tokenId",internalType:"uint256",type:"uint256"}],name:"withdrawManaged",outputs:[],stateMutability:"nonpayable"}],Rg={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_ALM_PROVIDER:"Runtime Global S.A.",VITE_ALM_TERMS:"https://runtimelabs.xyz/legal-notice",VITE_APP_NAME:"Aerodrome",VITE_APP_NAME_LOWER:"aerodrome",VITE_APP_TOKEN:"0x940181a94a35a4569e4529a3cdfb74e38fd98631",VITE_BANNER:"aero-banner.png",VITE_BASE_BUILDER_CODE:"62635f7239717a66386f700b0080218021802180218021802180218021",VITE_CHAIN_IDS:"8453",VITE_CONNECTOR_TOKENS_10:"0x9560e827af36c94d2ac33a39bce1fe78631088db,0x4200000000000000000000000000000000000042,0x4200000000000000000000000000000000000006,0x9bcef72be871e61ed4fbbc7630889bee758eb81d,0x2e3d870790dc77a83dd1d18184acc7439a53f475,0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9,0x1f32b1c2345538c0c6f582fcb022739c4a194ebb,0xbfd291da8a403daaf7e5e9dc1ec0aceacd4848b9,0xc3864f98f2a61a7caeb95b039d031b4e2f55e0e9,0x9485aca5bbbe1667ad97c7fe7c4531a624c8b1ed,0xda10009cbd5d07dd0cecc66161fc93d7c9000da1,0x73cb180bf0521828d8849bc8cf2b920918e23032,0x6806411765af15bddd26f8f544a34cc40cb9838b,0x6c2f7b6110a37b3b0fbdd811876be368df02e8b0,0xc5b001dc33727f8f26880b184090d3e252470d45,0x6c84a8f1c29108f47a79964b5fe888d4f4d0de40,0xc40f949f8a4e094d1b49a23ea9241d289b7b2819,0x94b008aa00579c1307b0ef2c499ad98a8ce58e58,0x0b2c639c533813f4aa9d7837caf62653d097ff85",VITE_CONNECTOR_TOKENS_8453:"0xfde4c96c8593536e31f229ea8f37b2ada2699bb2,0x833589fcd6edb6e08f4c7c32d4f71b54bda02913,0x940181a94a35a4569e4529a3cdfb74e38fd98631,0x50c5725949a6f0c72e6c4a641f24049a917db0cb,0x4621b7a9c75199271f773ebd9a499dbd165c3191,0x4200000000000000000000000000000000000006,0xb79dd08ea68a908a97220c76d19a6aa9cbde4376,0xcfa3ef56d303ae4faaba0592388f19d7c3399fb4,0xcb327b99ff831bf8223cced12b1338ff3aa322ff,0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22,0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452,0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42,0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca,0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf,0xdd468a1ddc392dcdbef6db6e34e89aa338f9f186,0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b",VITE_CONVERT_SUSDT_TOKENS:"8453:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913=0xe92e51d99ae33114c60d9621fb2e1ec0acea7e30",VITE_CSP_FRAME:"https://verify.walletconnect.org/",VITE_CSP_IMG:"https://raw.githubusercontent.com data: blob:",VITE_CSP_SCRIPT:"",VITE_CSP_STYLE:"",VITE_DEFAULT_SLIPPAGE:"1.0",VITE_DEFAULT_SWAP_MINUTES:"10",VITE_DEFAULT_TOKENS_8453:"0x940181a94a35a4569e4529a3cdfb74e38fd98631,eth",VITE_DEFAULT_TOKEN_ORDER:"WETH,AERO,USDC,cbBTC",VITE_ECOSYSTEM:"Base",VITE_EXPLORER_CHAIN_IDS:"",VITE_EXTERNAL_CHAIN_IDS:"10",VITE_FACTORY_ADDRESS_10:"0xF1046053aa5682b4F9a81b5481394DA16BE5FF5a",VITE_FACTORY_ADDRESS_8453:"0x420DD381b31aEf6683db6B902084cB0FFECe40Da",VITE_FC_META:"miniapp",VITE_FEATURE_FLAGS:"v2,relay,cl,vapr,alm,batched-txs,skip-batch-sim,tx-suffix",VITE_HIGHLIGHTED_POOLS:"",VITE_HL_EXPLORER:"https://explorer.hyperlane.xyz/?search=",VITE_HL_HEALTH_URL:"https://offchain-lookup.services.hyperlane.xyz/health",VITE_HL_RELAYERS:"0x74Cae0ECC47B02Ed9B9D32E000Fd70B9417970C5,0x09B96417602Ed6AC76651F7A8c4860E60e3aA6d0",VITE_HL_RELAY_URL:"https://offchain-lookup.services.hyperlane.xyz/callCommitments/calls",VITE_ICA_ADDRESS_8453:"0x44647Cd983E80558793780f9a0c7C2aa9F384D07",VITE_LABEL:"AERO",VITE_LAUNCHER_LANDING_PAGE_TOKENS:"VIRTUAL,KTA,AERO,cbBTC,cbXRP,cbDOGE,cbADA,cbLTC,GIZA,MAMO",VITE_LAUNCH_TOKENS:"",VITE_LOCKER_IMPL_ADDRESS:"0xfe678BFfC3C1c8D1De4478CC5C3e1b93EE4638aE",VITE_LP_SUGAR_ADDRESS_10:"0x347512180804A8B40AA7525AE932a31198F074aA",VITE_LP_SUGAR_ADDRESS_8453:"0x69dD9db6d8f8E7d83887A704f447b1a584b599A1",VITE_MAX_RESERVE_DEVIATION:"1000000000000000",VITE_MESSAGE_BRIDGE_ADDRESS:"0xF278761576f45472bdD721EACA19317cE159c011",VITE_MESSAGE_MODULE_ADDRESS:"0x2BbA7515F7cF114B45186274981888D8C2fBA15E",VITE_MIGRATOR_ADDRESS_8453:"0x4Ab4313D12D3c17Dd172dCd9453105EB3d775f42",VITE_MINTER_ADDRESS_10:"0x6dc9E1C04eE59ed3531d73a72256C0da46D10982",VITE_MINTER_ADDRESS_8453:"0xeB018363F0a9Af8f91F06FEe6613a751b2A33FE5",VITE_NATIVE_TOKEN_
62LOGO:"/tokens/ETH.svg",VITE_NFPM_ADDRESS_10:"0xf7f8ccce99Ca2896eC75D3A399D152dB96808399",VITE_NFPM_ADDRESS_8453:"0xe1f8cd9AC4e4A65F54f38a5CdAfCA44f6dD68b53",VITE_OLD_SLIPSTREAM_FACTORY_ADDRESS_10:"0xCc0bDDB707055e04e497aB22a59c2aF4391cd12F",VITE_OLD_SLIPSTREAM_FACTORY_ADDRESS_8453:"0x5e7BB104d84c7CB9B682AaC2F3d509f5F406809A",VITE_OPEN_USDT_TOKEN:"0x1217bfe6c773eec6cc4a38b5dc45b92292b6e189",VITE_OP_TOKEN:"0x4200000000000000000000000000000000000042",VITE_POOL_LAUNCHER_CL_ADDRESS:"0x3C890c7454C17410E49E035F6C4755c4E2012b4b",VITE_POOL_LAUNCHER_V2_ADDRESS:"0xA81eEbdEb3129bf5B89AEd89EDe9eC5fB6FDE3B3",VITE_POOL_PLACEHOLDER_TYPES:"-1,0,1,10,50,80,100,150,200,500,2000",VITE_PRICES_ADDRESS_10:"0x58238e3d556226defE35d3056335f48938707324",VITE_PRICES_ADDRESS_8453:"0xfbC91Fc9C6E70Afbea84b69FB0bF5EBa7F90aaFd",VITE_PRICE_MAPS:"10:0x4200000000000000000000000000000000000042=0xafcc6ae807187a31e84138f3860d4ce27973e01b,10:0x4200000000000000000000000000000000000042=0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca",VITE_PRICE_THRESHOLD_FILTER:"10",VITE_QUOTER_ADDRESS_10:"0xAf6EBdf4c70061C5961994Ae9c9956fBc2bCC32E",VITE_QUOTER_ADDRESS_8453:"0xCd2A7D98e82D6107eac1828ce8DeAA6acB65b555",VITE_QUOTER_STABLE_POOL_FILLER:"2097152",VITE_QUOTER_VOLATILE_POOL_FILLER:"4194304",VITE_RELAYS_HIDE_IDS:"9605,10296",VITE_RELAYS_PINNED_IDS:"10298",VITE_RELAY_SUGAR_ADDRESS_10:"0x5197Eb73253EF90E2089ad7308E572Ea6898c8D7",VITE_RELAY_SUGAR_ADDRESS_8453:"0x3dd0849D66DBd63D06f11442502e200601c50790",VITE_REWARDS_SUGAR_ADDRESS_10:"0x62CCFB2496f49A80B0184AD720379B529E9152fB",VITE_REWARDS_SUGAR_ADDRESS_8453:"0x1b121EfDaF4ABb8785a315C51D29BCE0552A7678",VITE_ROUTER_ADDRESS_10:"0xa062aE8A9c5e11aaA026fc2670B0D65cCc8B2858",VITE_ROUTER_ADDRESS_8453:"0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43",VITE_RPC_URIS_10:"https://lb.drpc.live/optimism/Avibgvi26EjPsw76UtdwmsQOcPkUJIUR8YARurWHF38a:1,https://opt-mainnet.g.alchemy.com/v2/4aBLuZOavL1N3YUWe8c9ylHandj-Ez4f:0",VITE_RPC_URIS_8453:"https://lb.drpc.live/base/Avibgvi26EjPsw76UtdwmsQOcPkUJIUR8YARurWHF38a:1,https://base-mainnet.g.alchemy.com/v2/NueAMkvMI625bpEhxN6_-:0",VITE_SAFE_PI:"3.0",VITE_SLIPSTREAM_FACTORY_ADDRESS_10:"0xe13Dd1fbA721Aa81a1826D9523AC9BC7d260c879",VITE_SLIPSTREAM_FACTORY_ADDRESS_8453:"0xf8f2eB4940CFE7d13603DDDD87f123820Fc061Ef",VITE_SLIPSTREAM_SUGAR_ADDRESS_10:"0xD45624bf2CB9f65ecbdF3067d21992b099b56202",VITE_SLIPSTREAM_SUGAR_ADDRESS_8453:"0x9c62ab10577fB3C20A22E231b7703Ed6D456CC7a",VITE_SOLANA_RPC_URL:"https://lb.drpc.live/solana/Avibgvi26EjPsw76UtdwmsQ-HuQB0FUR8K6aOmy9-kY5",VITE_STABLE_TOKEN_10:"0x7f5c764cbc14f9669b88837ca1490cca17c31607",VITE_STABLE_TOKEN_8453:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",VITE_STOCK_POOLS:"8453:0x853F5f1B92b16714Fe6CDA67CAad0856B83C7ab9,8453:0xA3b1E3f9747065e2073722Ff4c9027d3eA4994F0,8453:0xB1987CAD1682841b4b641d50E520777eC5Ab5542,8453:0xEAF57753BC382E0324a1D43F72E7027705a2273E,8453:0xe942B86f5c6d4a780fd673317Ee7E565d25aB7F3,8453:0x20E5fAd2661Ee9Eb0c04824524030AF31943B62D,8453:0x25F63549b2Bb9ffF114cDc39e8cfb16B450E2f9b,8453:0xD5B83c33A8711e727C0Abb6f72ee508755D37e10,8453:0xd03Bc8C7F2FAedCe2aac81bF0444AEA08Ea06E9b,8453:0x7103eB3c9590d1281f7dc03b2A9EE27C39dF5D54,8453:0x8b27f626ab668197000BC722A1012022CAeD10E2,8453:0x5A8236f575471e7BfCA2C8462a200c28f737246E,8453:0x0bf58fe0FAc935Ac69595c19B12Ba0d75E3F8c0E,8453:0x469337fDcc5E8f38e2E4B670B04F57865D13a7BB",VITE_STOCK_TOKENS:"8453:0xb20000000000000000000078ee7ce2fE4908108C,8453:0xb2000000000000000000008bC8786B856E61707C,8453:0xb200000000000000000000C2e324d24d7eEcd1fb,8453:0xb2000000000000000000002D0BA3164cc74f58B7,8453:0xCEF8Db49E456f872E288E1C042F916E9ceD7c781",VITE_TOKEN_ASSETS_CDN:"https://raw.githubusercontent.com/SmolDapp/tokenAssets/main/tokens",VITE_TOKEN_SYMBOL_0x102d758f688a4c1c5a80b116bd945d4455460282:"USDT0",VITE_TOKEN_SYMBOL_0x7f5c764cbc14f9669b88837ca1490cca17c31607:"USDC.e",VITE_TOKEN_SYMBOL_0xa1a0b2e02b0e6830ad5a4a7211691200945d8919:"TEA",VITE_TOKEN_SYMBOL_0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca:"OP",VITE_TOKEN_SYMBOL_0xafcc6ae807187a31e84138f3860d4ce27973e01b:"OP",VITE_TOKEN_SYMBOL_0xbce0af241a9c06778968ce1d3782c61d9a9c7c32:"METEORA",VITE_TOKEN_SYMBOL_0xde5ed76e7c05ec5e4572cfc88d1acea165109e44:"DEUS FINANCE",VITE_TOLERATED_SERVER_TIMESTAMP_DIFFERENCE:"30",VITE_TWITTER_HANDLE:"@aeroxyz",VITE_UNCLAIMABLE_TOKENS:"",VITE_UNIVERSAL_ROUTER_ADDRESS_10:"0xcAF22ce31298CF2BF1D152862F80216478ad7c67",VITE_UNIVERSAL_ROUTER_ADDRESS_8453:"0xcAF22ce31298CF2BF1D152862F80216478ad7c67",VITE_UNSAFE_PI:"3.0",VITE_UNSAFE_TOKENS_8453:"0x74ccbe53f77b08632ce0cb91d3a545bf6b8e0979,0x8901cb2e82cc95c01e42206f8d1f417fe53e7af0,0x9cbd543f1b1166b2df36b68eb6bb1dce24e6abdf,0x025f99977db78317a4eba606998258b502bb256f,0xd260115030b9fb6849da169a01ed80b6496d1e99,0
62x608d5401d377228e465ba6113517dcf9bd1f95ca,0xd260115030b9fb6849da169a01ed80b6496d1e99,0x728cda34d732a87fd6429129e23d4742d9ff0064,0x728cda34d732a87fd6429129e23d4742d9ff0064,0xac1bd2486aaf3b5c0fc3fd868558b082a531b2b4,0x0f929c29dce303f96b1d4104505f2e60ee795cac,0x47e78d664e6c339693e8638b7a7d9543abcc99d4,0xff0c532fdb8cd566ae169c1cb157ff2bdc83e105,0x373504da48418c67e6fcd071f33cb0b3b47613c7,0x0f929c29dce303f96b1d4104505f2e60ee795cac,0x628c5ba9b775dacecd14e237130c537f497d1cc7",VITE_USDT_BRIDGE_ADDRESS_8453:"0x4F0654395d621De4d1101c0F98C1Dba73ca0a61f",VITE_VE_ADDRESS_10:"0xFAf8FD17D9840595845582fCB047DF13f006787d",VITE_VE_ADDRESS_8453:"0xeBf418Fe2512e7E6bd9b87a8F0f294aCDC67e6B4",VITE_VE_SUGAR_ADDRESS_10:"0x94f913362b232e31daB49a1aFB775cfd25DaA6a1",VITE_VE_SUGAR_ADDRESS_8453:"0x4c5d3925fe65DFeB5A079485136e4De09cb664A5",VITE_VOTER_ADDRESS_10:"0x41C914ee0c7E1A5edCD0295623e6dC557B5aBf3C",VITE_VOTER_ADDRESS_8453:"0x16613524e02ad97eDfeF371bC883F2F5d6C480A5",VITE_WALLETCONNECT_PROJECT_ID:"a1ea2a919a3465f5a79109a93fa032fb",VITE_WRAPPED_NATIVE_TOKEN_10:"0x4200000000000000000000000000000000000006",VITE_WRAPPED_NATIVE_TOKEN_8453:"0x4200000000000000000000000000000000000006",VITE_XOP_BRIDGE:"0xac6A6080E002D2803959242C0FE10050C482D214",VITE_XOP_BRIDGE_V2:"0xfFCA1231d43Cf55B58d62627fD171ab1293C3050",VITE_XOP_TOKEN:"0xafcc6ae807187a31e84138f3860d4ce27973e01b",VITE_XOP_TOKEN_V2:"0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca"},aJ="wagmi-drome-v5.0.0",cJ="8779ce964b87d3f896438",oo="AERO",uJ=1440*60,vO=7*uJ,lJ=4*365*86400,wO=1e3,sd=wO*60,Wr=5*sd,sg=Wr*12,dJ=12n,m7="/svg/coin.svg",$6e=Object.entries({[-1]:3000n,0:500n,1:100n,10:500n,50:500n,80:10000n,100:500n,150:30000n,200:3000n,500:20000n,2e3:10000n}).reduce((e,[t,n])=>(e[t]=Nx(n,10000n,0,0),e),{}),ma="8453".split(",").map(Number),fJ="10".split(",").map(Number)??[],EO=KQ,U6e=Rg[`VITE_RELAY_SUGAR_ADDRESS_${ma[0]}`],z6e=eJ,_O=tJ,SO=Rg[`VITE_VE_SUGAR_ADDRESS_${ma[0]}`],TO=oJ,hJ=rJ,pJ=Rg[`VITE_ROUTER_ADDRESS_${ma[0]}`],AO=xO,Sf=Rg[`VITE_MINTER_ADDRESS_${ma[0]}`],U9=Rg[`VITE_VOTER_ADDRESS_${ma[0]}`],kO="0xF278761576f45472bdD721EACA19317cE159c011",mJ="0x2BbA7515F7cF114B45186274981888D8C2fBA15E",yJ=nJ,y7=parseInt("2097152"),g7=parseInt("4194304"),Wf=Rg[`VITE_VE_ADDRESS_${ma[0]}`],V6e=iJ,gJ=YQ,ox=ZQ,bJ=JQ,xJ=sJ,CO=WQ,IO=String(void 0).toLowerCase(),Xf="0xafcc6ae807187a31e84138f3860d4ce27973e01b".toLowerCase(),$p="0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca",vJ=String(void 0).toLowerCase(),wJ="0xac6A6080E002D2803959242C0FE10050C482D214".toLowerCase(),EJ="0xfFCA1231d43Cf55B58d62627fD171ab1293C3050",z9=String(void 0),_J=parseInt("30"),Iv="0x4200000000000000000000000000000000000042",Qf="0x940181a94a35a4569e4529a3cdfb74e38fd98631",SJ="WETH,AERO,USDC,cbBTC".split(","),Lf="0x1217bfe6c773eec6cc4a38b5dc45b92292b6e189",RO="".split(",").map(e=>e.toLowerCase()),TJ=F9(void 0),MO=F9("8453:0xb20000000000000000000078ee7ce2fE4908108C,8453:0xb2000000000000000000008bC8786B856E61707C,8453:0xb200000000000000000000C2e324d24d7eEcd1fb,8453:0xb2000000000000000000002D0BA3164cc74f58B7,8453:0xCEF8Db49E456f872E288E1C042F916E9ceD7c781"),AJ=F9("8453:0x853F5f1B92b16714Fe6CDA67CAad0856B83C7ab9,8453:0xA3b1E3f9747065e2073722Ff4c9027d3eA4994F0,8453:0xB1987CAD1682841b4b641d50E520777eC5Ab5542,8453:0xEAF57753BC382E0324a1D43F72E7027705a2273E,8453:0xe942B86f5c6d4a780fd673317Ee7E565d25aB7F3,8453:0x20E5fAd2661Ee9Eb0c04824524030AF31943B62D,8453:0x25F63549b2Bb9ffF114cDc39e8cfb16B450E2f9b,8453:0xD5B83c33A8711e727C0Abb6f72ee508755D37e10,8453:0xd03Bc8C7F2FAedCe2aac81bF0444AEA08Ea06E9b,8453:0x7103eB3c9590d1281f7dc03b2A9EE27C39dF5D54,8453:0x8b27f626ab668197000BC722A1012022CAeD10E2,8453:0x5A8236f575471e7BfCA2C8462a200c28f737246E,8453:0x0bf58fe0FAc935Ac69595c19B12Ba0d75E3F8c0E,8453:0x469337fDcc5E8f38e2E4B670B04F57865D13a7BB"),kJ=Object.keys(MO).length>0,xy=DQ(),b7=[],q6e="0xA81eEbdEb3129bf5B89AEd89EDe9eC5fB6FDE3B3",H6e=QQ,W6e="0x3C890c7454C17410E49E035F6C4755c4E2012b4b",G6e=XQ,h3=GQ,CJ="By signing this I confirm that I have read and I agree to the terms of service and legal disclaimer provided by Aerodrome Finance on ",IJ="/swap",K6e="https://runtimelabs.xyz/legal-notice",Y6e="Runtime Global S.A.",NO="https://offchain-lookup.services.hyperlane.xyz/callCommitments/calls",RJ="https://offchain-lookup.services.hyperlane.xyz/health",jO="0x74Cae0ECC47B02Ed9B9D32E000Fd70B9417970C5,0x09B96417602Ed6AC76651F7A8c4860E60e3aA6d0".split(","),MJ="https://explorer.hyperlane.xyz/?search=",x7="1000000000000000",NJ="10",Mg="10",jJ=3,PJ=5,PO=fd("3.0"),OO=fd("3.0"),LO=fd("0.001"),wS=fd("0.01"),OJ="https://raw.githubusercontent.com/SmolDapp/tokenAssets/main/tokens".split(","),BO="".split(",").map(Number),Z6e="".split(",").map(Number),[Xi,og]=d3(ma),FO=JSON.parse(JSON.stringify(Xi)),[Up,LJ]=d3(fJ),DO=JSON.parse(JSON.stringify(Up)),t6=[...Xi,...Up],Pt=Xi[0],BJ="/tokens/ETH.svg",v7="a1ea2a919a3465f5a79109a93fa032fb",$O=FQ("10:0x4200000000000000000000000000000000000042=0xafcc6ae807187a31e84138f3860d4ce27973e01b,10:0x4200000000000000000000000000000000000042=0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca"),hd="v2,relay,cl,vapr,alm,batched-txs,skip-batch-sim,tx-suffix".split(","),UO=hd.includes("base-superswaps"),zO=BQ("8453:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913=0xe92e51d99ae33114c60d9621fb2e1ec0acea7e30",hd),X6e="9605,10296".split(","),Q6e="10298".split(","),J6e="-1,0,1,10,50,80,100,150,200,500,2000".split(",").map(Number),FJ=HQ(Xi),DJ=[],[p3]=d3(en.uniq(FJ.concat(DJ))),$J=JSON.parse(JSON.stringify(p3)),e3e="VIRTUAL,KTA,AERO,cbBTC,cbXRP,cbDOGE,cbADA,cbLTC,GIZA,MAMO".split(","),w7=String(void 0).toLowerCase(),V9=String(void 0).split(",").map(e=>e.toLowerCase()),UJ=String(void 0).toLowerCase(),zJ=void 0,VJ=void 0,qJ="".split(",").map(e=>e.toLowerCase().split(":")),Q4=$Q();var HJ="2.0.6",WJ=500,E7="user-agent",ag="",_7="?",gi={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},Co="browser",Ul="cpu",Ou="device",Mc="engine",na="os",vy="result",We="name",$e="type",Ke="vendor",Xe="version",Xs="architecture",jx="major",qe="model",Yb="console",vn="mobile",Er="tablet",Ai="smarttv",Au="wearable",J2="xr",Zb="embedded",Km="inapp",q9="brands",dp="formFactors",H9="fullVersionList",wy="platform",W9="platformVersion",m3="bitness",uh="sec-ch-ua",GJ=uh+"-full-version-list",KJ=uh+"-arch",YJ=uh+"-"+m3,ZJ=uh+"-form-factors",XJ=uh+"-"+vn,QJ=uh+"-"+qe,VO=uh+"-"+wy,JJ=VO+"-version",qO=[q9,H9,vn,qe,wy,W9,Xs,dp,m3],e5="Amazon",Ym="Apple",S7="ASUS",T7="BlackBerry",op="Google",A7="Huawei",J4="Lenovo",k7="Honor",t5="LG",e8="Microsoft",t8="Motorola",n8="Nvidia",C7="OnePlus",r8="OPPO",Ib="Samsung",I7="Sharp",Rb="Sony",i8="Xiaomi",s8="Zebra",R7="Chrome",M7="Chromium",uf="Chromecast",A5="Edge",Mb="Firefox",Nb="Opera",o8="Facebook",N7="Sogou",Zm="Mobile ",jb=" Browser",ES="Windows",eee=typeof window!==gi.UNDEFINED,Io=eee&&window.navigator?window.navigator:void 0,Tf=Io&&Io.userAgentData?Io.userAgentData:void 0,tee=function(e,t){var n={},r=t;if(!n6(t)){r={};for(var i in t)for(var s in t[i])r[s]=t[i][s].concat(r[s]?r[s]:[])}for(var o in e)n[o]=r[o]&&r[o].length%2===0?r[o].concat(e[o]):e[o];return n},y3=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},_S=function(e,t){if(typeof e===gi.OBJECT&&e.length>0){for(var n in e)if(Bf(t)==Bf(e[n]))return!0;return!1}return Rv(e)?Bf(t)==Bf(e):!1},n6=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||(t?n6(e[n]):!1)},Rv=function(e){return typeof e===gi.STRING},a8=function(e){if(e){for(var t=[],n=cg(/\\?\"/g,e).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var i=r6(n[r]).split(";v=");t[r]={brand:i[0],version:i[1]}}else t[r]=r6(n[r]);return t}},Bf=function(e){return Rv(e)?e.toLowerCase():e},c8=function(e){return Rv(e)?cg(/[^\d\.]/g,e).split(".")[0]:void 0},Hl=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==gi.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},cg=function(e,t){return Rv(t)?t.replace(e,ag):t},Pb=function(e){return cg(/\\?\"/g,e)},r6=function(e,t){return e=cg(/^\s\s*/,String(e)),typeof t===gi.UNDEFINED?e:e.substring(0,t)},u8=function(e,t){if(!(!e||!t))for(var n=0,r,i,s,o,a,c;n<t.length&&!a;){var d=t[n],h=t[n+1];for(r=i=0;r<d.length&&!a&&d[r];)if(a=d[r++].exec(e),a)for(s=0;s<h.length;s++)c=a[++i],o=h[s],typeof o===gi.OBJECT&&o.length>0?o.length===2?typeof o[1]==gi.FUNCTION?this[o[0]]=o[1].call(this,c):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]===gi.FUNCTION&&!(o[1].exec&&o[1].test)?o.length>3?this[o[0]]=c?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=c?o[1].call(this,c,o[2]):void 0:o.length==3?this[o[0]]=c?c.replace(o[
vendor: 4,119 bytes, line 62
621],o[2]):void 0:o.length==4?this[o[0]]=c?o[3].call(this,c.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=c?o[3].apply(this,[c.replace(o[1],o[2])].concat(o.slice(4))):void 0)):this[o]=c||void 0;n+=2}},Cu=function(e,t){for(var n in t)if(typeof t[n]===gi.OBJECT&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(_S(t[n][r],e))return n===_7?void 0:n}else if(_S(t[n],e))return n===_7?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},j7={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},P7={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},nee={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},O7={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[Xe,[We,Zm+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[Xe,[We,A5+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[Xe,[We,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[We,Xe],[/opios[\/ ]+([\w\.]+)/i],[Xe,[We,Nb+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[Xe,[We,Nb+" GX"]],[/\bopr\/([\w\.]+)/i],[Xe,[We,Nb]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[Xe,[We,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[Xe,[We,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[We,Xe],[/quark(?:pc)?\/([-\w\.]+)/i],[Xe,[We,"Quark"]],[/\bddg\/([\w\.]+)/i],[Xe,[We,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[Xe,[We,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[Xe,[We,"WeChat"]],[/konqueror\/([\w\.]+)/i],[Xe,[We,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[Xe,[We,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[Xe,[We,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[Xe,[We,"Smart "+J4+jb]],[/(avast|avg)\/([\w\.]+)/i],[[We,/(.+)/,"$1 Secure"+jb],Xe],[/\bfocus\/([\w\.]+)/i],[Xe,[We,Mb+" Focus"]],[/\bopt\/([\w\.]+)/i],[Xe,[We,Nb+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[Xe,[We,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[Xe,[We,"Dolphin"]],[/coast\/([\w\.]+)/i],[Xe,[We,Nb+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[Xe,[We,"MIUI"+jb]],[/fxios\/([\w\.-]+)/i],[Xe,[We,Zm+Mb]],[/\bqihoobrowser\/?([\w\.]*)/i],[Xe,[We,"360"]],[/\b(qq)\/([\w\.]+)/i],[[We,/(.+)/,"$1Browser"],Xe],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[We,/(.+)/,"$1"+jb],Xe],[/samsungbrowser\/([\w\.]+)/i],[Xe,[We,Ib+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[Xe,[We,N7+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[We,N7+" Mobile"],Xe],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[We,Xe],[/(lbbrowser|rekonq)/i],[We],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[Xe,We],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[We,o8],Xe,[$e,Km]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[We,Xe,[$e,Km]],[/\bgsa\/([\w\.]+) .*safari\//i],[Xe,[We,"GSA"],[$e,Km]],[/musical_ly(?:.
vendor: 4,546 bytes, line 62
62+app_?version\/|_)([\w\.]+)/i],[Xe,[We,"TikTok"],[$e,Km]],[/\[(linkedin)app\]/i],[We,[$e,Km]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[We,/(.+)/,"Zalo"],Xe,[$e,Km]],[/(chromium)[\/ ]([-\w\.]+)/i],[We,Xe],[/headlesschrome(?:\/([\w\.]+)| )/i],[Xe,[We,R7+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[Xe,[We,A5+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[We,R7+" WebView"],Xe],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[Xe,[We,"Android"+jb]],[/chrome\/([\w\.]+) mobile/i],[Xe,[We,Zm+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[We,Xe],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[Xe,[We,Zm+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[We,Zm+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[Xe,We],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[We,[Xe,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[We,Xe],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[We,Zm+Mb],Xe],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[We,"Netscape"],Xe],[/(wolvic|librewolf)\/([\w\.]+)/i],[We,Xe],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[Xe,[We,Mb+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[We,[Xe,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[We,[Xe,/[^\d\.]+./,ag]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Xs,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Xs,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Xs,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Xs,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Xs,"arm"]],[/ sun4\w[;\)]/i],[[Xs,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[Xs,/ower/,ag,Bf]],[/mc680.0/i],[[Xs,"68k"]],[/winnt.+\[axp/i],[[Xs,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[qe,[Ke,Ib],[$e,Er]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[qe,[Ke,Ib],[$e,vn]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[qe,[Ke,Ym],[$e,vn]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[qe,[Ke,Ym],[$e,Er]],[/(macintosh);/i],[qe,[Ke,Ym]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[qe,[Ke,I7],[$e,vn]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[qe,[Ke,k7],[$e,Er]],[/honor([-\w ]+)[;\)]/i],[qe,[Ke,k7],[$e,vn]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[qe,[Ke,A7],[$e,Er]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[qe,[Ke,A7],[$e,vn]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[qe,/_/g," "],[Ke,i8],[$e,Er]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[qe,/_/g," "],[Ke,i8],[$e,vn]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[qe,[Ke,C7],[$e,vn]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[qe,[Ke,r8],[$e,vn]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[qe,[Ke,Cu,{OnePlus:["203","304","403","404","413","415"],"*":r8}],[$e,Er]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[qe,[Ke,"BLU"],[$e,vn]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[qe,[Ke,"Vivo"],[$e,vn]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[qe,[Ke,"Realme"],[$e,vn]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}
vendor: 11,183 bytes, line 62
62(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[qe,[Ke,J4],[$e,Er]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[qe,[Ke,J4],[$e,vn]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[qe,[Ke,t8],[$e,vn]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[qe,[Ke,t8],[$e,Er]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[qe,[Ke,t5],[$e,Er]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[qe,[Ke,t5],[$e,vn]],[/(nokia) (t[12][01])/i],[Ke,qe,[$e,Er]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[qe,/_/g," "],[$e,vn],[Ke,"Nokia"]],[/(pixel (c|tablet))\b/i],[qe,[Ke,op],[$e,Er]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[qe,[Ke,op],[$e,vn]],[/(google) (pixelbook( go)?)/i],[Ke,qe],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[qe,[Ke,Rb],[$e,vn]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[qe,"Xperia Tablet"],[Ke,Rb],[$e,Er]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[qe,[Ke,e5],[$e,Er]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[qe,/(.+)/g,"Fire Phone $1"],[Ke,e5],[$e,vn]],[/(playbook);[-\w\),; ]+(rim)/i],[qe,Ke,[$e,Er]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[qe,[Ke,T7],[$e,vn]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[qe,[Ke,S7],[$e,Er]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[qe,[Ke,S7],[$e,vn]],[/(nexus 9)/i],[qe,[Ke,"HTC"],[$e,Er]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[Ke,[qe,/_/g," "],[$e,vn]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[qe,[Ke,"TCL"],[$e,Er]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[qe,[Ke,"TCL"],[$e,vn]],[/(itel) ((\w+))/i],[[Ke,Bf],qe,[$e,Cu,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[qe,[Ke,"Acer"],[$e,Er]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[qe,[Ke,"Meizu"],[$e,vn]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[qe,[Ke,"Ulefone"],[$e,vn]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[qe,[Ke,"Energizer"],[$e,vn]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[qe,[Ke,"Cat"],[$e,vn]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[qe,[Ke,"Smartfren"],[$e,vn]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[qe,[Ke,"Nothing"],[$e,vn]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[qe,[Ke,"Archos"],[$e,Er]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[qe,[Ke,"Archos"],[$e,vn]],[/; (n159v)/i],[qe,[Ke,"HMD"],[$e,vn]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[Ke,qe,[$e,Er]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[Ke,qe,[$e,vn]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[Ke,qe,[$e,Er]],[/(surface duo)/i],[qe,[Ke,e8],[$e,Er]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[qe,[Ke,"Fairphone"],[$e,vn]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[qe,[Ke,n8],[$e,Er]],[/(sprint) (\w+)/i],[Ke,qe,[$e,vn]],[/(kin\.[onetw]{3})/i],[[qe,/\./g," "],[Ke,e8],[$e,vn]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[qe,[Ke,s8],[$e,Er]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[qe,[Ke,s8],[$e,vn]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[Ke,[$e,Ai]],[/hbbtv.+maple;(\d+)/i],[[qe,/^/,"SmartTV"],[Ke,Ib],[$e,Ai]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[Ke,qe,[$e,Ai]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[Ke,t5],[$e,Ai]],[/(apple) ?tv/i],[Ke,[qe,Ym+" TV"],[$e,Ai]],[/crkey.*devicetype\/chromecast/i],[[qe,uf+" Third Generation"],[Ke,op],[$e,Ai]],[/crkey.*devicetype\/([^/]*)/i],[[qe,/^/,"Chromecast "],[Ke,op],[$e,Ai]],[/fuchsia.*crkey/i],[[qe,uf+" Nest Hub"],[Ke,op],[$e,Ai]],[/crkey/i],[[qe,uf],[Ke,op],[$e,Ai]],[/(portaltv)/i],[qe,[Ke,o8],[$e,Ai]],[/droid.+aft(\w+)( bui|\))/i],[qe,[Ke,e5],[$e,Ai]],[/(shield \w+ tv)/i],[qe,[Ke,n8],[$e,Ai]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[qe,[Ke,I7],[$e,Ai]],[/(bravia[\w ]+)( bui|\))/i],[qe,[Ke,Rb],[$e,Ai]],[/(mi(tv|box)-?\w+) bui/i],[qe,[Ke,i8],[$e,Ai]],[/Hbbtv.*(technisat) (.*);/i],[Ke,qe,[$e,Ai]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[Ke,/.+\/(\w+)/,"$1",Cu,{LG:"lge"}],[qe,r6],[$e,Ai]],[/(playstation \w+)/i],[qe,[Ke,Rb],[$e,Yb]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[qe,[Ke,e8],[$e,Yb]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[Ke,qe,[$e,Yb]],[/droid.+; (shield)( bui|\))/i],[qe,[Ke,n8],[$e,Yb]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[qe,[Ke,Ib],[$e,Au]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[Ke,qe,[$e,Au]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[qe,[Ke,r8],[$e,Au]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[qe,[Ke,Ym],[$e,Au]],[/(opwwe\d{3})/i],[qe,[Ke,C7],[$e,Au]],[/(moto 360)/i],[qe,[Ke,t8],[$e,Au]],[/(smartwatch 3)/i],[qe,[Ke,Rb],[$e,Au]],[/(g watch r)/i],[qe,[Ke,t5],[$e,Au]],[/droid.+; (wt63?0{2,3})\)/i],[qe,[Ke,s8],[$e,Au]],[/droid.+; (glass) \d/i],[qe,[Ke,op],[$e,J2]],[/(pico) ([\w ]+) os\d/i],[Ke,qe,[$e,J2]],[/(quest( \d| pro)?s?).+vr/i],[qe,[Ke,o8],[$e,J2]],[/mobile vr; rv.+firefox/i],[[$e,J2]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[Ke,[$e,Zb]],[/(aeobc)\b/i],[qe,[Ke,e5],[$e,Zb]],[/(homepod).+mac os/i],[qe,[Ke,Ym],[$e,Zb]],[/windows iot/i],[[$e,Zb]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[qe,[$e,Ai]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[$e,Ai]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[qe,[$e,Cu,{mobile:"Mobile",xr:"VR","*":Er}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[$e,Er]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[$e,vn]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[qe,[Ke,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[Xe,[We,A5+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[We,Xe],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[Xe,[We,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[We,Xe],[/ladybird\//i],[[We,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[Xe,We]],os:[[/(windows nt) (6\.[23]); arm/i],[[We,/N/,"R"],[Xe,Cu,j7]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[We,Xe],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[Xe,/(;|\))/g,"",Cu,j7],[We,ES]],[/(windows ce)\/?([\d\.]*)/i],[We,Xe],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[Xe,/_/g,"."],[We,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[We,"macOS"],[Xe,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[Xe,[We,uf+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[Xe,[We,uf+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[Xe,[We,uf+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[Xe,[We,uf+" Linux"]],[/crkey\/([\d\.]+)/i],[Xe,[We,uf]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[Xe,We],[/(ubuntu) ([\w\.]+) like android/i],[[We,/(.+)/,"$1 Touch"],Xe],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[We,Xe],[/\(bb(10);/i],[Xe,[We,T7]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[Xe,[We,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[Xe,[We,Mb+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[Xe,[We,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[Xe,Cu,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[We,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[Xe,[We,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[We,"Chrome OS"],Xe],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[We,Xe],[/(sunos) ?([\d\.]*)/i],[[We,"Solaris"],Xe],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[We,Xe]]},n5=(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Hl.call(e.init,[[Co,[We,Xe,jx,$e]],[Ul,[Xs]],[Ou,[$e,qe,Ke]],[Mc,[We,Xe]],[na,[We,Xe]]]),Hl.call(e.isIgnore,[[Co,[Xe,jx]],[Mc,[Xe]],[na,[Xe]]]),Hl.call(e.isIgnoreRgx,[[Co,/ ?browser$/i],[na,/ ?os$/i]]),Hl.call(e.toString,[[Co,[We,Xe]],[Ul,[Xs]],[Ou,[Ke,qe]],[Mc,[We,Xe]],[na,[We,Xe]]]),e})(),ree=function(e,t){var n=n5.init[t],r=n5.isIgnore[t]||0,i=n5.isIgnoreRgx[t]||0,s=n5.toString[t]||0;function o(){Hl.call(this,n)}return o.prototype.getItem=function(){return e},o.prototype.withClientHints=function(){return Tf?Tf.getHighEntropyValues(qO).then(function(a){return e.setCH(new HO(a,!1)).parseCH().get()}):e.parseCH().get()}
vendor: 2,839 bytes, line 62
62,o.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=vy&&(o.prototype.is=function(a){var c=!1;for(var d in this)if(this.hasOwnProperty(d)&&!_S(r,d)&&Bf(i?cg(i,this[d]):this[d])==Bf(i?cg(i,a):a)){if(c=!0,a!=gi.UNDEFINED)break}else if(a==gi.UNDEFINED&&c){c=!c;break}return c},o.prototype.toString=function(){var a=ag;for(var c in s)typeof this[s[c]]!==gi.UNDEFINED&&(a+=(a?" ":ag)+this[s[c]]);return a||gi.UNDEFINED}),Tf||(o.prototype.then=function(a){var c=this,d=function(){for(var y in c)c.hasOwnProperty(y)&&(this[y]=c[y])};d.prototype={is:o.prototype.is,toString:o.prototype.toString};var h=new d;return a(h),h}),new o};function HO(e,t){if(e=e||{},Hl.call(this,qO),t)Hl.call(this,[[q9,a8(e[uh])],[H9,a8(e[GJ])],[vn,/\?1/.test(e[XJ])],[qe,Pb(e[QJ])],[wy,Pb(e[VO])],[W9,Pb(e[JJ])],[Xs,Pb(e[KJ])],[dp,a8(e[ZJ])],[m3,Pb(e[YJ])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==gi.UNDEFINED&&(this[n]=e[n])}function L7(e,t,n,r){return this.get=function(i){return i?this.data.hasOwnProperty(i)?this.data[i]:void 0:this.data},this.set=function(i,s){return this.data[i]=s,this},this.setCH=function(i){return this.uaCH=i,this},this.detectFeature=function(){if(Io&&Io.userAgent==this.ua)switch(this.itemType){case Co:Io.brave&&typeof Io.brave.isBrave==gi.FUNCTION&&this.set(We,"Brave");break;case Ou:!this.get($e)&&Tf&&Tf[vn]&&this.set($e,vn),this.get(qe)=="Macintosh"&&Io&&typeof Io.standalone!==gi.UNDEFINED&&Io.maxTouchPoints&&Io.maxTouchPoints>2&&this.set(qe,"iPad").set($e,Er);break;case na:!this.get(We)&&Tf&&Tf[wy]&&this.set(We,Tf[wy]);break;case vy:var i=this.data,s=function(o){return i[o].getItem().detectFeature().get()};this.set(Co,s(Co)).set(Ul,s(Ul)).set(Ou,s(Ou)).set(Mc,s(Mc)).set(na,s(na))}return this},this.parseUA=function(){switch(this.itemType!=vy&&u8.call(this.data,this.ua,this.rgxMap),this.itemType){case Co:this.set(jx,c8(this.get(Xe)));break;case na:if(this.get(We)=="iOS"&&this.get(Xe)=="18.6"){var i=/\) Version\/([\d\.]+)/.exec(this.ua);i&&parseInt(i[1].substring(0,2),10)>=26&&this.set(Xe,i[1])}break}return this},this.parseCH=function(){var i=this.uaCH,s=this.rgxMap;switch(this.itemType){case Co:case Mc:var o=i[H9]||i[q9],a;if(o)for(var c=0;c<o.length;c++){var d=o[c].brand||o[c],h=o[c].version;this.itemType==Co&&!/not.a.brand/i.test(d)&&(!a||/Chrom/.test(a)&&d!=M7||a==A5&&/WebView2/.test(d))&&(d=Cu(d,nee),a=this.get(We),a&&!/Chrom/.test(a)&&/Chrom/.test(d)||this.set(We,d).set(Xe,h).set(jx,c8(h)),a=d),this.itemType==Mc&&d==M7&&this.set(Xe,h)}break;case Ul:var y=i[Xs];y&&(y&&i[m3]=="64"&&(y+="64"),u8.call(this.data,y+";",s));break;case Ou:if(i[vn]&&this.set($e,vn),i[qe]&&(this.set(qe,i[qe]),!this.get($e)||!this.get(Ke))){var g={};u8.call(g,"droid 9; "+i[qe]+")",s),!this.get($e)&&g.type&&this.set($e,g.type),!this.get(Ke)&&g.vendor&&this.set(Ke,g.vendor)}if(i[dp]){var x;
62if(typeof i[dp]!="string")for(var _=0;!x&&_<i[dp].length;)x=Cu(i[dp][_++],P7);else x=Cu(i[dp],P7);this.set($e,x)}break;case na:var S=i[wy];if(S){var I=i[W9];S==ES&&(I=parseInt(c8(I),10)>=13?"11":"10"),this.set(We,S).set(Xe,I)}this.get(We)==ES&&i[qe]=="Xbox"&&this.set(We,"Xbox").set(Xe,void 0);break;case vy:var L=this.data,D=function(F){return L[F].getItem().setCH(i).parseCH().get()};this.set(Co,D(Co)).set(Ul,D(Ul)).set(Ou,D(Ou)).set(Mc,D(Mc)).set(na,D(na))}return this},Hl.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",n],["data",ree(this,e)]]),this}function Wu(e,t,n){if(typeof e===gi.OBJECT?(n6(e,!0)?(typeof t===gi.OBJECT&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e===gi.STRING&&!n6(t,!0)&&(n=t,t=void 0),n)if(typeof n.append===gi.FUNCTION){var r={};n.forEach(function(h,y){r[String(y).toLowerCase()]=h}),n=r}else{var i={};for(var s in n)n.hasOwnProperty(s)&&(i[String(s).toLowerCase()]=n[s]);n=i}if(!(this instanceof Wu))return new Wu(e,t,n).getResult();var o=typeof e===gi.STRING?e:n&&n[E7]?n[E7]:Io&&Io.userAgent?Io.userAgent:ag,a=new HO(n,!0),c=t?tee(O7,t):O7,d=function(h){return h==vy?function(){return new L7(h,o,c,a).set("ua",o).set(Co,this.getBrowser()).set(Ul,this.getCPU()).set(Ou,this.getDevice()).set(Mc,this.getEngine()).set(na,this.getOS()).get()}:function(){return new L7(h,o,c[h],a).parseUA().get()}};return Hl.call(this,[["getBrowser",d(Co)],["getCPU",d(Ul)],["getDevice",d(Ou)],["getEngine",d(Mc)],["getOS",d(na)],["getResult",d(vy)],["getUA",function(){return o}],["setUA",function(h){return Rv(h)&&(o=r6(h,WJ)),this}]]).setUA(o),this}Wu.VERSION=HJ;Wu.BROWSER=y3([We,Xe,jx,$e]);Wu.CPU=y3([Xs]);Wu.DEVICE=y3([qe,Ke,$e,Yb,vn,Ai,Er,Au,Zb]);Wu.ENGINE=Wu.OS=y3([We,Xe]);function iee(){try{let e=1;const t=2,n=window.undefined??1,r=1000n,i=1000n}catch(e){return{supports:!1,error:e}}return{supports:!0}}const l8=new Wu(navigator.userAgent);function G9(){const e=l8.getBrowser(),t=l8.getEngine();return e.name?.includes("Safari")&&(e.name="Safari"),t.name==="WebKit"&&e.name!=="Safari"?[t.name,l8.getOS().version]:[e.name,e.version]}function see(){if(!("hardwareConcurrency"in navigator)||navigator.hardwareConcurrency<2)return!1;const[e,t]=G9();if(!e||!t)return!1;const n=Number(t.split(/[._]/).slice(0,2).join("."));switch(e){case"Chrome":case"Edge":return n>=126;case"WebKit":case"Safari":return n>=18;case"Firefox":return n>=128;case"Opera":return n>=114;default:return!1}}function K9(e){switch(e){case"worker-safe":return see();default:return!1}}function WO(e,t){let n;return{postMessage:r=>{if(!r.id||!r.path)return;const{id:i,path:[s],argumentList:o}=r,a=o.filter(c=>c.type==="RAW").map(c=>c.value);return e.then(c=>{Promise.resolve(c[t][s](...a)).then(d=>{n?.({data:{id:i,type:"RAW",value:d}})})})},addEventListener:(r,i)=>{r==="message"&&(n=i)},removeEventListener:r=>{r==="message"&&(n=void 0)}}}const g3=new Promise(e=>{if(self.contractsWorker){e(self.contractsWorker);return}let t;K9("worker-safe")?t=Wy(new Worker(new URL("/assets/contracts-worker-BYaZ732j.js",import.meta.url),{type:"module"})):t=Wy(WO(hr(()=>import("./contracts-worker-DJJ0cJ7z.js"),[]),"contractsWorkerized")),e(t)}),oee=e=>g3.then(t=>t.getBalance(e)),zp=(e,t)=>{const n=t6.find(r=>r.id===e.chainId);return g3.then(r=>r.readContract({...e,customRpc:n?.superchainConfig.customRpc},t))},pd=(e,t)=>{const n=e.map(r=>{const{customRpc:i}=t6.find(s=>s.id===r.chainId).superchainConfig;return{...r,customRpc:i}});return g3.then(r=>r.readContracts(n,t))},aee=()=>new Promise(e=>{g3.then(t=>{if(K9("worker-safe")){const n=Wy(new Worker(new URL("/assets/execution-worker-jdv4iEIy.js",import.meta.url),{type:"module"}));n.setGlobal("contractsWorker",t).then(()=>{e(n)})}else e(Wy(WO(hr(()=>import("./execution-worker-KBR6gcNW.js"),[]),"executionWorkerized")))})}),cee=K9("worker-safe"),b3=cee?Math.min(4,navigator.hardwareConcurrency-1):1,uee=Array(b3).fill(1).map(()=>aee().then(e=>e));let d8=0;const lee=()=>{const e=d8;return d8=(d8+1)%b3,uee[e]};function Vp(e,t){return t.map(n=>lee().then(r=>r.execute(e,n)))}var Ng=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ug=typeof window>"u"||"Deno"in globalThis;function Za(){}function dee(e,t){return typeof e=="function"?e(t):e}function SS(e){return typeof e=="number"&&e>=0&&e!==1/0}function GO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ey(e,t){return typeof e=="function"?e(t):e}function Nc(e,t){return typeof e=="function"?e(t):e}function B7(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Y9(o,t.options))return!1}else if(!Px(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function F7(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(qp(t.options.mutationKey)!==qp(s))return!1}else if(!Px(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Y9(e,t){return(t?.queryKeyHashFn||qp)(e)}function qp(e){return JSON.stringify(e,(t,n)=>TS(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Px(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Px(e[n],t[n])):!1}function Z9(e,t){if(e===t)return e;const n=D7(e)&&D7(t);if(n||TS(e)&&TS(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let c=0;for(let d=0;d<o;d++){const h=n?d:s[d];(!n&&r.includes(h)||n)&&e[h]===void 0&&t[h]===void 0?(a[h]=void 0,c++):(a[h]=Z9(e[h],t[h]),a[h]===e[h]&&e[h]!==void 0&&c++)}return i===o&&c===i?e:a}return t}function i6(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function D7(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function TS(e){if(!$7(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!$7(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function $7(e){return Object.prototype.toString.call(e)==="[object Object]"}function fee(e){return new Promise(t=>{setTimeout(t,e)})}
62function AS(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Z9(e,t):t}function hee(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function pee(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var KO=Symbol();function YO(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===KO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ep,kf,jy,xN,mee=(xN=class extends Ng{constructor(){super();on(this,Ep);on(this,kf);on(this,jy);Ct(this,jy,t=>{if(!ug&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){ve(this,kf)||this.setEventListener(ve(this,jy))}onUnsubscribe(){var t;this.hasListeners()||((t=ve(this,kf))==null||t.call(this),Ct(this,kf,void 0))}setEventListener(t){var n;Ct(this,jy,t),(n=ve(this,kf))==null||n.call(this),Ct(this,kf,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){ve(this,Ep)!==t&&(Ct(this,Ep,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){return typeof ve(this,Ep)=="boolean"?ve(this,Ep):globalThis.document?.visibilityState!=="hidden"}},Ep=new WeakMap,kf=new WeakMap,jy=new WeakMap,xN),x3=new mee,Py,Cf,Oy,vN,yee=(vN=class extends Ng{constructor(){super();on(this,Py,!0);on(this,Cf);on(this,Oy);Ct(this,Oy,t=>{if(!ug&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){ve(this,Cf)||this.setEventListener(ve(this,Oy))}onUnsubscribe(){var t;this.hasListeners()||((t=ve(this,Cf))==null||t.call(this),Ct(this,Cf,void 0))}setEventListener(t){var n;Ct(this,Oy,t),(n=ve(this,Cf))==null||n.call(this),Ct(this,Cf,t(this.setOnline.bind(this)))}setOnline(t){ve(this,Py)!==t&&(Ct(this,Py,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return ve(this,Py)}},Py=new WeakMap,Cf=new WeakMap,Oy=new WeakMap,vN),s6=new yee;function gee(e){return Math.min(1e3*2**e,3e4)}function ZO(e){return(e??"online")==="online"?s6.isOnline():!0}var XO=class{constructor(e){this.revert=e?.revert,this.silent=e?.silent}};function f8(e){return e instanceof XO}function QO(e){let t=!1,n=0,r=!1,i,s,o;const a=new Promise((L,D)=>{s=L,o=D}),c=L=>{r||(_(new XO(L)),e.abort?.())},d=()=>{t=!0},h=()=>{t=!1},y=()=>x3.isFocused()&&(e.networkMode==="always"||s6.isOnline())&&e.canRun(),g=()=>ZO(e.networkMode)&&e.canRun(),x=L=>{r||(r=!0,e.onSuccess?.(L),i?.(),s(L))},_=L=>{r||(r=!0,e.onError?.(L),i?.(),o(L))},S=()=>new Promise(L=>{i=D=>{(r||y())&&L(D)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),I=()=>{if(r)return;let L;const D=n===0?e.initialPromise:void 0;try{L=D??e.fn()}catch(F){L=Promise.reject(F)}Promise.resolve(L).then(x).catch(F=>{if(r)return;const $=e.retry??(ug?0:3),z=e.retryDelay??gee,V=typeof z=="function"?z(n,F):z,K=$===!0||typeof $=="number"&&n<$||typeof $=="function"&&$(n,F);if(t||!K){_(F);return}n++,e.onFail?.(n,F),fee(V).then(()=>y()?void 0:S()).then(()=>{t?_(F):I()})})};return{promise:a,cancel:c,continue:()=>(i?.(),a),cancelRetry:d,continueRetry:h,canStart:g,start:()=>(g()?I():S().then(I),a)}}function bee(){let e=[],t=0,n=g=>{g()},r=g=>{g()},i=g=>setTimeout(g,0);const s=g=>{i=g},o=g=>{let x;t++;try{x=g()}finally{t--,t||d()}return x},a=g=>{t?e.push(g):i(()=>{n(g)})},c=g=>(...x)=>{a(()=>{g(...x)})},d=()=>{const g=e;e=[],g.length&&i(()=>{r(()=>{g.forEach(x=>{n(x)})})})};return{batch:o,batchCalls:c,schedule:a,setNotifyFunction:g=>{n=g},setBatchNotifyFunction:g=>{r=g},setScheduler:s}}var Oi=bee(),_p,wN,JO=(wN=class{constructor(){on(this,_p)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),SS(this.gcTime)&&Ct(this,_p,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ug?1/0:300*1e3))}clearGcTimeout(){ve(this,_p)&&(clearTimeout(ve(this,_p)),Ct(this,_p,void 0))}},_p=new WeakMap,wN),Ly,By,Ya,Cs,dv,Sp,Rc,Pl,EN,xee=(EN=class extends JO{constructor(t){super();on(this,Rc);on(this,Ly);on(this,By);on(this,Ya);on(this,Cs);on(this,dv);on(this,Sp);Ct(this,Sp,!1),Ct(this,dv,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ct(this,Ya,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ct(this,Ly,t.state||vee(this.options)),this.state=ve(this,Ly),this.scheduleGc()}get meta(){return this.options.meta}get promise(){return ve(this,Cs)?.promise}setOptions(t){this.options={...ve(this,dv),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ve(this,Ya).remove(this)}setData(t,n){const r=AS(this.state.data,t,this.options);return Rn(this,Rc,Pl).call(this,{data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(t,n){Rn(this,Rc,Pl).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){const n=ve(this,Cs)?.promise;
62return ve(this,Cs)?.cancel(t),n?n.then(Za).catch(Za):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ve(this,Ly))}isActive(){return this.observers.some(t=>Nc(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!GO(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),ve(this,Cs)?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),ve(this,Cs)?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ve(this,Ya).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(ve(this,Cs)&&(ve(this,Sp)?ve(this,Cs).cancel({revert:!0}):ve(this,Cs).cancelRetry()),this.scheduleGc()),ve(this,Ya).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Rn(this,Rc,Pl).call(this,{type:"invalidate"})}
vendor: 4,214 bytes, line 62
62fetch(t,n){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(ve(this,Cs))return ve(this,Cs).continueRetry(),ve(this,Cs).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(Ct(this,Sp,!0),r.signal)})},s=()=>{const c=YO(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),Ct(this,Sp,!1),this.options.persister?this.options.persister(c,d,this):c(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),this.options.behavior?.onFetch(o,this),Ct(this,By,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&Rn(this,Rc,Pl).call(this,{type:"fetch",meta:o.fetchOptions?.meta});const a=c=>{f8(c)&&c.silent||Rn(this,Rc,Pl).call(this,{type:"error",error:c}),f8(c)||(ve(this,Ya).config.onError?.(c,this),ve(this,Ya).config.onSettled?.(this.state.data,c,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return Ct(this,Cs,QO({initialPromise:n?.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}this.setData(c),ve(this,Ya).config.onSuccess?.(c,this),ve(this,Ya).config.onSettled?.(c,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:a,onFail:(c,d)=>{Rn(this,Rc,Pl).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{Rn(this,Rc,Pl).call(this,{type:"pause"})},onContinue:()=>{Rn(this,Rc,Pl).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),ve(this,Cs).start()}},Ly=new WeakMap,By=new WeakMap,Ya=new WeakMap,Cs=new WeakMap,dv=new WeakMap,Sp=new WeakMap,Rc=new WeakSet,Pl=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...eL(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return f8(i)&&i.revert&&ve(this,By)?{...ve(this,By),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Oi.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),ve(this,Ya).notify({query:this,type:"updated",action:t})})},EN);function eL(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ZO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function vee(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Mu,_N,wee=(_N=class extends Ng{constructor(t={}){super();on(this,Mu);this.config=t,Ct(this,Mu,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Y9(i,n);let o=this.get(s);return o||(o=new xee({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){ve(this,Mu).has(t.queryHash)||(ve(this,Mu).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=ve(this,Mu).get(t.queryHash);n&&(t.destroy(),n===t&&ve(this,Mu).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Oi.batch(()=>
62{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ve(this,Mu).get(t)}getAll(){return[...ve(this,Mu).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>B7(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>B7(t,r)):n}notify(t){Oi.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Oi.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Oi.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Mu=new WeakMap,_N),Nu,Ys,Tp,ju,vf,SN,Eee=(SN=class extends JO{constructor(t){super();on(this,ju);on(this,Nu);on(this,Ys);on(this,Tp);this.mutationId=t.mutationId,Ct(this,Ys,t.mutationCache),Ct(this,Nu,[]),this.state=t.state||tL(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ve(this,Nu).includes(t)||(ve(this,Nu).push(t),this.clearGcTimeout(),ve(this,Ys).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ct(this,Nu,ve(this,Nu).filter(n=>n!==t)),this.scheduleGc(),ve(this,Ys).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ve(this,Nu).length||(this.state.status==="pending"?this.scheduleGc():ve(this,Ys).remove(this))}continue(){return ve(this,Tp)?.continue()??this.execute(this.state.variables)}async execute(t){Ct(this,Tp,QO({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(i,s)=>{Rn(this,ju,vf).call(this,{type:"failed",failureCount:i,error:s})},onPause:()=>{Rn(this,ju,vf).call(this,{type:"pause"})},onContinue:()=>{Rn(this,ju,vf).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ve(this,Ys).canRun(this)}));const n=this.state.status==="pending",r=!ve(this,Tp).canStart();try{if(!n){Rn(this,ju,vf).call(this,{type:"pending",variables:t,isPaused:r}),await ve(this,Ys).config.onMutate?.(t,this);const s=await this.options.onMutate?.(t);s!==this.state.context&&Rn(this,ju,vf).call(this,{type:"pending",context:s,variables:t,isPaused:r})}const i=await ve(this,Tp).start();return await ve(this,Ys).config.onSuccess?.(i,t,this.state.context,this),await this.options.onSuccess?.(i,t,this.state.context),await ve(this,Ys).config.onSettled?.(i,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(i,null,t,this.state.context),Rn(this,ju,vf).call(this,{type:"success",data:i}),i}catch(i){try{throw await ve(this,Ys).config.onError?.(i,t,this.state.context,this),await this.options.onError?.(i,t,this.state.context),await ve(this,Ys).config.onSettled?.(void 0,i,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,i,t,this.state.context),i}finally{Rn(this,ju,vf).call(this,{type:"error",error:i})}}finally{ve(this,Ys).runNext(this)}}},Nu=new WeakMap,Ys=new WeakMap,Tp=new WeakMap,ju=new WeakSet,vf=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Oi.batch(()=>{ve(this,Nu).forEach(r=>{r.onMutationUpdate(t)}),ve(this,Ys).notify({mutation:this,type:"updated",action:t})})},SN);function tL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ta,fv,TN,_ee=(TN=class extends Ng{constructor(t={}){super();on(this,ta);on(this,fv);this.config=t,Ct(this,ta,new Map),Ct(this,fv,Date.now())}build(t,n,r){const i=new Eee({mutationCache:this,mutationId:++D2(this,fv)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=r5(t),r=ve(this,ta).get(n)??[];r.push(t),ve(this,ta).set(n,r),this.notify({type:"added",mutation:t})}remove(t){const n=r5(t);if(ve(this,ta).has(n)){const r=ve(this,ta).get(n)?.filter(i=>i!==t);r&&(r.length===0?ve(this,ta).delete(n):ve(this,ta).set(n,r))}this.notify({type:"removed",mutation:t})}canRun(t){const n=ve(this,ta).get(r5(t))?.find(r=>r.state.status==="pending");return!n||n===t}runNext(t){return ve(this,ta).get(r5(t))?.find(r=>
62r!==t&&r.state.isPaused)?.continue()??Promise.resolve()}clear(){Oi.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...ve(this,ta).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>F7(n,r))}findAll(t={}){return this.getAll().filter(n=>F7(t,n))}notify(t){Oi.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Oi.batch(()=>Promise.all(t.map(n=>n.continue().catch(Za))))}},ta=new WeakMap,fv=new WeakMap,TN);function r5(e){return e.options.scope?.id??String(e.mutationId)}function See(e){return{onFetch:(t,n)=>{const r=async()=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[],c={pages:[],pageParams:[]};let d=!1;const h=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(t.signal.aborted?d=!0:t.signal.addEventListener("abort",()=>{d=!0}),t.signal)})},y=YO(t.options,t.fetchOptions),g=async(_,S,I)=>{if(d)return Promise.reject();if(S==null&&_.pages.length)return Promise.resolve(_);const L={queryKey:t.queryKey,pageParam:S,direction:I?"backward":"forward",meta:t.options.meta};h(L);const D=await y(L),{maxPages:F}=t.options,$=I?pee:hee;return{pages:$(_.pages,D,F),pageParams:$(_.pageParams,S,F)}};let x;if(s&&o.length){const _=s==="backward",S=_?Tee:U7,I={pages:o,pageParams:a},L=S(i,I);x=await g(I,L,_)}else{x=await g(c,a[0]??i.initialPageParam);const _=e??o.length;for(let S=1;S<_;S++){const I=U7(i,x);if(I==null)break;x=await g(x,I)}}return x};t.options.persister?t.fetchFn=()=>t.options.persister?.(r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=r}}}function U7(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Tee(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Jr,If,Rf,Fy,Dy,Mf,$y,Uy,AN,Aee=(AN=class{constructor(e={}){on(this,Jr);on(this,If);on(this,Rf);on(this,Fy);on(this,Dy);on(this,Mf);on(this,$y);on(this,Uy);Ct(this,Jr,e.queryCache||new wee),Ct(this,If,e.mutationCache||new _ee),Ct(this,Rf,e.defaultOptions||{}),Ct(this,Fy,new Map),Ct(this,Dy,new Map),Ct(this,Mf,0)}mount(){D2(this,Mf)._++,ve(this,Mf)===1&&(Ct(this,$y,x3.subscribe(async e=>{e&&(await this.resumePausedMutations(),ve(this,Jr).onFocus())})),Ct(this,Uy,s6.subscribe(async e=>{e&&(await this.resumePausedMutations(),ve(this,Jr).onOnline())})))}unmount(){var e,t;D2(this,Mf)._--,ve(this,Mf)===0&&((e=ve(this,$y))==null||e.call(this),Ct(this,$y,void 0),(t=ve(this,Uy))==null||t.call(this),Ct(this,Uy,void 0))}isFetching(e){return ve(this,Jr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ve(this,If).findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return ve(this,Jr).get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=ve(this,Jr).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Ey(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return ve(this,Jr).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=ve(this,Jr).get(r.queryHash)?.state.data,o=dee(t,s);if(o!==void 0)return ve(this,Jr).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Oi.batch(()=>ve(this,Jr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return ve(this,Jr).get(t.queryHash)?.state}removeQueries(e){const t=ve(this,Jr);Oi.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=ve(this,Jr),r={type:"active",...e};return Oi.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Oi.batch(()=>ve(this,Jr).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Za).catch(Za)}invalidateQueries(e={},t={}){return Oi.batch(()=>
vendor: 9,123 bytes, line 62
62{if(ve(this,Jr).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:t?.cancelRefetch??!0},r=Oi.batch(()=>ve(this,Jr).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Za)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Za)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=ve(this,Jr).build(this,t);return n.isStaleByTime(Ey(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Za).catch(Za)}fetchInfiniteQuery(e){return e.behavior=See(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Za).catch(Za)}resumePausedMutations(){return s6.isOnline()?ve(this,If).resumePausedMutations():Promise.resolve()}getQueryCache(){return ve(this,Jr)}getMutationCache(){return ve(this,If)}getDefaultOptions(){return ve(this,Rf)}setDefaultOptions(e){Ct(this,Rf,e)}setQueryDefaults(e,t){ve(this,Fy).set(qp(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ve(this,Fy).values()];let n={};return t.forEach(r=>{Px(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){ve(this,Dy).set(qp(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ve(this,Dy).values()];let n={};return t.forEach(r=>{Px(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ve(this,Rf).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Y9(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===KO&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...ve(this,Rf).mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ve(this,Jr).clear(),ve(this,If).clear()}},Jr=new WeakMap,If=new WeakMap,Rf=new WeakMap,Fy=new WeakMap,Dy=new WeakMap,Mf=new WeakMap,$y=new WeakMap,Uy=new WeakMap,AN),Ao,Vn,hv,Zs,Ap,zy,Pu,pv,Vy,qy,kp,Cp,Nf,Hy,fr,Xb,kS,CS,IS,RS,MS,NS,jS,nL,kN,kee=(kN=class extends Ng{constructor(t,n){super();on(this,fr);on(this,Ao);on(this,Vn);on(this,hv);on(this,Zs);on(this,Ap);on(this,zy);on(this,Pu);on(this,pv);on(this,Vy);on(this,qy);on(this,kp);on(this,Cp);on(this,Nf);on(this,Hy,new Set);this.options=n,Ct(this,Ao,t),Ct(this,Pu,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ve(this,Vn).addObserver(this),z7(ve(this,Vn),this.options)?Rn(this,fr,Xb).call(this):this.updateResult(),Rn(this,fr,RS).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return PS(ve(this,Vn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return PS(ve(this,Vn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Rn(this,fr,MS).call(this),Rn(this,fr,NS).call(this),ve(this,Vn).removeObserver(this)}setOptions(t,n){const r=this.options,i=ve(this,Vn);if(this.options=ve(this,Ao).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nc(this.options.enabled,ve(this,Vn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Rn(this,fr,jS).call(this),ve(this,Vn).setOptions(this.options),r._defaulted&&!i6(this.options,r)&&ve(this,Ao).getQueryCache().notify({type:"observerOptionsUpdated",query:ve(this,Vn),observer:this});const s=this.hasListeners();s&&V7(ve(this,Vn),i,this.options,r)&&Rn(this,fr,Xb).call(this),this.updateResult(n),s&&(ve(this,Vn)!==i||Nc(this.options.enabled,ve(this,Vn))!==Nc(r.enabled,ve(this,Vn))||Ey(this.options.staleTime,ve(this,Vn))!==Ey(r.staleTime,ve(this,Vn)))&&Rn(this,fr,kS).call(this);const o=Rn(this,fr,CS).call(this);s&&(ve(this,Vn)!==i||Nc(this.options.enabled,ve(this,Vn))!==Nc(r.enabled,ve(this,Vn))||o!==ve(this,Nf))&&Rn(this,fr,IS).call(this,o)}getOptimisticResult(t){const n=ve(this,Ao).getQueryCache().build(ve(this,Ao),t),r=this.createResult(n,t);return Iee(this,r)&&(Ct(this,Zs,r),Ct(this,zy,this.options),Ct(this,Ap,ve(this,Vn).state)),r}getCurrentResult(){return ve(this,Zs)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n?.(i),t[i])})}),r}trackProp(t){ve(this,Hy).add(t)}getCurrentQuery(){return ve(this,Vn)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=ve(this,Ao).defaultQueryOptions(t),r=ve(this,Ao).getQueryCache().build(ve(this,Ao),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Rn(this,fr,Xb).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ve(this,Zs)))}createResult(t,n){const r=ve(this,Vn),i=this.options,s=ve(this,Zs),o=ve(this,Ap),a=ve(this,zy),d=t!==r?t.state:ve(this,hv),{state:h}=t;let y={...h},g=!1,x;if(n._optimisticResults){const K=this.hasListeners(),te=!K&&z7(t,n),Q=K&&V7(t,r,n,i);(te||Q)&&(y={...y,...eL(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:_,errorUpdatedAt:S,status:I}=y;if(n.select&&y.data!==void 0)if(s&&y.data===o?.data&&n.select===ve(this,pv))x=ve(this,Vy);else try{Ct(this,pv,n.select),x=n.select(y.data),x=AS(s?.data,x,n),Ct(this,Vy,x),Ct(this,Pu,null)}catch(K){Ct(this,Pu,K)}else x=y.data;if(n.placeholderData!==void 0&&x===void 0&&I==="pending"){let K;if(s?.isPlaceholderData&&n.placeholderData===a?.placeholderData)K=s.data;else if(K=typeof n.placeholderData=="function"?n.placeholderData(ve(this,qy)?.state.data,ve(this,qy)):n.placeholderData,n.select&&K!==void 0)try{K=n.select(K),Ct(this,Pu,null)}catch(te){Ct(this,Pu,te)}K!==void 0&&(I="success",x=AS(s?.data,K,n),g=!0)}ve(this,Pu)&&(_=ve(this,Pu),x=ve(this,Vy),S=Date.now(),I="error");const L=y.fetchStatus==="fetching",D=I==="pending",F=I==="error",$=D&&L,z=x!==void 0;return{status:I,fetchStatus:y.fetchStatus,isPending:D,isSuccess:I==="success",isError:F,isInitialLoading:$,isLoading:$,data:x,dataUpdatedAt:y.dataUpdatedAt,error:_,errorUpdatedAt:S,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>d.dataUpdateCount||y.errorUpdateCount>d.errorUpdateCount,isFetching:L,isRefetching:L&&!D,isLoadingError:F&&!z,isPaused:y.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:F&&z,isStale:X9(t,n),refetch:this.refetch}}updateResult(t){const n=ve(this,Zs),r=this.createResult(ve(this,Vn),this.options);if(Ct(this,Ap,ve(this,Vn).state),Ct(this,zy,this.options),ve(this,Ap).data!==void 0&&Ct(this,qy,ve(this,Vn)),i6(r,n))return;Ct(this,Zs,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!ve(this,Hy).size)return!0;const c=new Set(a??ve(this,Hy));return this.options.throwOnError&&c.add("error"),Object.keys(ve(this,Zs)).some(d=>{const h=d;return ve(this,Zs)[h]!==n[h]&&c.has(h)})};t?.listeners!==!1&&s()&&(i.listeners=!0),Rn(this,fr,nL).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Rn(this,fr,RS).call(this)}},Ao=new WeakMap,Vn=new WeakMap,hv=new WeakMap,Zs=new WeakMap,Ap=new WeakMap,zy=new WeakMap,Pu=new WeakMap,pv=new WeakMap,Vy=new WeakMap,qy=new WeakMap,kp=new WeakMap,Cp=new WeakMap,Nf=new WeakMap,Hy=new WeakMap,fr=new WeakSet,Xb=function(t){Rn(this,fr,jS).call(this);let n=ve(this,Vn).fetch(this.options,t);return t?.throwOnError||(n=n.catch(Za)),n},kS=function(){Rn(this,fr,MS).call(this);const t=Ey(this.options.staleTime,ve(this,Vn));if(ug||ve(this,Zs).isStale||!SS(t))return;const r=GO(ve(this,Zs).dataUpdatedAt,t)+1;Ct(this,kp,setTimeout(()=>{ve(this,Zs).isStale||this.updateResult()},r))},CS=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ve(this,Vn)):this.options.refetchInterval)??!1},IS=function(t){Rn(this,fr,NS).call(this),Ct(this,Nf,t),!(ug||Nc(this.options.enabled,ve(this,Vn))===!1||!SS(ve(this,Nf))||ve(this,Nf)===0)&&Ct(this,Cp,setInterval(()=>{(this.options.refetchIntervalInBackground||x3.isFocused())&&Rn(this,fr,Xb).call(this)},ve(this,Nf)))},RS=function(){Rn(this,fr,kS).call(this),Rn(this,fr,IS).call(this,Rn(this,fr,CS).call(this))},MS=function(){ve(this,kp)&&(clearTimeout(ve(this,kp)),Ct(this,kp,void 0))},NS=function(){ve(this,Cp)&&(clearInterval(ve(this,Cp)),Ct(this,Cp,void 0))},jS=function(){const t=ve(this,Ao).getQueryCache().build(ve(this,Ao),this.options);if(t===ve(this,Vn))return;const n=ve(this,Vn);Ct(this,Vn,t),Ct(this,hv,t.state),this.hasListeners()&&(n?.removeObserver(this),t.addObserver(this))},nL=function(t){Oi.batch(()=>
62{t.listeners&&this.listeners.forEach(n=>{n(ve(this,Zs))}),ve(this,Ao).getQueryCache().notify({query:ve(this,Vn),type:"observerResultsUpdated"})})},kN);function Cee(e,t){return Nc(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function z7(e,t){return Cee(e,t)||e.state.data!==void 0&&PS(e,t,t.refetchOnMount)}function PS(e,t,n){if(Nc(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&X9(e,t)}return!1}function V7(e,t,n,r){return(e!==t||Nc(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&X9(e,n)}function X9(e,t){return Nc(t.enabled,e)!==!1&&e.isStaleByTime(Ey(t.staleTime,e))}function Iee(e,t){return!i6(e.getCurrentResult(),t)}var jf,Pf,ko,Fl,ed,k5,OS,CN,Ree=(CN=class extends Ng{constructor(n,r){super();on(this,ed);on(this,jf);on(this,Pf);on(this,ko);on(this,Fl);Ct(this,jf,n),this.setOptions(r),this.bindMethods(),Rn(this,ed,k5).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const r=this.options;this.options=ve(this,jf).defaultMutationOptions(n),i6(this.options,r)||ve(this,jf).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ve(this,ko),observer:this}),r?.mutationKey&&this.options.mutationKey&&qp(r.mutationKey)!==qp(this.options.mutationKey)?this.reset():ve(this,ko)?.state.status==="pending"&&ve(this,ko).setOptions(this.options)}onUnsubscribe(){this.hasListeners()||ve(this,ko)?.removeObserver(this)}onMutationUpdate(n){Rn(this,ed,k5).call(this),Rn(this,ed,OS).call(this,n)}getCurrentResult(){return ve(this,Pf)}reset(){ve(this,ko)?.removeObserver(this),Ct(this,ko,void 0),Rn(this,ed,k5).call(this),Rn(this,ed,OS).call(this)}mutate(n,r){return Ct(this,Fl,r),ve(this,ko)?.removeObserver(this),Ct(this,ko,ve(this,jf).getMutationCache().build(ve(this,jf),this.options)),ve(this,ko).addObserver(this),ve(this,ko).execute(n)}},jf=new WeakMap,Pf=new WeakMap,ko=new WeakMap,Fl=new WeakMap,ed=new WeakSet,k5=function(){const n=ve(this,ko)?.state??tL();Ct(this,Pf,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},OS=function(n){Oi.batch(()=>{if(ve(this,Fl)&&this.hasListeners()){const r=ve(this,Pf).variables,i=ve(this,Pf).context;n?.type==="success"?(ve(this,Fl).onSuccess?.(n.data,r,i),ve(this,Fl).onSettled?.(n.data,null,r,i)):n?.type==="error"&&(ve(this,Fl).onError?.(n.error,r,i),ve(this,Fl).onSettled?.(void 0,n.error,r,i))}this.listeners.forEach(r=>{r(ve(this,Pf))})})},CN),A=Tg();const Be=va(A),lg=Aq({__proto__:null,default:Be},[A]);var rL=A.createContext(void 0),lh=e=>{const t=A.useContext(rL);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Mee=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(rL.Provider,{value:e,children:t})),iL=A.createContext(!1),Nee=()=>A.useContext(iL);iL.Provider;function jee(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Pee=A.createContext(jee()),Oee=()=>A.useContext(Pee);function sL(e,t){return typeof e=="function"?e(...t):!!e}function Lee(){}var Bee=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},Fee=e=>{A.useEffect(()=>{e.clearReset()},[e])},Dee=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&sL(n,[e.error,r]),$ee=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Uee=(e,t)=>e?.suspense&&t.isPending,zee=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Vee(e,t,n){const r=lh(),i=Nee(),s=Oee(),o=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=i?"isRestoring":"optimistic",$ee(o),Bee(o,s),Fee(s);const[a]=A.useState(()=>new t(r,o)),c=a.getOptimisticResult(o);if(A.useSyncExternalStore(A.useCallback(d=>{const h=i?()=>{}:a.subscribe(Oi.batchCalls(d));return a.updateResult(),h},[a,i]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),A.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),Uee(o,c))throw zee(o,a,s);if(Dee({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(o,c),o.notifyOnChangeProps?c:a.trackResult(c)}function Kr(e,t){return Vee(e,kee)}function a0(e,t){const n=lh(),[r]=A.useState(()=>new Ree(n,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const i=A.useSyncExternalStore(A.useCallback(o=>r.subscribe(Oi.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=A.useCallback((o,a)=>{r.mutate(o,a).catch(Lee)},[r]);if(i.error&&sL(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}
vendor: 4,615 bytes, line 62
62var C5={exports:{}},qee=C5.exports,q7;function Hee(){return q7||(q7=1,(function(e,t){(function(n,r){e.exports=r()})(qee,(function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",c="hour",d="day",h="week",y="month",g="quarter",x="year",_="date",S="Invalid Date",I=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,L=/\[([^\]]+)]|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,D={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(M){var m=["th","st","nd","rd"],E=M%100;return"["+M+(m[(E-20)%10]||m[E]||m[0])+"]"}},F=function(M,m,E){var C=String(M);return!C||C.length>=m?M:""+Array(m+1-C.length).join(E)+M},$={s:F,z:function(M){var m=-M.utcOffset(),E=Math.abs(m),C=Math.floor(E/60),N=E%60;return(m<=0?"+":"-")+F(C,2,"0")+":"+F(N,2,"0")},m:function M(m,E){if(m.date()<E.date())return-M(E,m);var C=12*(E.year()-m.year())+(E.month()-m.month()),N=m.clone().add(C,y),P=E-N<0,B=m.clone().add(C+(P?-1:1),y);return+(-(C+(E-N)/(P?N-B:B-N))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:y,y:x,w:h,d,D:_,h:c,m:a,s:o,ms:s,Q:g}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},z="en",V={};V[z]=D;var K=function(M){return M instanceof ne},te=function M(m,E,C){var N;if(!m)return z;if(typeof m=="string"){var P=m.toLowerCase();V[P]&&(N=P),E&&(V[P]=E,N=P);var B=m.split("-");if(!N&&B.length>1)return M(B[0])}else{var O=m.name;V[O]=m,N=O}return!C&&N&&(z=N),N||!C&&z},Q=function(M,m){if(K(M))return M.clone();var E=typeof m=="object"?m:{};return E.date=M,E.args=arguments,new ne(E)},ee=$;ee.l=te,ee.i=K,ee.w=function(M,m){return Q(M,{locale:m.$L,utc:m.$u,x:m.$x,$offset:m.$offset})};var ne=(function(){function M(E){this.$L=te(E.locale,null,!0),this.parse(E)}var m=M.prototype;return m.parse=function(E){this.$d=(function(C){var N=C.date,P=C.utc;if(N===null)return new Date(NaN);if(ee.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var B=N.match(I);if(B){var O=B[2]-1||0,j=(B[7]||"0").substring(0,3);return P?new Date(Date.UTC(B[1],O,B[3]||1,B[4]||0,B[5]||0,B[6]||0,j)):new Date(B[1],O,B[3]||1,B[4]||0,B[5]||0,B[6]||0,j)}}return new Date(N)})(E),this.$x=E.x||{},this.init()},m.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},m.$utils=function(){return ee},m.isValid=function(){return this.$d.toString()!==S},m.isSame=function(E,C){var N=Q(E);return this.startOf(C)<=N&&N<=this.endOf(C)},m.isAfter=function(E,C){return Q(E)<this.startOf(C)},m.isBefore=function(E,C){return this.endOf(C)<Q(E)},m.$g=function(E,C,N){return ee.u(E)?this[C]:this.set(N,E)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(E,C){var N=this,P=!!ee.u(C)||C,B=ee.p(E),O=function(we,Ce){var St=ee.w(N.$u?Date.UTC(N.$y,Ce,we):new Date(N.$y,Ce,we),N);return P?St:St.endOf(d)},j=function(we,Ce){return ee.w(N.toDate()[we].apply(N.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Ce)),N)},v=this.$W,k=this.$M,X=this.$D,re="set"+(this.$u?"UTC":"");switch(B){case x:return P?O(1,0):O(31,11);case y:return P?O(1,k):O(0,k+1);case h:var ue=this.$locale().weekStart||0,pe=(v<ue?v+7:v)-ue;return O(P?X-pe:X+(6-pe),k);case d:case _:return j(re+"Hours",0);case c:return j(re+"Minutes",1);case a:return j(re+"Seconds",2);case o:return j(re+"Milliseconds",3);default:return this.clone()}},m.endOf=function(E){return this.startOf(E,!1)},m.$set=function(E,C){var N,P=ee.p(E),B="set"+(this.$u?"UTC":""),O=(N={},N[d]=B+"Date",N[_]=B+"Date",N[y]=B+"Month",N[x]=B+"FullYear",N[c]=B+"Hours",N[a]=B+"Minutes",N[o]=B+"Seconds",N[s]=B+"Milliseconds",N)[P],j=P===d?this.$D+(C-this.$W):C;if(P===y||P===x){var v=this.clone().set(_,1);v.$d[O](j),v.init(),this.$d=v.set(_,Math.min(this.$D,v.daysInMonth())).$d}else O&&this.$d[O](j);return this.init(),this},m.set=function(E,C){return this.clone().$set(E,C)},m.get=function(E){return this[ee.p(E)]()},m.add=function(E,C){var N,P=this;E=Number(E);var B=ee.p(C),O=function(k){var X=Q(P);return ee.w(X.date(X.date()+Math.round(k*E)),P)};if(B===y)return this.set(y,this.$M+E);if(B===x)return this.set(x,this.$y+E);if(B===d)return O(1);if(B===h)return O(7);var j=(N={},N[a]=r,N[c]=i,N[o]=n,N)[B]||1,v=this.$d.getTime()+E*j;return ee.w(v,this)}
vendor: 9,268 bytes, line 62
62,m.subtract=function(E,C){return this.add(-1*E,C)},m.format=function(E){var C=this,N=this.$locale();if(!this.isValid())return N.invalidDate||S;var P=E||"YYYY-MM-DDTHH:mm:ssZ",B=ee.z(this),O=this.$H,j=this.$m,v=this.$M,k=N.weekdays,X=N.months,re=N.meridiem,ue=function(Ce,St,Ve,et){return Ce&&(Ce[St]||Ce(C,P))||Ve[St].slice(0,et)},pe=function(Ce){return ee.s(O%12||12,Ce,"0")},we=re||function(Ce,St,Ve){var et=Ce<12?"AM":"PM";return Ve?et.toLowerCase():et};return P.replace(L,(function(Ce,St){return St||(function(Ve){switch(Ve){case"YY":return String(C.$y).slice(-2);case"YYYY":return ee.s(C.$y,4,"0");case"M":return v+1;case"MM":return ee.s(v+1,2,"0");case"MMM":return ue(N.monthsShort,v,X,3);case"MMMM":return ue(X,v);case"D":return C.$D;case"DD":return ee.s(C.$D,2,"0");case"d":return String(C.$W);case"dd":return ue(N.weekdaysMin,C.$W,k,2);case"ddd":return ue(N.weekdaysShort,C.$W,k,3);case"dddd":return k[C.$W];case"H":return String(O);case"HH":return ee.s(O,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return we(O,j,!0);case"A":return we(O,j,!1);case"m":return String(j);case"mm":return ee.s(j,2,"0");case"s":return String(C.$s);case"ss":return ee.s(C.$s,2,"0");case"SSS":return ee.s(C.$ms,3,"0");case"Z":return B}return null})(Ce)||B.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(E,C,N){var P,B=this,O=ee.p(C),j=Q(E),v=(j.utcOffset()-this.utcOffset())*r,k=this-j,X=function(){return ee.m(B,j)};switch(O){case x:P=X()/12;break;case y:P=X();break;case g:P=X()/3;break;case h:P=(k-v)/6048e5;break;case d:P=(k-v)/864e5;break;case c:P=k/i;break;case a:P=k/r;break;case o:P=k/n;break;default:P=k}return N?P:ee.a(P)},m.daysInMonth=function(){return this.endOf(y).$D},m.$locale=function(){return V[this.$L]},m.locale=function(E,C){if(!E)return this.$L;var N=this.clone(),P=te(E,C,!0);return P&&(N.$L=P),N},m.clone=function(){return ee.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M})(),J=ne.prototype;return Q.prototype=J,[["$ms",s],["$s",o],["$m",a],["$H",c],["$W",d],["$M",y],["$y",x],["$D",_]].forEach((function(M){J[M[1]]=function(m){return this.$g(m,M[0],M[1])}})),Q.extend=function(M,m){return M.$i||(M(m,ne,Q),M.$i=!0),Q},Q.locale=te,Q.isDayjs=K,Q.unix=function(M){return Q(1e3*M)},Q.en=V[z],Q.Ls=V,Q.p={},Q}))})(C5)),C5.exports}var Po=Hee();const Hp=va(Po);var I5={exports:{}},Wee=I5.exports,H7;function Gee(){return H7||(H7=1,(function(e,t){(function(n,r){e.exports=r()})(Wee,(function(){return function(n,r,i){n=n||{};var s=r.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(d,h,y,g){return s.fromToBase(d,h,y,g)}i.en.relativeTime=o,s.fromToBase=function(d,h,y,g,x){for(var _,S,I,L=y.$locale().relativeTime||o,D=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],F=D.length,$=0;$<F;$+=1){var z=D[$];z.d&&(_=g?i(d).diff(y,z.d,!0):y.diff(d,z.d,!0));var V=(n.rounding||Math.round)(Math.abs(_));if(I=_>0,V<=z.r||!z.r){V<=1&&$>0&&(z=D[$-1]);var K=L[z.l];x&&(V=x(""+V)),S=typeof K=="string"?K.replace("%d",V):K(V,h,z.l,I);break}}if(h)return S;var te=I?L.future:L.past;return typeof te=="function"?te(S):te.replace("%s",S)},s.to=function(d,h){return a(d,h,this,!0)},s.from=function(d,h){return a(d,h,this)};var c=function(d){return d.$u?i.utc():i()};s.toNow=function(d){return this.to(c(this),d)},s.fromNow=function(d){return this.from(c(this),d)}}}))})(I5)),I5.exports}var Kee=Gee();const Yee=va(Kee);var i5={},h8={exports:{}},So={},p8={exports:{}},m8={};var W7;function Zee(){return W7||(W7=1,(function(e){function t(P,B){var O=P.length;P.push(B);e:for(;0<O;){var j=O-1>>>1,v=P[j];if(0<i(v,B))P[j]=B,P[O]=v,O=j;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var B=P[0],O=P.pop();if(O!==B){P[0]=O;e:for(var j=0,v=P.length,k=v>>>1;j<k;){var X=2*(j+1)-1,re=P[X],ue=X+1,pe=P[ue];if(0>i(re,O))ue<v&&0>i(pe,re)?(P[j]=pe,P[ue]=O,j=ue):(P[j]=re,P[X]=O,j=X);else if(ue<v&&0>i(pe,O))P[j]=pe,P[ue]=O,j=ue;else break e}}return B}function i(P,B){var O=P.sortIndex-B.sortIndex;return O!==0?O:P.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var c=[],d=[],h=1,y=null,g=3,x=!1,_=!1,S=!1,I=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(P){for(var B=n(d);B!==null;){if(B.callback===null)r(d);else if(B.startTime<=P)r(d),B.sortIndex=B.expirationTime,t(c,B);else break;B=n(d)}}function $(P){if(S=!1,F(P),!_)if(n(c)!==null)_=!0,C(z);else{var B=n(d);B!==null&&N($,B.startTime-P)}}function z(P,B){_=!1,S&&(S=!1,L(te),te=-1),x=!0;var O=g;try{for(F(B),y=n(c);y!==null&&(!(y.expirationTime>B)||P&&!ne());){var j=y.callback;if(typeof j=="function"){y.callback=null,g=y.priorityLevel;var v=j(y.expirationTime<=B);B=e.unstable_now(),typeof v=="function"?y.callback=v:y===n(c)&&r(c),F(B)}else r(c);y=n(c)}if(y!==null)var k=!0;else{var X=n(d);X!==null&&N($,X.startTime-B),k=!1}return k}finally{y=null,g=O,x=!1}}var V=!1,K=null,te=-1,Q=5,ee=-1;function ne(){return!(e.unstable_now()-ee<Q)}function J(){if(K!==null){var P=e.unstable_now();ee=P;var B=!0;try{B=K(!0,P)}finally{B?M():(V=!1,K=null)}}else V=!1}var M;if(typeof D=="function")M=function(){D(J)};else if(typeof MessageChannel<"u"){var m=new MessageChannel,E=m.port2;m.port1.onmessage=J,M=function(){E.postMessage(null)}}else M=function(){I(J,0)};function C(P){K=P,V||(V=!0,M())}function N(P,B){te=I(function(){P(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){_||x||(_=!0,C(z))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(P){switch(g){case 1:case 2:case 3:var B=3;break;default:B=g}var O=g;g=B;try{return P()}finally{g=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,B){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var O=g;g=P;try{return B()}finally{g=O}},e.unstable_scheduleCallback=function(P,B,O){var j=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?j+O:j):O=j,P){case 1:var v=-1;break;case 2:v=250;break;case 5:v=1073741823;break;case 4:v=1e4;break;default:v=5e3}return v=O+v,P={id:h++,callback:B,priorityLevel:P,startTime:O,expirationTime:v,sortIndex:-1},O>j?(P.sortIndex=O,t(d,P),n(c)===null&&P===n(d)&&(S?(L(te),te=-1):S=!0,N($,O-j))):(P.sortIndex=v,t(c,P),_||x||(_=!0,C(z))),P},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(P){var B=g;return function(){var O=g;g=B;try{return P.apply(this,arguments)}finally{g=O}}}})(m8)),m8}var G7;function Xee(){return G7||(G7=1,p8.exports=Zee()),p8.exports}var K7;function Qee(){if(K7)return So;K7=1;var e=Tg(),t=Xee();function n(l){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+l,w=1;w<arguments.length;w++)f+="&args[]="+encodeURIComponent(arguments[w]);return"Minified React error #"+l+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(l,f){o(l,f),o(l+"Capture",f)}function o(l,f){for(i[l]=f,l=0;l<f.length;l++)r.add(f[l])}var a=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[: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]*$/,h={},y={};function g(l){return c.call(y,l)?!0:c.call(h,l)?!1:d.test(l)?y[l]=!0:(h[l]=!0,!1)}function x(l,f,w,T){if(w!==null&&w.type===0)return!1;switch(typeof f){case"function":case"symbol":return!0;case"boolean":return T?!1:w!==null?!w.acceptsBooleans:(l=l.toLowerCase().slice(0,5),l!=="data-"&&l!=="aria-");default:return!1}}function _(l,f,w,T){if(f===null||typeof f>"u"||x(l,f,w,T))return!0;
vendor: 89,414 bytes, lines 62-69
62if(T)return!1;if(w!==null)switch(w.type){case 3:return!f;case 4:return f===!1;case 5:return isNaN(f);case 6:return isNaN(f)||1>f}return!1}function S(l,f,w,T,U,q,ae){this.acceptsBooleans=f===2||f===3||f===4,this.attributeName=T,this.attributeNamespace=U,this.mustUseProperty=w,this.propertyName=l,this.type=f,this.sanitizeURL=q,this.removeEmptyString=ae}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(l){I[l]=new S(l,0,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var f=l[0];I[f]=new S(f,1,!1,l[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){I[l]=new S(l,2,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){I[l]=new S(l,2,!1,l,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(l){I[l]=new S(l,3,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){I[l]=new S(l,3,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){I[l]=new S(l,4,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){I[l]=new S(l,6,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){I[l]=new S(l,5,!1,l.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function D(l){return l[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(l){var f=l.replace(L,D);I[f]=new S(f,1,!1,l,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(l){var f=l.replace(L,D);I[f]=new S(f,1,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var f=l.replace(L,D);I[f]=new S(f,1,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){I[l]=new S(l,1,!1,l.toLowerCase(),null,!1,!1)}),I.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){I[l]=new S(l,1,!1,l.toLowerCase(),null,!0,!0)});function F(l,f,w,T){var U=I.hasOwnProperty(f)?I[f]:null;(U!==null?U.type!==0:T||!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(_(f,w,U,T)&&(w=null),T||U===null?g(f)&&(w===null?l.removeAttribute(f):l.setAttribute(f,""+w)):U.mustUseProperty?l[U.propertyName]=w===null?U.type===3?!1:"":w:(f=U.attributeName,T=U.attributeNamespace,w===null?l.removeAttribute(f):(U=U.type,w=U===3||U===4&&w===!0?"":""+w,T?l.setAttributeNS(T,f,w):l.setAttribute(f,w))))}var $=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,z=Symbol.for("react.element"),V=Symbol.for("react.portal"),K=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),ne=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),P=Symbol.iterator;function B(l){return l===null||typeof l!="object"?null:(l=P&&l[P]||l["@@iterator"],typeof l=="function"?l:null)}var O=Object.assign,j;function v(l){if(j===void 0)try{throw Error()}catch(w){var f=w.stack.trim().match(/\n( *(at )?)/);j=f&&f[1]||""}return`
63`+j+l}var k=!1;function X(l,f){if(!l||k)return"";k=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(Le){var T=Le}Reflect.construct(l,[],f)}else{try{f.call()}catch(Le){T=Le}l.call(f.prototype)}else{try{throw Error()}catch(Le){T=Le}l()}}catch(Le){if(Le&&T&&typeof Le.stack=="string"){for(var U=Le.stack.split(`
64`),q=T.stack.split(`
65`),ae=U.length-1,he=q.length-1;1<=ae&&0<=he&&U[ae]!==q[he];)he--;for(;1<=ae&&0<=he;ae--,he--)if(U[ae]!==q[he]){if(ae!==1||he!==1)do if(ae--,he--,0>he||U[ae]!==q[he]){var ge=`
66`+U[ae].replace(" at new "," at ");return l.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",l.displayName)),ge}while(1<=ae&&0<=he);break}}}finally{k=!1,Error.prepareStackTrace=w}return(l=l?l.displayName||l.name:"")?v(l):""}function re(l){switch(l.tag){case 5:return v(l.type);case 16:return v("Lazy");case 13:return v("Suspense");case 19:return v("SuspenseList");case 0:case 2:case 15:return l=X(l.type,!1),l;case 11:return l=X(l.type.render,!1),l;case 1:return l=X(l.type,!0),l;default:return""}}function ue(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case K:return"Fragment";case V:return"Portal";case Q:return"Profiler";case te:return"StrictMode";case M:return"Suspense";case m:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case ne:return(l.displayName||"Context")+".Consumer";case ee:return(l._context.displayName||"Context")+".Provider";case J:var f=l.render;return l=l.displayName,l||(l=f.displayName||f.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case E:return f=l.displayName||null,f!==null?f:ue(l.type)||"Memo";case C:f=l._payload,l=l._init;try{return ue(l(f))}catch{}}return null}function pe(l){var f=l.type;switch(l.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=f.render,l=l.displayName||l.name||"",f.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ue(f);case 8:return f===te?"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 f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function we(l){switch(typeof l){case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function Ce(l){var f=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(f==="checkbox"||f==="radio")}function St(l){var f=Ce(l)?"checked":"value",w=Object.getOwnPropertyDescriptor(l.constructor.prototype,f),T=""+l[f];if(!l.hasOwnProperty(f)&&typeof w<"u"&&typeof w.get=="function"&&typeof w.set=="function"){var U=w.get,q=w.set;return Object.defineProperty(l,f,{configurable:!0,get:function(){return U.call(this)},set:function(ae){T=""+ae,q.call(this,ae)}}),Object.defineProperty(l,f,{enumerable:w.enumerable}),{getValue:function(){return T},setValue:function(ae){T=""+ae},stopTracking:function(){l._valueTracker=null,delete l[f]}}}}function Ve(l){l._valueTracker||(l._valueTracker=St(l))}function et(l){if(!l)return!1;var f=l._valueTracker;if(!f)return!0;var w=f.getValue(),T="";return l&&(T=Ce(l)?l.checked?"true":"false":l.value),l=T,l!==w?(f.setValue(l),!0):!1}function lt(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function tt(l,f){var w=f.checked;return O({},f,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:w??l._wrapperState.initialChecked})}function ut(l,f){var w=f.defaultValue==null?"":f.defaultValue,T=f.checked!=null?f.checked:f.defaultChecked;w=we(f.value!=null?f.value:w),l._wrapperState={initialChecked:T,initialValue:w,controlled:f.type==="checkbox"||f.type==="radio"?f.checked!=null:f.value!=null}}function nr(l,f){f=f.checked,f!=null&&F(l,"checked",f,!1)}function Rt(l,f){nr(l,f);var w=we(f.value),T=f.type;if(w!=null)T==="number"?(w===0&&l.value===""||l.value!=w)&&(l.value=""+w):l.value!==""+w&&(l.value=""+w);else if(T==="submit"||T==="reset"){l.removeAttribute("value");return}f.hasOwnProperty("value")?Ls(l,f.type,w):f.hasOwnProperty("defaultValue")&&Ls(l,f.type,we(f.defaultValue)),f.checked==null&&f.defaultChecked!=null&&(l.defaultChecked=!!f.defaultChecked)}function Qt(l,f,w){if(f.hasOwnProperty("value")||f.hasOwnProperty("defaultValue")){var T=f.type;if(!(T!=="submit"&&T!=="reset"||f.value!==void 0&&f.value!==null))return;f=""+l._wrapperState.initialValue,w||f===l.value||(l.value=f),l.defaultValue=f}w=l.name,w!==""&&(l.name=""),l.defaultChecked=!!l._wrapperState.initialChecked,w!==""&&(l.name=w)}function Ls(l,f,w){(f!=="number"||lt(l.ownerDocument)!==l)&&(w==null?l.defaultValue=""+l._wrapperState.initialValue:l.defaultValue!==""+w&&(l.defaultValue=""+w))}var Ft=Array.isArray;function Mt(l,f,w,T){if(l=l.options,f){f={};for(var U=0;U<w.length;U++)f["$"+w[U]]=!0;for(w=0;w<l.length;w++)U=f.hasOwnProperty("$"+l[w].value),l[w].selected!==U&&(l[w].selected=U),U&&T&&(l[w].defaultSelected=!0)}else{for(w=""+we(w),f=null,U=0;U<l.length;U++){if(l[U].value===w){l[U].selected=!0,T&&(l[U].defaultSelected=!0);return}f!==null||l[U].disabled||(f=l[U])}f!==null&&(f.selected=!0)}}function Dn(l,f){if(f.dangerouslySetInnerHTML!=null)throw Error(n(91));return O({},f,{value:void 0,defaultValue:void 0,children:""+l._wrapperState.initialValue})}function At(l,f){var w=f.value;if(w==null){if(w=f.children,f=f.defaultValue,w!=null){if(f!=null)throw Error(n(92));if(Ft(w)){if(1<w.length)throw Error(n(93));w=w[0]}f=w}f==null&&(f=""),w=f}l._wrapperState={initialValue:we(w)}}function Wt(l,f){var w=we(f.value),T=we(f.defaultValue);w!=null&&(w=""+w,w!==l.value&&(l.value=w),f.defaultValue==null&&l.defaultValue!==w&&(l.defaultValue=w)),T!=null&&(l.defaultValue=""+T)}function xr(l){var f=l.textContent;f===l._wrapperState.initialValue&&f!==""&&f!==null&&(l.value=f)}function Yt(l){switch(l){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ut(l,f){return l==null||l==="http://www.w3.org/1999/xhtml"?Yt(f):l==="http://www.w3.org/2000/svg"&&f==="foreignObject"?"http://www.w3.org/1999/xhtml":l}var pr,$t=(function(l){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(f,w,T,U){MSApp.execUnsafeLocalFunction(function(){return l(f,w,T,U)})}:l})(function(l,f){if(l.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in l)l.innerHTML=f;else{for(pr=pr||document.createElement("div"),pr.innerHTML="<svg>"+f.valueOf().toString()+"</svg>",f=pr.firstChild;l.firstChild;)l.removeChild(l.firstChild);for(;f.firstChild;)l.appendChild(f.firstChild)}});function se(l,f){if(f){var w=l.firstChild;if(w&&w===l.lastChild&&w.nodeType===3){w.nodeValue=f;return}}l.textContent=f}var H={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},Y=["Webkit","ms","Moz","O"];Object.keys(H).forEach(function(l){Y.forEach(function(f){f=f+l.charAt(0).toUpperCase()+l.substring(1),H[f]=H[l]})});function le(l,f,w){return f==null||typeof f=="boolean"||f===""?"":w||typeof f!="number"||f===0||H.hasOwnProperty(l)&&H[l]?(""+f).trim():f+"px"}function xe(l,f){l=l.style;for(var w in f)if(f.hasOwnProperty(w)){var T=w.indexOf("--")===0,U=le(w,f[w],T);w==="float"&&(w="cssFloat"),T?l.setProperty(w,U):l[w]=U}}var Se=O({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 Re(l,f){if(f){if(Se[l]&&(f.children!=null||f.dangerouslySetInnerHTML!=null))throw Error(n(137,l));if(f.dangerouslySetInnerHTML!=null){if(f.children!=null)throw Error(n(60));if(typeof f.dangerouslySetInnerHTML!="object"||!("__html"in f.dangerouslySetInnerHTML))throw Error(n(61))}if(f.style!=null&&typeof f.style!="object")throw Error(n(62))}}function Zt(l,f){if(l.indexOf("-")===-1)return typeof f.is=="string";switch(l){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 ht=null;function pt(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var $n=null,at=null,zt=null;function si(l){if(l=Fi(l)){if(typeof $n!="function")throw Error(n(280));var f=l.stateNode;f&&(f=K0(f),$n(l.stateNode,l.type,f))}}function tn(l){at?zt?zt.push(l):zt=[l]:at=l}function un(){if(at){var l=at,f=zt;if(zt=at=null,si(l),f)for(l=0;l<f.length;l++)si(f[l])}}function Mi(l,f){return l(f)}function an(){}var oe=!1;function G(l,f,w){if(oe)return l(f,w);oe=!0;try{return Mi(l,f,w)}finally{oe=!1,(at!==null||zt!==null)&&(an(),un())}}function Z(l,f){var w=l.stateNode;if(w===null)return null;var T=K0(w);if(T===null)return null;w=T[f];e:switch(f){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(T=!T.disabled)||(l=l.type,T=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!T;break e;default:l=!1}if(l)return null;if(w&&typeof w!="function")throw Error(n(231,f,typeof w));return w}var de=!1;if(a)try{var Ee={};Object.defineProperty(Ee,"passive",{get:function(){de=!0}}),window.addEventListener("test",Ee,Ee),window.removeEventListener("test",Ee,Ee)}catch{de=!1}function Te(l,f,w,T,U,q,ae,he,ge){var Le=Array.prototype.slice.call(arguments,3);try{f.apply(w,Le)}catch(Ge){this.onError(Ge)}}var Me=!1,nn=null,wt=!1,xt=null,rr={onError:function(l){Me=!0,nn=l}};function yt(l,f,w,T,U,q,ae,he,ge){Me=!1,nn=null,Te.apply(rr,arguments)}function bn(l,f,w,T,U,q,ae,he,ge){if(yt.apply(this,arguments),Me){if(Me){var Le=nn;Me=!1,nn=null}else throw Error(n(198));wt||(wt=!0,xt=Le)}}function Bs(l){var f=l,w=l;if(l.alternate)for(;f.return;)f=f.return;else{l=f;do f=l,(f.flags&4098)!==0&&(w=f.return),l=f.return;while(l)}return f.tag===3?w:null}function hn(l){if(l.tag===13){var f=l.memoizedState;if(f===null&&(l=l.alternate,l!==null&&(f=l.memoizedState)),f!==null)return f.dehydrated}return null}function mn(l){if(Bs(l)!==l)throw Error(n(188))}function lc(l){var f=l.alternate;if(!f){if(f=Bs(l),f===null)throw Error(n(188));return f!==l?null:l}for(var w=l,T=f;;){var U=w.return;if(U===null)break;var q=U.alternate;if(q===null){if(T=U.return,T!==null){w=T;continue}break}if(U.child===q.child){for(q=U.child;q;){if(q===w)return mn(U),l;if(q===T)return mn(U),f;q=q.sibling}throw Error(n(188))}if(w.return!==T.return)w=U,T=q;else{for(var ae=!1,he=U.child;he;){if(he===w){ae=!0,w=U,T=q;break}if(he===T){ae=!0,T=U,w=q;break}he=he.sibling}if(!ae){for(he=q.child;he;){if(he===w){ae=!0,w=q,T=U;break}if(he===T){ae=!0,T=q,w=U;break}he=he.sibling}if(!ae)throw Error(n(189))}}if(w.alternate!==T)throw Error(n(190))}if(w.tag!==3)throw Error(n(188));return w.stateNode.current===w?l:f}function Ta(l){return l=lc(l),l!==null?Aa(l):null}function Aa(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var f=Aa(l);if(f!==null)return f;l=l.sibling}return null}var ka=t.unstable_scheduleCallback,Ca=t.unstable_cancelCallback,uo=t.unstable_shouldYield,dc=t.unstable_requestPaint,Wn=t.unstable_now,fc=t.unstable_getCurrentPriorityLevel,$o=t.unstable_ImmediatePriority,Ia=t.unstable_UserBlockingPriority,Fs=t.unstable_NormalPriority,Ra=t.unstable_LowPriority,Uo=t.unstable_IdlePriority,lo=null,Ei=null;function hc(l){if(Ei&&typeof Ei.onCommitFiberRoot=="function")try{Ei.onCommitFiberRoot(lo,l,void 0,(l.current.flags&128)===128)}catch{}}var oi=Math.clz32?Math.clz32:gw,Ma=Math.log,yw=Math.LN2;function gw(l){return l>>>=0,l===0?32:31-(Ma(l)/yw|0)|0}var Ed=64,E0=4194304;function _d(l){switch(l&-l){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 l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function il(l,f){var w=l.pendingLanes;if(w===0)return 0;var T=0,U=l.suspendedLanes,q=l.pingedLanes,ae=w&268435455;if(ae!==0){var he=ae&~U;he!==0?T=_d(he):(q&=ae,q!==0&&(T=_d(q)))}else ae=w&~U,ae!==0?T=_d(ae):q!==0&&(T=_d(q));if(T===0)return 0;if(f!==0&&f!==T&&(f&U)===0&&(U=T&-T,q=f&-f,U>=q||U===16&&(q&4194240)!==0))return f;if((T&4)!==0&&(T|=w&16),f=l.entangledLanes,f!==0)for(l=l.entanglements,f&=T;0<f;)w=31-oi(f),U=1<<w,T|=l[w],f&=~U;return T}function bw(l,f){switch(l){case 1:case 2:case 4:return f+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function IE(l,f){for(var w=l.suspendedLanes,T=l.pingedLanes,U=l.expirationTimes,q=l.pendingLanes;0<q;){var ae=31-oi(q),he=1<<ae,ge=U[ae];ge===-1?((he&w)===0||(he&T)!==0)&&(U[ae]=bw(he,f)):ge<=f&&(l.expiredLanes|=he),q&=~he}}function _0(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function n1(){var l=Ed;return Ed<<=1,(Ed&4194240)===0&&(Ed=64),l}function bh(l){for(var f=[],w=0;31>w;w++)f.push(l);return f}function xh(l,f,w){l.pendingLanes|=f,f!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,f=31-oi(f),l[f]=w}function xw(l,f){var w=l.pendingLanes&~f;l.pendingLanes=f,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=f,l.mutableReadLanes&=f,l.entangledLanes&=f,f=l.entanglements;var T=l.eventTimes;for(l=l.expirationTimes;0<w;){var U=31-oi(w),q=1<<U;f[U]=0,T[U]=-1,l[U]=-1,w&=~q}}function vh(l,f){var w=l.entangledLanes|=f;for(l=l.entanglements;w;){var T=31-oi(w),U=1<<T;U&f|l[T]&f&&(l[T]|=f),w&=~U}}var Qn=0;function sl(l){return l&=-l,1<l?4<l?(l&268435455)!==0?16:536870912:4:1}var r1,S0,vw,i1,s1,T0=!1,wh=[],Gc=null,Kc=null,Yc=null,Sd=new Map,Eh=new Map,Zc=[],RE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ww(l,f){switch(l){case"focusin":case"focusout":Gc=null;break;case"dragenter":case"dragleave":Kc=null;break;case"mouseover":case"mouseout":Yc=null;break;case"pointerover":case"pointerout":Sd.delete(f.pointerId);break;case"gotpointercapture":case"lostpointercapture":Eh.delete(f.pointerId)}}function ol(l,f,w,T,U,q){return l===null||l.nativeEvent!==q?(l={blockedOn:f,domEventName:w,eventSystemFlags:T,nativeEvent:q,targetContainers:[U]},f!==null&&(f=Fi(f),f!==null&&S0(f)),l):(l.eventSystemFlags|=T,f=l.targetContainers,U!==null&&f.indexOf(U)===-1&&f.push(U),l)}function ME(l,f,w,T,U){switch(f){case"focusin":return Gc=ol(Gc,l,f,w,T,U),!0;case"dragenter":return Kc=ol(Kc,l,f,w,T,U),!0;case"mouseover":return Yc=ol(Yc,l,f,w,T,U),!0;case"pointerover":var q=U.pointerId;return Sd.set(q,ol(Sd.get(q)||null,l,f,w,T,U)),!0;case"gotpointercapture":return q=U.pointerId,Eh.set(q,ol(Eh.get(q)||null,l,f,w,T,U)),!0}return!1}function Ew(l){var f=Oa(l.target);if(f!==null){var w=Bs(f);if(w!==null){if(f=w.tag,f===13){if(f=hn(w),f!==null){l.blockedOn=f,s1(l.priority,function(){vw(w)});return}}else if(f===3&&w.stateNode.current.memoizedState.isDehydrated){l.blockedOn=w.tag===3?w.stateNode.containerInfo:null;return}}}l.blockedOn=null}function A0(l){if(l.blockedOn!==null)return!1;for(var f=l.targetContainers;0<f.length;){var w=I0(l.domEventName,l.eventSystemFlags,f[0],l.nativeEvent);if(w===null){w=l.nativeEvent;var T=new w.constructor(w.type,w);ht=T,w.target.dispatchEvent(T),ht=null}else return f=Fi(w),f!==null&&S0(f),l.blockedOn=w,!1;f.shift()}return!0}function _w(l,f,w){A0(l)&&w.delete(f)}function NE(){T0=!1,Gc!==null&&A0(Gc)&&(Gc=null),Kc!==null&&A0(Kc)&&(Kc=null),Yc!==null&&A0(Yc)&&(Yc=null),Sd.forEach(_w),Eh.forEach(_w)}function ar(l,f){l.blockedOn===f&&(l.blockedOn=null,T0||(T0=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,NE)))}function ir(l){function f(U){return ar(U,l)}if(0<wh.length){ar(wh[0],l);for(var w=1;w<wh.length;w++){var T=wh[w];T.blockedOn===l&&(T.blockedOn=null)}}for(Gc!==null&&ar(Gc,l),Kc!==null&&ar(Kc,l),Yc!==null&&ar(Yc,l),Sd.forEach(f),Eh.forEach(f),w=0;w<Zc.length;w++)T=Zc[w],T.blockedOn===l&&(T.blockedOn=null);for(;0<Zc.length&&(w=Zc[0],w.blockedOn===null);)Ew(w),w.blockedOn===null&&Zc.shift()}var Td=$.ReactCurrentBatchConfig,k0=!0;function jE(l,f,w,T){var U=Qn,q=Td.transition;Td.transition=null;try{Qn=1,o1(l,f,w,T)}finally{Qn=U,Td.transition=q}}function PE(l,f,w,T){var U=Qn,q=Td.transition;Td.transition=null;try{Qn=4,o1(l,f,w,T)}finally{Qn=U,Td.transition=q}}function o1(l,f,w,T){if(k0){var U=I0(l,f,w,T);if(U===null)_1(l,f,T,C0,w),ww(l,T);else if(ME(U,l,f,w,T))T.stopPropagation();else if(ww(l,T),f&4&&-1<RE.indexOf(l)){for(;U!==null;){var q=Fi(U);if(q!==null&&r1(q),q=I0(l,f,w,T),q===null&&_1(l,f,T,C0,w),q===U)break;U=q}U!==null&&T.stopPropagation()}else _1(l,f,T,null,w)}}var C0=null;function I0(l,f,w,T){if(C0=null,l=pt(T),l=Oa(l),l!==null)if(f=Bs(l),f===null)l=null;else if(w=f.tag,w===13){if(l=hn(f),l!==null)return l;l=null}else if(w===3){if(f.stateNode.current.memoizedState.isDehydrated)return f.tag===3?f.stateNode.containerInfo:null;l=null}else f!==l&&(l=null);return C0=l,null}function Sw(l){switch(l){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(fc()){case $o:return 1;case Ia:return 4;case Fs:case Ra:return 16;case Uo:return 536870912;default:return 16}default:return 16}}var Mr=null,_h=null,Na=null;function a1(){if(Na)return Na;var l,f=_h,w=f.length,T,U="value"in Mr?Mr.value:Mr.textContent,q=U.length;for(l=0;l<w&&f[l]===U[l];l++);var ae=w-l;for(T=1;T<=ae&&f[w-T]===U[q-T];T++);return Na=U.slice(l,1<T?1-T:void 0)}function Ad(l){var f=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&f===13&&(l=13)):l=f,l===10&&(l=13),32<=l||l===13?l:0}function es(){return!0}function c1(){return!1}function gs(l){function f(w,T,U,q,ae){this._reactName=w,this._targetInst=U,this.type=T,this.nativeEvent=q,this.target=ae,this.currentTarget=null;for(var he in l)l.hasOwnProperty(he)&&(w=l[he],this[he]=w?w(q):q[he]);return this.isDefaultPrevented=(q.defaultPrevented!=null?q.defaultPrevented:q.returnValue===!1)?es:c1,this.isPropagationStopped=c1,this}return O(f.prototype,{preventDefault:function(){this.defaultPrevented=!0;var w=this.nativeEvent;w&&(w.preventDefault?w.preventDefault():typeof w.returnValue!="unknown"&&(w.returnValue=!1),this.isDefaultPrevented=es)},stopPropagation:function(){var w=this.nativeEvent;w&&(w.stopPropagation?w.stopPropagation():typeof w.cancelBubble!="unknown"&&(w.cancelBubble=!0),this.isPropagationStopped=es)},persist:function(){},isPersistent:es}),f}var al={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},R0=gs(al),kd=O({},al,{view:0,detail:0}),Tw=gs(kd),ts,u1,Li,M0=O({},kd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:p1,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==Li&&(Li&&l.type==="mousemove"?(ts=l.screenX-Li.screenX,u1=l.screenY-Li.screenY):u1=ts=0,Li=l),ts)},movementY:function(l){return"movementY"in l?l.movementY:u1}}),l1=gs(M0),Xc=O({},M0,{dataTransfer:0}),N0=gs(Xc),d1=O({},kd,{relatedTarget:0}),vr=gs(d1),Qc=O({},al,{animationName:0,elapsedTime:0,pseudoElement:0}),f1=gs(Qc),OE=O({},al,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),h1=gs(OE),LE=O({},al,{data:0}),Aw=gs(LE),BE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kw={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},j0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cd(l){var f=this.nativeEvent;return f.getModifierState?f.getModifierState(l):(l=j0[l])?!!f[l]:!1}function p1(){return Cd}var Cw=O({},kd,{key:function(l){if(l.key){var f=BE[l.key]||l.key;if(f!=="Unidentified")return f}return l.type==="keypress"?(l=Ad(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?kw[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:p1,charCode:function(l){return l.type==="keypress"?Ad(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?Ad(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),Iw=gs(Cw),m1=O({},M0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),P0=gs(m1),Rw=O({},kd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:p1}),FE=gs(Rw),y1=O({},al,{propertyName:0,elapsedTime:0,pseudoElement:0}),g1=gs(y1),DE=O({},M0,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),Mw=gs(DE),Ds=[9,13,27,32],Sh=a&&"CompositionEvent"in window,pc=null;a&&"documentMode"in document&&(pc=document.documentMode);var Nw=a&&"TextEvent"in window&&!pc,b1=a&&(!Sh||pc&&8<pc&&11>=pc),jw=" ",Pw=!1;function Ow(l,f){switch(l){case"keyup":return Ds.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lw(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Id=!1;function Rd(l,f){switch(l){case"compositionend":return Lw(f);case"keypress":return f.which!==32?null:(Pw=!0,jw);case"textInput":return l=f.data,l===jw&&Pw?null:l;default:return null}}function $E(l,f){if(Id)return l==="compositionend"||!Sh&&Ow(l,f)?(l=a1(),Na=_h=Mr=null,Id=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(f.ctrlKey||f.altKey||f.metaKey)||f.ctrlKey&&f.altKey){if(f.char&&1<f.char.length)return f.char;if(f.which)return String.fromCharCode(f.which)}return null;case"compositionend":return b1&&f.locale!=="ko"?null:f.data;default:return null}}var UE={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function O0(l){var f=l&&l.nodeName&&l.nodeName.toLowerCase();return f==="input"?!!UE[l.type]:f==="textarea"}function x1(l,f,w,T){tn(T),f=q0(f,"onChange"),0<f.length&&(w=new R0("onChange","change",null,w,T),l.push({event:w,listeners:f}))}var fo=null,Jc=null;function zE(l){Vw(l,0)}function L0(l){var f=_n(l);if(et(f))return l}function VE(l,f){if(l==="change")return f}var cl=!1;if(a){var $s;if(a){var B0="oninput"in document;if(!B0){var Bw=document.createElement("div");Bw.setAttribute("oninput","return;"),B0=typeof Bw.oninput=="function"}$s=B0}else $s=!1;cl=$s&&(!document.documentMode||9<document.documentMode)}function Fw(){fo&&(fo.detachEvent("onpropertychange",Dw),Jc=fo=null)}function Dw(l){if(l.propertyName==="value"&&L0(Jc)){var f=[];x1(f,Jc,l,pt(l)),G(zE,f)}}function qE(l,f,w){l==="focusin"?(Fw(),fo=f,Jc=w,fo.attachEvent("onpropertychange",Dw)):l==="focusout"&&Fw()}function HE(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return L0(Jc)}function Md(l,f){if(l==="click")return L0(f)}function Ae(l,f){if(l==="input"||l==="change")return L0(f)}function De(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}var Pe=typeof Object.is=="function"?Object.is:De;function gt(l,f){if(Pe(l,f))return!0;if(typeof l!="object"||l===null||typeof f!="object"||f===null)return!1;var w=Object.keys(l),T=Object.keys(f);if(w.length!==T.length)return!1;for(T=0;T<w.length;T++){var U=w[T];if(!c.call(f,U)||!Pe(l[U],f[U]))return!1}return!0}function pn(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function Gn(l,f){var w=pn(l);l=0;for(var T;w;){if(w.nodeType===3){if(T=l+w.textContent.length,l<=f&&T>=f)return{node:w,offset:f-l};l=T}e:{for(;w;){if(w.nextSibling){w=w.nextSibling;break e}w=w.parentNode}w=void 0}w=pn(w)}}function Yr(l,f){return l&&f?l===f?!0:l&&l.nodeType===3?!1:f&&f.nodeType===3?Yr(l,f.parentNode):"contains"in l?l.contains(f):l.compareDocumentPosition?!!(l.compareDocumentPosition(f)&16):!1:!1}function ur(){for(var l=window,f=lt();f instanceof l.HTMLIFrameElement;){try{var w=typeof f.contentWindow.location.href=="string"}catch{w=!1}if(w)l=f.contentWindow;else break;f=lt(l.document)}return f}function Th(l){var f=l&&l.nodeName&&l.nodeName.toLowerCase();return f&&(f==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||f==="textarea"||l.contentEditable==="true")}function WE(l){var f=ur(),w=l.focusedElem,T=l.selectionRange;if(f!==w&&w&&w.ownerDocument&&Yr(w.ownerDocument.documentElement,w)){if(T!==null&&Th(w)){if(f=T.start,l=T.end,l===void 0&&(l=f),"selectionStart"in w)w.selectionStart=f,w.selectionEnd=Math.min(l,w.value.length);else if(l=(f=w.ownerDocument||document)&&f.defaultView||window,l.getSelection){l=l.getSelection();var U=w.textContent.length,q=Math.min(T.start,U);T=T.end===void 0?q:Math.min(T.end,U),!l.extend&&q>T&&(U=T,T=q,q=U),U=Gn(w,q);var ae=Gn(w,T);U&&ae&&(l.rangeCount!==1||l.anchorNode!==U.node||l.anchorOffset!==U.offset||l.focusNode!==ae.node||l.focusOffset!==ae.offset)&&(f=f.createRange(),f.setStart(U.node,U.offset),l.removeAllRanges(),q>T?(l.addRange(f),l.extend(ae.node,ae.offset)):(f.setEnd(ae.node,ae.offset),l.addRange(f)))}}for(f=[],l=w;l=l.parentNode;)l.nodeType===1&&f.push({element:l,left:l.scrollLeft,top:l.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<f.length;w++)l=f[w],l.element.scrollLeft=l.left,l.element.scrollTop=l.top}}var ho=a&&"documentMode"in document&&11>=document.documentMode,mc=null,v1=null,ja=null,Nd=!1;function Ah(l,f,w){var T=w.window===w?w.document:w.nodeType===9?w:w.ownerDocument;Nd||mc==null||mc!==lt(T)||(T=mc,"selectionStart"in T&&Th(T)?T={start:T.selectionStart,end:T.selectionEnd}:(T=(T.ownerDocument&&T.ownerDocument.defaultView||window).getSelection(),T={anchorNode:T.anchorNode,anchorOffset:T.anchorOffset,focusNode:T.focusNode,focusOffset:T.focusOffset}),ja&&gt(ja,T)||(ja=T,T=q0(v1,"onSelect"),0<T.length&&(f=new R0("onSelect","select",null,f,w),l.push({event:f,listeners:T}),f.target=mc)))}function Kn(l,f){var w={};return w[l.toLowerCase()]=f.toLowerCase(),w["Webkit"+l]="webkit"+f,w["Moz"+l]="moz"+f,w}var jd={animationend:Kn("Animation","AnimationEnd"),animationiteration:Kn("Animation","AnimationIteration"),animationstart:Kn("Animation","AnimationStart"),transitionend:Kn("Transition","TransitionEnd")},F0={},kh={};a&&(kh=document.createElement("div").style,"AnimationEvent"in window||(delete jd.animationend.animation,delete jd.animationiteration.animation,delete jd.animationstart.animation),"TransitionEvent"in window||delete jd.transitionend.transition);function D0(l){if(F0[l])return F0[l];if(!jd[l])return l;var f=jd[l],w;for(w in f)if(f.hasOwnProperty(w)&&w in kh)return F0[l]=f[w];return l}var $w=D0("animationend"),Uw=D0("animationiteration"),Ch=D0("animationstart"),yc=D0("transitionend"),Ih=new Map,w1="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function zo(l,f){Ih.set(l,f),s(f,[l])}for(var $0=0;$0<w1.length;$0++){var U0=w1[$0],z0=U0.toLowerCase(),zw=U0[0].toUpperCase()+U0.slice(1);zo(z0,"on"+zw)}zo($w,"onAnimationEnd"),zo(Uw,"onAnimationIteration"),zo(Ch,"onAnimationStart"),zo("dblclick","onDoubleClick"),zo("focusin","onFocus"),zo("focusout","onBlur"),zo(yc,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ul=new Set("cancel close invalid load scroll toggle".split(" ").concat(gc));function Rh(l,f,w){var T=l.type||"unknown-event";l.currentTarget=w,bn(T,f,void 0,l),l.currentTarget=null}function Vw(l,f){f=(f&4)!==0;for(var w=0;w<l.length;w++){var T=l[w],U=T.event;T=T.listeners;e:{var q=void 0;if(f)for(var ae=T.length-1;0<=ae;ae--){var he=T[ae],ge=he.instance,Le=he.currentTarget;if(he=he.listener,ge!==q&&U.isPropagationStopped())break e;Rh(U,he,Le),q=ge}else for(ae=0;ae<T.length;ae++){if(he=T[ae],ge=he.instance,Le=he.currentTarget,he=he.listener,ge!==q&&U.isPropagationStopped())break e;Rh(U,he,Le),q=ge}}}if(wt)throw l=xt,wt=!1,xt=null,l}function Ar(l,f){var w=f[G0];w===void 0&&(w=f[G0]=new Set);var T=l+"__bubble";w.has(T)||(V0(f,l,2,!1),w.add(T))}function E1(l,f,w){var T=0;f&&(T|=4),V0(w,l,T,f)}var ll="_reactListening"+Math.random().toString(36).slice(2);function eu(l){if(!l[ll]){l[ll]=!0,r.forEach(function(w){w!=="selectionchange"&&(ul.has(w)||E1(w,!1,l),E1(w,!0,l))});var f=l.nodeType===9?l:l.ownerDocument;f===null||f[ll]||(f[ll]=!0,E1("selectionchange",!1,f))}}function V0(l,f,w,T){switch(Sw(f)){case 1:var U=jE;break;case 4:U=PE;break;default:U=o1}w=U.bind(null,f,w,l),U=void 0,!de||f!=="touchstart"&&f!=="touchmove"&&f!=="wheel"||(U=!0),T?U!==void 0?l.addEventListener(f,w,{capture:!0,passive:U}):l.addEventListener(f,w,!0):U!==void 0?l.addEventListener(f,w,{passive:U}):l.addEventListener(f,w,!1)}function _1(l,f,w,T,U){var q=T;if((f&1)===0&&(f&2)===0&&T!==null)e:for(;;){if(T===null)return;var ae=T.tag;if(ae===3||ae===4){var he=T.stateNode.containerInfo;if(he===U||he.nodeType===8&&he.parentNode===U)break;if(ae===4)for(ae=T.return;ae!==null;){var ge=ae.tag;if((ge===3||ge===4)&&(ge=ae.stateNode.containerInfo,ge===U||ge.nodeType===8&&ge.parentNode===U))return;ae=ae.return}for(;he!==null;){if(ae=Oa(he),ae===null)return;if(ge=ae.tag,ge===5||ge===6){T=q=ae;continue e}he=he.parentNode}}T=T.return}G(function(){var Le=q,Ge=pt(w),Je=[];e:{var He=Ih.get(l);if(He!==void 0){var bt=R0,kt=l;switch(l){case"keypress":if(Ad(w)===0)break e;case"keydown":case"keyup":bt=Iw;break;case"focusin":kt="focus",bt=vr;break;case"focusout":kt="blur",bt=vr;break;case"beforeblur":case"afterblur":bt=vr;break;case"click":if(w.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":bt=l1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":bt=N0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":bt=FE;break;case $w:case Uw:case Ch:bt=f1;break;case yc:bt=g1;break;case"scroll":bt=Tw;break;case"wheel":bt=Mw;break;case"copy":case"cut":case"paste":bt=h1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":bt=P0}var Nt=(f&4)!==0,Vr=!Nt&&l==="scroll",Ie=Nt?He!==null?He+"Capture":null:He;Nt=[];for(var _e=Le,Ne;_e!==null;){Ne=_e;var nt=Ne.stateNode;if(Ne.tag===5&&nt!==null&&(Ne=nt,Ie!==null&&(nt=Z(_e,Ie),nt!=null&&Nt.push(Pd(_e,nt,Ne)))),Vr)break;_e=_e.return}0<Nt.length&&(He=new bt(He,kt,null,w,Ge),Je.push({event:He,listeners:Nt}))}}if((f&7)===0){e:{if(He=l==="mouseover"||l==="pointerover",bt=l==="mouseout"||l==="pointerout",He&&w!==ht&&(kt=w.relatedTarget||w.fromElement)&&(Oa(kt)||kt[Us]))break e;if((bt||He)&&(He=Ge.window===Ge?Ge:(He=Ge.ownerDocument)?He.defaultView||He.parentWindow:window,bt?(kt=w.relatedTarget||w.toElement,bt=Le,kt=kt?Oa(kt):null,kt!==null&&(Vr=Bs(kt),kt!==Vr||kt.tag!==5&&kt.tag!==6)&&(kt=null)):(bt=null,kt=Le),bt!==kt)){if(Nt=l1,nt="onMouseLeave",Ie="onMouseEnter",_e="mouse",(l==="pointerout"||l==="pointerover")&&(Nt=P0,nt="onPointerLeave",Ie="onPointerEnter",_e="pointer"),Vr=bt==null?He:_n(bt),Ne=kt==null?He:_n(kt),He=new Nt(nt,_e+"leave",bt,w,Ge),He.target=Vr,He.relatedTarget=Ne,nt=null,Oa(Ge)===Le&&(Nt=new Nt(Ie,_e+"enter",kt,w,Ge),Nt.target=Ne,Nt.relatedTarget=Vr,nt=Nt),Vr=nt,bt&&kt)t:{for(Nt=bt,Ie=kt,_e=0,Ne=Nt;Ne;Ne=Od(Ne))_e++;for(Ne=0,nt=Ie;nt;nt=Od(nt))Ne++;for(;0<_e-Ne;)Nt=Od(Nt),_e--;for(;0<Ne-_e;)Ie=Od(Ie),Ne--;for(;_e--;){if(Nt===Ie||Ie!==null&&Nt===Ie.alternate)break t;Nt=Od(Nt),Ie=Od(Ie)}Nt=null}else Nt=null;bt!==null&&Zr(Je,He,bt,Nt,!1),kt!==null&&Vr!==null&&Zr(Je,Vr,kt,Nt,!0)}}e:{if(He=Le?_n(Le):window,bt=He.nodeName&&He.nodeName.toLowerCase(),bt==="select"||bt==="input"&&He.type==="file")var Ot=VE;else if(O0(He))if(cl)Ot=Ae;else{Ot=HE;var qt=qE}else(bt=He.nodeName)&&bt.toLowerCase()==="input"&&(He.type==="checkbox"||He.type==="radio")&&(Ot=Md);if(Ot&&(Ot=Ot(l,Le))){x1(Je,Ot,w,Ge);break e}qt&&qt(l,He,Le),l==="focusout"&&(qt=He._wrapperState)&&qt.controlled&&He.type==="number"&&Ls(He,"number",He.value)}switch(qt=Le?_n(Le):window,l){case"focusin":(O0(qt)||qt.contentEditable==="true")&&(mc=qt,v1=Le,ja=null);break;case"focusout":ja=v1=mc=null;break;case"mousedown":Nd=!0;break;case"contextmenu":case"mouseup":case"dragend":Nd=!1,Ah(Je,w,Ge);break;case"selectionchange":if(ho)break;case"keydown":case"keyup":Ah(Je,w,Ge)}var Ht;if(Sh)e:{switch(l){case"compositionstart":var cn="onCompositionStart";break e;case"compositionend":cn="onCompositionEnd";break e;case"compositionupdate":cn="onCompositionUpdate";break e}cn=void 0}else Id?Ow(l,w)&&(cn="onCompositionEnd"):l==="keydown"&&w.keyCode===229&&(cn="onCompositionStart");cn&&(b1&&w.locale!=="ko"&&(Id||cn!=="onCompositionStart"?cn==="onCompositionEnd"&&Id&&(Ht=a1()):(Mr=Ge,_h="value"in Mr?Mr.value:Mr.textContent,Id=!0)),qt=q0(Le,cn),0<qt.length&&(cn=new Aw(cn,l,null,w,Ge),Je.push({event:cn,listeners:qt}),Ht?cn.data=Ht:(Ht=Lw(w),Ht!==null&&(cn.data=Ht)))),(Ht=Nw?Rd(l,w):$E(l,w))&&(Le=q0(Le,"onBeforeInput"),0<Le.length&&(Ge=new Aw("onBeforeInput","beforeinput",null,w,Ge),Je.push({event:Ge,listeners:Le}),Ge.data=Ht))}Vw(Je,f)})}function Pd(l,f,w){return{instance:l,listener:f,currentTarget:w}}function q0(l,f){for(var w=f+"Capture",T=[];l!==null;){var U=l,q=U.stateNode;U.tag===5&&q!==null&&(U=q,q=Z(l,w),q!=null&&T.unshift(Pd(l,q,U)),q=Z(l,f),q!=null&&T.push(Pd(l,q,U))),l=l.return}return T}function Od(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5);return l||null}function Zr(l,f,w,T,U){for(var q=f._reactName,ae=[];w!==null&&w!==T;){var he=w,ge=he.alternate,Le=he.stateNode;if(ge!==null&&ge===T)break;he.tag===5&&Le!==null&&(he=Le,U?(ge=Z(w,q),ge!=null&&ae.unshift(Pd(w,ge,he))):U||(ge=Z(w,q),ge!=null&&ae.push(Pd(w,ge,he)))),w=w.return}ae.length!==0&&l.push({event:f,listeners:ae})}var Bi=/\r\n?/g,GE=/\u0000|\uFFFD/g;function qw(l){return(typeof l=="string"?l:""+l).replace(Bi,`
67`).replace(GE,"")}function Mh(l,f,w){if(f=qw(f),qw(l)!==f&&w)throw Error(n(425))}function H0(){}var Nh=null,dl=null;function jh(l,f){return l==="textarea"||l==="noscript"||typeof f.children=="string"||typeof f.children=="number"||typeof f.dangerouslySetInnerHTML=="object"&&f.dangerouslySetInnerHTML!==null&&f.dangerouslySetInnerHTML.__html!=null}var tu=typeof setTimeout=="function"?setTimeout:void 0,Ph=typeof clearTimeout=="function"?clearTimeout:void 0,Ld=typeof Promise=="function"?Promise:void 0,W0=typeof queueMicrotask=="function"?queueMicrotask:typeof Ld<"u"?function(l){return Ld.resolve(null).then(l).catch(Bd)}:tu;function Bd(l){setTimeout(function(){throw l})}function S1(l,f){var w=f,T=0;do{var U=w.nextSibling;if(l.removeChild(w),U&&U.nodeType===8)if(w=U.data,w==="/$"){if(T===0){l.removeChild(U),ir(f);return}T--}else w!=="$"&&w!=="$?"&&w!=="$!"||T++;w=U}while(w);ir(f)}function nu(l){for(;l!=null;l=l.nextSibling){var f=l.nodeType;if(f===1||f===3)break;if(f===8){if(f=l.data,f==="$"||f==="$!"||f==="$?")break;if(f==="/$")return null}}return l}function Hw(l){l=l.previousSibling;for(var f=0;l;){if(l.nodeType===8){var w=l.data;if(w==="$"||w==="$!"||w==="$?"){if(f===0)return l;f--}else w==="/$"&&f++}l=l.previousSibling}return null}var Fd=Math.random().toString(36).slice(2),Pa="__reactFiber$"+Fd,ru="__reactProps$"+Fd,Us="__reactContainer$"+Fd,G0="__reactEvents$"+Fd,ce="__reactListeners$"+Fd,Dd="__reactHandles$"+Fd;function Oa(l){var f=l[Pa];if(f)return f;for(var w=l.parentNode;w;){if(f=w[Us]||w[Pa]){if(w=f.alternate,f.child!==null||w!==null&&w.child!==null)for(l=Hw(l);l!==null;){if(w=l[Pa])return w;l=Hw(l)}return f}l=w,w=l.parentNode}return null}function Fi(l){return l=l[Pa]||l[Us],!l||l.tag!==5&&l.tag!==6&&l.tag!==13&&l.tag!==3?null:l}function _n(l){if(l.tag===5||l.tag===6)return l.stateNode;throw Error(n(33))}function K0(l){return l[ru]||null}var T1=[],$d=-1;function bs(l){return{current:l}}function kr(l){0>$d||(l.current=T1[$d],T1[$d]=null,$d--)}function wr(l,f){$d++,T1[$d]=l.current,l.current=f}var iu={},Di=bs(iu),xs=bs(!1),ns=iu;function Ud(l,f){var w=l.type.contextTypes;if(!w)return iu;var T=l.stateNode;if(T&&T.__reactInternalMemoizedUnmaskedChildContext===f)return T.__reactInternalMemoizedMaskedChildContext;var U={},q;for(q in w)U[q]=f[q];return T&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=f,l.__reactInternalMemoizedMaskedChildContext=U),U}function vs(l){return l=l.childContextTypes,l!=null}function Y0(){kr(xs),kr(Di)}function Ww(l,f,w){if(Di.current!==iu)throw Error(n(168));wr(Di,f),wr(xs,w)}function Gw(l,f,w){var T=l.stateNode;if(f=f.childContextTypes,typeof T.getChildContext!="function")return w;T=T.getChildContext();for(var U in T)if(!(U in f))throw Error(n(108,pe(l)||"Unknown",U));return O({},w,T)}function po(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||iu,ns=Di.current,wr(Di,l),wr(xs,xs.current),!0}function Kw(l,f,w){var T=l.stateNode;if(!T)throw Error(n(169));w?(l=Gw(l,f,ns),T.__reactInternalMemoizedMergedChildContext=l,kr(xs),kr(Di),wr(Di,l)):kr(xs),wr(xs,w)}var bc=null,Z0=!1,A1=!1;function Yw(l){bc===null?bc=[l]:bc.push(l)}function fl(l){Z0=!0,Yw(l)}function su(){if(!A1&&bc!==null){A1=!0;var l=0,f=Qn;try{var w=bc;for(Qn=1;l<w.length;l++){var T=w[l];do T=T(!0);while(T!==null)}bc=null,Z0=!1}catch(U){throw bc!==null&&(bc=bc.slice(l+1)),ka($o,su),U}finally{Qn=f,A1=!1}}return null}var zd=[],$i=0,X0=null,Q0=0,mo=[],yo=0,hl=null,La=1,Ba="";function pl(l,f){zd[$i++]=Q0,zd[$i++]=X0,X0=l,Q0=f}function Zw(l,f,w){mo[yo++]=La,mo[yo++]=Ba,mo[yo++]=hl,hl=l;var T=La;l=Ba;var U=32-oi(T)-1;T&=~(1<<U),w+=1;var q=32-oi(f)+U;if(30<q){var ae=U-U%5;q=(T&(1<<ae)-1).toString(32),T>>=ae,U-=ae,La=1<<32-oi(f)+U|w<<U|T,Ba=q+l}else La=1<<q|w<<U|T,Ba=l}function Oh(l){l.return!==null&&(pl(l,1),Zw(l,1,0))}function ml(l){for(;l===X0;)X0=zd[--$i],zd[$i]=null,Q0=zd[--$i],zd[$i]=null;for(;l===hl;)hl=mo[--yo],mo[yo]=null,Ba=mo[--yo],mo[yo]=null,La=mo[--yo],mo[yo]=null}var Ui=null,zs=null,Cr=!1,Vo=null;function Fa(l,f){var w=Gs(5,null,null,0);w.elementType="DELETED",w.stateNode=f,w.return=l,f=l.deletions,f===null?(l.deletions=[w],l.flags|=16):f.push(w)}function J0(l,f){switch(l.tag){case 5:var w=l.type;return f=f.nodeType!==1||w.toLowerCase()!==f.nodeName.toLowerCase()?null:f,f!==null?(l.stateNode=f,Ui=l,zs=nu(f.firstChild),!0):!1;case 6:return f=l.pendingProps===""||f.nodeType!==3?null:f,f!==null?(l.stateNode=f,Ui=l,zs=null,!0):!1;case 13:return f=f.nodeType!==8?null:f,f!==null?(w=hl!==null?{id:La,overflow:Ba}:null,l.memoizedState={dehydrated:f,treeContext:w,retryLane:1073741824},w=Gs(18,null,null,0),w.stateNode=f,w.return=l,l.child=w,Ui=l,zs=null,!0):!1;default:return!1}}function xc(l){return(l.mode&1)!==0&&(l.flags&128)===0}function ws(l){if(Cr){var f=zs;if(f){var w=f;if(!J0(l,f)){if(xc(l))throw Error(n(418));f=nu(w.nextSibling);var T=Ui;f&&J0(l,f)?Fa(T,w):(l.flags=l.flags&-4097|2,Cr=!1,Ui=l)}}else{if(xc(l))throw Error(n(418));l.flags=l.flags&-4097|2,Cr=!1,Ui=l}}}function Xw(l){for(l=l.return;l!==null&&l.tag!==5&&l.tag!==3&&l.tag!==13;)l=l.return;Ui=l}function Lh(l){if(l!==Ui)return!1;if(!Cr)return Xw(l),Cr=!0,!1;var f;if((f=l.tag!==3)&&!(f=l.tag!==5)&&(f=l.type,f=f!=="head"&&f!=="body"&&!jh(l.type,l.memoizedProps)),f&&(f=zs)){if(xc(l))throw k1(),Error(n(418));for(;f;)Fa(l,f),f=nu(f.nextSibling)}if(Xw(l),l.tag===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(n(317));e:{for(l=l.nextSibling,f=0;l;){if(l.nodeType===8){var w=l.data;if(w==="/$"){if(f===0){zs=nu(l.nextSibling);break e}f--}else w!=="$"&&w!=="$!"&&w!=="$?"||f++}l=l.nextSibling}zs=null}}else zs=Ui?nu(l.stateNode.nextSibling):null;return!0}function k1(){for(var l=zs;l;)l=nu(l.nextSibling)}function Da(){zs=Ui=null,Cr=!1}function $a(l){Vo===null?Vo=[l]:Vo.push(l)}var Qw=$.ReactCurrentBatchConfig;function qo(l,f){if(l&&l.defaultProps){f=O({},f),l=l.defaultProps;for(var w in l)f[w]===void 0&&(f[w]=l[w]);return f}return f}var yl=bs(null),em=null,gl=null,ai=null;function Bh(){ai=gl=em=null}function tm(l){var f=yl.current;kr(yl),l._currentValue=f}function go(l,f,w){for(;l!==null;){var T=l.alternate;if((l.childLanes&f)!==f?(l.childLanes|=f,T!==null&&(T.childLanes|=f)):T!==null&&(T.childLanes&f)!==f&&(T.childLanes|=f),l===w)break;l=l.return}}function ou(l,f){em=l,ai=gl=null,l=l.dependencies,l!==null&&l.firstContext!==null&&((l.lanes&f)!==0&&(qi=!0),l.firstContext=null)}function rs(l){var f=l._currentValue;if(ai!==l)if(l={context:l,memoizedValue:f,next:null},gl===null){if(em===null)throw Error(n(308));gl=l,em.dependencies={lanes:0,firstContext:l}}else gl=gl.next=l;return f}var Vs=null;function nm(l){Vs===null?Vs=[l]:Vs.push(l)}function zi(l,f,w,T){var U=f.interleaved;return U===null?(w.next=w,nm(f)):(w.next=U.next,U.next=w),f.interleaved=w,Ho(l,T)}function Ho(l,f){l.lanes|=f;var w=l.alternate;for(w!==null&&(w.lanes|=f),w=l,l=l.return;l!==null;)l.childLanes|=f,w=l.alternate,w!==null&&(w.childLanes|=f),w=l,l=l.return;return w.tag===3?w.stateNode:null}var au=!1;function C1(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jw(l,f){l=l.updateQueue,f.updateQueue===l&&(f.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function Wo(l,f){return{eventTime:l,lane:f,tag:0,payload:null,callback:null,next:null}}function cu(l,f,w){var T=l.updateQueue;if(T===null)return null;if(T=T.shared,(Un&2)!==0){var U=T.pending;return U===null?f.next=f:(f.next=U.next,U.next=f),T.pending=f,Ho(l,w)}return U=T.interleaved,U===null?(f.next=f,nm(T)):(f.next=U.next,U.next=f),T.interleaved=f,Ho(l,w)}function uu(l,f,w){if(f=f.updateQueue,f!==null&&(f=f.shared,(w&4194240)!==0)){var T=f.lanes;T&=l.pendingLanes,w|=T,f.lanes=w,vh(l,w)}}function I1(l,f){var w=l.updateQueue,T=l.alternate;if(T!==null&&(T=T.updateQueue,w===T)){var U=null,q=null;if(w=w.firstBaseUpdate,w!==null){do{var ae={eventTime:w.eventTime,lane:w.lane,tag:w.tag,payload:w.payload,callback:w.callback,next:null};q===null?U=q=ae:q=q.next=ae,w=w.next}while(w!==null);q===null?U=q=f:q=q.next=f}else U=q=f;w={baseState:T.baseState,firstBaseUpdate:U,lastBaseUpdate:q,shared:T.shared,effects:T.effects},l.updateQueue=w;return}l=w.lastBaseUpdate,l===null?w.firstBaseUpdate=f:l.next=f,w.lastBaseUpdate=f}function rm(l,f,w,T){var U=l.updateQueue;au=!1;var q=U.firstBaseUpdate,ae=U.lastBaseUpdate,he=U.shared.pending;if(he!==null){U.shared.pending=null;var ge=he,Le=ge.next;ge.next=null,ae===null?q=Le:ae.next=Le,ae=ge;var Ge=l.alternate;Ge!==null&&(Ge=Ge.updateQueue,he=Ge.lastBaseUpdate,he!==ae&&(he===null?Ge.firstBaseUpdate=Le:he.next=Le,Ge.lastBaseUpdate=ge))}if(q!==null){var Je=U.baseState;ae=0,Ge=Le=ge=null,he=q;do{var He=he.lane,bt=he.eventTime;if((T&He)===He){Ge!==null&&(Ge=Ge.next={eventTime:bt,lane:0,tag:he.tag,payload:he.payload,callback:he.callback,next:null});e:{var kt=l,Nt=he;switch(He=f,bt=w,Nt.tag){case 1:if(kt=Nt.payload,typeof kt=="function"){Je=kt.call(bt,Je,He);break e}Je=kt;break e;case 3:kt.flags=kt.flags&-65537|128;case 0:if(kt=Nt.payload,He=typeof kt=="function"?kt.call(bt,Je,He):kt,He==null)break e;Je=O({},Je,He);break e;case 2:au=!0}}he.callback!==null&&he.lane!==0&&(l.flags|=64,He=U.effects,He===null?U.effects=[he]:He.push(he))}else bt={eventTime:bt,lane:He,tag:he.tag,payload:he.payload,callback:he.callback,next:null},Ge===null?(Le=Ge=bt,ge=Je):Ge=Ge.next=bt,ae|=He;if(he=he.next,he===null){if(he=U.shared.pending,he===null)break;He=he,he=He.next,He.next=null,U.lastBaseUpdate=He,U.shared.pending=null}}while(!0);if(Ge===null&&(ge=Je),U.baseState=ge,U.firstBaseUpdate=Le,U.lastBaseUpdate=Ge,f=U.shared.interleaved,f!==null){U=f;do ae|=U.lane,U=U.next;while(U!==f)}else q===null&&(U.shared.lanes=0);yu|=ae,l.lanes=ae,l.memoizedState=Je}}function e2(l,f,w){if(l=f.effects,f.effects=null,l!==null)for(f=0;f<l.length;f++){var T=l[f],U=T.callback;if(U!==null){if(T.callback=null,T=w,typeof U!="function")throw Error(n(191,U));U.call(T)}}}var Vd=new e.Component().refs;function R1(l,f,w,T){f=l.memoizedState,w=w(T,f),w=w==null?f:O({},f,w),l.memoizedState=w,l.lanes===0&&(l.updateQueue.baseState=w)}var im={isMounted:function(l){return(l=l._reactInternals)?Bs(l)===l:!1},enqueueSetState:function(l,f,w){l=l._reactInternals;var T=os(),U=bu(l),q=Wo(T,U);q.payload=f,w!=null&&(q.callback=w),f=cu(l,q,U),f!==null&&(Zo(f,l,U,T),uu(f,l,U))},enqueueReplaceState:function(l,f,w){l=l._reactInternals;var T=os(),U=bu(l),q=Wo(T,U);q.tag=1,q.payload=f,w!=null&&(q.callback=w),f=cu(l,q,U),f!==null&&(Zo(f,l,U,T),uu(f,l,U))},enqueueForceUpdate:function(l,f){l=l._reactInternals;var w=os(),T=bu(l),U=Wo(w,T);U.tag=2,f!=null&&(U.callback=f),f=cu(l,U,T),f!==null&&(Zo(f,l,T,w),uu(f,l,T))}};function sm(l,f,w,T,U,q,ae){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(T,q,ae):f.prototype&&f.prototype.isPureReactComponent?!gt(w,T)||!gt(U,q):!0}function M1(l,f,w){var T=!1,U=iu,q=f.contextType;return typeof q=="object"&&q!==null?q=rs(q):(U=vs(f)?ns:Di.current,T=f.contextTypes,q=(T=T!=null)?Ud(l,U):iu),f=new f(w,q),l.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=im,l.stateNode=f,f._reactInternals=l,T&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=U,l.__reactInternalMemoizedMaskedChildContext=q),f}function t2(l,f,w,T){l=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(w,T),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(w,T),f.state!==l&&im.enqueueReplaceState(f,f.state,null)}function N1(l,f,w,T){var U=l.stateNode;U.props=w,U.state=l.memoizedState,U.refs=Vd,C1(l);var q=f.contextType;typeof q=="object"&&q!==null?U.context=rs(q):(q=vs(f)?ns:Di.current,U.context=Ud(l,q)),U.state=l.memoizedState,q=f.getDerivedStateFromProps,typeof q=="function"&&(R1(l,f,q,w),U.state=l.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof U.getSnapshotBeforeUpdate=="function"||typeof U.UNSAFE_componentWillMount!="function"&&typeof U.componentWillMount!="function"||(f=U.state,typeof U.componentWillMount=="function"&&U.componentWillMount(),typeof U.UNSAFE_componentWillMount=="function"&&U.UNSAFE_componentWillMount(),f!==U.state&&im.enqueueReplaceState(U,U.state,null),rm(l,w,U,T),U.state=l.memoizedState),typeof U.componentDidMount=="function"&&(l.flags|=4194308)}function Fh(l,f,w){if(l=w.ref,l!==null&&typeof l!="function"&&typeof l!="object"){if(w._owner){if(w=w._owner,w){if(w.tag!==1)throw Error(n(309));var T=w.stateNode}if(!T)throw Error(n(147,l));var U=T,q=""+l;return f!==null&&f.ref!==null&&typeof f.ref=="function"&&f.ref._stringRef===q?f.ref:(f=function(ae){var he=U.refs;he===Vd&&(he=U.refs={}),ae===null?delete he[q]:he[q]=ae},f._stringRef=q,f)}if(typeof l!="string")throw Error(n(284));if(!w._owner)throw Error(n(290,l))}return l}function Dh(l,f){throw l=Object.prototype.toString.call(f),Error(n(31,l==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":l))}function om(l){var f=l._init;return f(l._payload)}function n2(l){function f(Ie,_e){if(l){var Ne=Ie.deletions;Ne===null?(Ie.deletions=[_e],Ie.flags|=16):Ne.push(_e)}}function w(Ie,_e){if(!l)return null;for(;_e!==null;)f(Ie,_e),_e=_e.sibling;return null}function T(Ie,_e){for(Ie=new Map;_e!==null;)_e.key!==null?Ie.set(_e.key,_e):Ie.set(_e.index,_e),_e=_e.sibling;return Ie}function U(Ie,_e){return Ie=wu(Ie,_e),Ie.index=0,Ie.sibling=null,Ie}function q(Ie,_e,Ne){return Ie.index=Ne,l?(Ne=Ie.alternate,Ne!==null?(Ne=Ne.index,Ne<_e?(Ie.flags|=2,_e):Ne):(Ie.flags|=2,_e)):(Ie.flags|=1048576,_e)}function ae(Ie){return l&&Ie.alternate===null&&(Ie.flags|=2),Ie}function he(Ie,_e,Ne,nt){return _e===null||_e.tag!==6?(_e=mb(Ne,Ie.mode,nt),_e.return=Ie,_e):(_e=U(_e,Ne),_e.return=Ie,_e)}function ge(Ie,_e,Ne,nt){var Ot=Ne.type;return Ot===K?Ge(Ie,_e,Ne.props.children,nt,Ne.key):_e!==null&&(_e.elementType===Ot||typeof Ot=="object"&&Ot!==null&&Ot.$$typeof===C&&om(Ot)===_e.type)?(nt=U(_e,Ne.props),nt.ref=Fh(Ie,_e,Ne),nt.return=Ie,nt):(nt=Om(Ne.type,Ne.key,Ne.props,null,Ie.mode,nt),nt.ref=Fh(Ie,_e,Ne),nt.return=Ie,nt)}function Le(Ie,_e,Ne,nt){return _e===null||_e.tag!==4||_e.stateNode.containerInfo!==Ne.containerInfo||_e.stateNode.implementation!==Ne.implementation?(_e=yb(Ne,Ie.mode,nt),_e.return=Ie,_e):(_e=U(_e,Ne.children||[]),_e.return=Ie,_e)}function Ge(Ie,_e,Ne,nt,Ot){return _e===null||_e.tag!==7?(_e=Sl(Ne,Ie.mode,nt,Ot),_e.return=Ie,_e):(_e=U(_e,Ne),_e.return=Ie,_e)}function Je(Ie,_e,Ne){if(typeof _e=="string"&&_e!==""||typeof _e=="number")return _e=mb(""+_e,Ie.mode,Ne),_e.return=Ie,_e;if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case z:return Ne=Om(_e.type,_e.key,_e.props,null,Ie.mode,Ne),Ne.ref=Fh(Ie,null,_e),Ne.return=Ie,Ne;case V:return _e=yb(_e,Ie.mode,Ne),_e.return=Ie,_e;case C:var nt=_e._init;return Je(Ie,nt(_e._payload),Ne)}if(Ft(_e)||B(_e))return _e=Sl(_e,Ie.mode,Ne,null),_e.return=Ie,_e;Dh(Ie,_e)}return null}function He(Ie,_e,Ne,nt){var Ot=_e!==null?_e.key:null;if(typeof Ne=="string"&&Ne!==""||typeof Ne=="number")return Ot!==null?null:he(Ie,_e,""+Ne,nt);if(typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case z:return Ne.key===Ot?ge(Ie,_e,Ne,nt):null;case V:return Ne.key===Ot?Le(Ie,_e,Ne,nt):null;case C:return Ot=Ne._init,He(Ie,_e,Ot(Ne._payload),nt)}if(Ft(Ne)||B(Ne))return Ot!==null?null:Ge(Ie,_e,Ne,nt,null);Dh(Ie,Ne)}return null}function bt(Ie,_e,Ne,nt,Ot){if(typeof nt=="string"&&nt!==""||typeof nt=="number")return Ie=Ie.get(Ne)||null,he(_e,Ie,""+nt,Ot);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case z:return Ie=Ie.get(nt.key===null?Ne:nt.key)||null,ge(_e,Ie,nt,Ot);case V:return Ie=Ie.get(nt.key===null?Ne:nt.key)||null,Le(_e,Ie,nt,Ot);case C:var qt=nt._init;return bt(Ie,_e,Ne,qt(nt._payload),Ot)}if(Ft(nt)||B(nt))return Ie=Ie.get(Ne)||null,Ge(_e,Ie,nt,Ot,null);Dh(_e,nt)}return null}function kt(Ie,_e,Ne,nt){for(var Ot=null,qt=null,Ht=_e,cn=_e=0,Si=null;Ht!==null&&cn<Ne.length;cn++){Ht.index>cn?(Si=Ht,Ht=null):Si=Ht.sibling;var Yn=He(Ie,Ht,Ne[cn],nt);if(Yn===null){Ht===null&&(Ht=Si);break}l&&Ht&&Yn.alternate===null&&f(Ie,Ht),_e=q(Yn,_e,cn),qt===null?Ot=Yn:qt.sibling=Yn,qt=Yn,Ht=Si}if(cn===Ne.length)return w(Ie,Ht),Cr&&pl(Ie,cn),Ot;if(Ht===null){for(;cn<Ne.length;cn++)Ht=Je(Ie,Ne[cn],nt),Ht!==null&&(_e=q(Ht,_e,cn),qt===null?Ot=Ht:qt.sibling=Ht,qt=Ht);return Cr&&pl(Ie,cn),Ot}for(Ht=T(Ie,Ht);cn<Ne.length;cn++)Si=bt(Ht,Ie,cn,Ne[cn],nt),Si!==null&&(l&&Si.alternate!==null&&Ht.delete(Si.key===null?cn:Si.key),_e=q(Si,_e,cn),qt===null?Ot=Si:qt.sibling=Si,qt=Si);return l&&Ht.forEach(function(Eu){return f(Ie,Eu)}),Cr&&pl(Ie,cn),Ot}function Nt(Ie,_e,Ne,nt){var Ot=B(Ne);if(typeof Ot!="function")throw Error(n(150));if(Ne=Ot.call(Ne),Ne==null)throw Error(n(151));for(var qt=Ot=null,Ht=_e,cn=_e=0,Si=null,Yn=Ne.next();Ht!==null&&!Yn.done;cn++,Yn=Ne.next()){Ht.index>cn?(Si=Ht,Ht=null):Si=Ht.sibling;var Eu=He(Ie,Ht,Yn.value,nt);if(Eu===null){Ht===null&&(Ht=Si);break}l&&Ht&&Eu.alternate===null&&f(Ie,Ht),_e=q(Eu,_e,cn),qt===null?Ot=Eu:qt.sibling=Eu,qt=Eu,Ht=Si}if(Yn.done)return w(Ie,Ht),Cr&&pl(Ie,cn),Ot;if(Ht===null){for(;!Yn.done;cn++,Yn=Ne.next())Yn=Je(Ie,Yn.value,nt),Yn!==null&&(_e=q(Yn,_e,cn),qt===null?Ot=Yn:qt.sibling=Yn,qt=Yn);return Cr&&pl(Ie,cn),Ot}for(Ht=T(Ie,Ht);!Yn.done;cn++,Yn=Ne.next())Yn=bt(Ht,Ie,cn,Yn.value,nt),Yn!==null&&(l&&Yn.alternate!==null&&Ht.delete(Yn.key===null?cn:Yn.key),_e=q(Yn,_e,cn),qt===null?Ot=Yn:qt.sibling=Yn,qt=Yn);return l&&Ht.forEach(function(h4){return f(Ie,h4)}),Cr&&pl(Ie,cn),Ot}function Vr(Ie,_e,Ne,nt){if(typeof Ne=="object"&&Ne!==null&&Ne.type===K&&Ne.key===null&&(Ne=Ne.props.children),typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case z:e:{for(var Ot=Ne.key,qt=_e;qt!==null;){if(qt.key===Ot){if(Ot=Ne.type,Ot===K){if(qt.tag===7){w(Ie,qt.sibling),_e=U(qt,Ne.props.children),_e.return=Ie,Ie=_e;break e}}else if(qt.elementType===Ot||typeof Ot=="object"&&Ot!==null&&Ot.$$typeof===C&&om(Ot)===qt.type){w(Ie,qt.sibling),_e=U(qt,Ne.props),_e.ref=Fh(Ie,qt,Ne),_e.return=Ie,Ie=_e;break e}w(Ie,qt);break}else f(Ie,qt);qt=qt.sibling}Ne.type===K?(_e=Sl(Ne.props.children,Ie.mode,nt,Ne.key),_e.return=Ie,Ie=_e):(nt=Om(Ne.type,Ne.key,Ne.props,null,Ie.mode,nt),nt.ref=Fh(Ie,_e,Ne),nt.return=Ie,Ie=nt)}return ae(Ie);case V:e:{for(qt=Ne.key;_e!==null;){if(_e.key===qt)if(_e.tag===4&&_e.stateNode.containerInfo===Ne.containerInfo&&_e.stateNode.implementation===Ne.implementation){w(Ie,_e.sibling),_e=U(_e,Ne.children||[]),_e.return=Ie,Ie=_e;break e}else{w(Ie,_e);break}else f(Ie,_e);_e=_e.sibling}_e=yb(Ne,Ie.mode,nt),_e.return=Ie,Ie=_e}return ae(Ie);case C:return qt=Ne._init,Vr(Ie,_e,qt(Ne._payload),nt)}if(Ft(Ne))return kt(Ie,_e,Ne,nt);if(B(Ne))return Nt(Ie,_e,Ne,nt);Dh(Ie,Ne)}return typeof Ne=="string"&&Ne!==""||typeof Ne=="number"?(Ne=""+Ne,_e!==null&&_e.tag===6?(w(Ie,_e.sibling),_e=U(_e,Ne),_e.return=Ie,Ie=_e):(w(Ie,_e),_e=mb(Ne,Ie.mode,nt),_e.return=Ie,Ie=_e),ae(Ie)):w(Ie,_e)}return Vr}var lu=n2(!0),j1=n2(!1),qd={},Go=bs(qd),du=bs(qd),$h=bs(qd);function fu(l){if(l===qd)throw Error(n(174));return l}function am(l,f){switch(wr($h,f),wr(du,l),wr(Go,qd),l=f.nodeType,l){case 9:case 11:f=(f=f.documentElement)?f.namespaceURI:Ut(null,"");break;default:l=l===8?f.parentNode:f,f=l.namespaceURI||null,l=l.tagName,f=Ut(f,l)}kr(Go),wr(Go,f)}function Hd(){kr(Go),kr(du),kr($h)}function P1(l){fu($h.current);var f=fu(Go.current),w=Ut(f,l.type);f!==w&&(wr(du,l),wr(Go,w))}function O1(l){du.current===l&&(kr(Go),kr(du))}var Ir=bs(0);function Uh(l){for(var f=l;f!==null;){if(f.tag===13){var w=f.memoizedState;if(w!==null&&(w=w.dehydrated,w===null||w.data==="$?"||w.data==="$!"))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var zh=[];function L1(){for(var l=0;l<zh.length;l++)zh[l]._workInProgressVersionPrimary=null;zh.length=0}var Wd=$.ReactCurrentDispatcher,Sn=$.ReactCurrentBatchConfig,bl=0,Pr=null,Or=null,ci=null,cm=!1,Vh=!1,Vi=0,KE=0;function ui(){throw Error(n(321))}function qh(l,f){if(f===null)return!1;for(var w=0;w<f.length&&w<l.length;w++)if(!Pe(l[w],f[w]))return!1;return!0}function um(l,f,w,T,U,q){if(bl=q,Pr=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,Wd.current=l===null||l.memoizedState===null?Wh:ZE,l=w(T,U),Vh){q=0;do{if(Vh=!1,Vi=0,25<=q)throw Error(n(301));q+=1,ci=Or=null,f.updateQueue=null,Wd.current=u2,l=w(T,U)}while(Vh)}if(Wd.current=Ec,f=Or!==null&&Or.next!==null,bl=0,ci=Or=Pr=null,cm=!1,f)throw Error(n(300));return l}function lm(){var l=Vi!==0;return Vi=0,l}function Dr(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ci===null?Pr.memoizedState=ci=l:ci=ci.next=l,ci}function li(){if(Or===null){var l=Pr.alternate;l=l!==null?l.memoizedState:null}else l=Or.next;var f=ci===null?Pr.memoizedState:ci.next;if(f!==null)ci=f,Or=l;else{if(l===null)throw Error(n(310));Or=l,l={memoizedState:Or.memoizedState,baseState:Or.baseState,baseQueue:Or.baseQueue,queue:Or.queue,next:null},ci===null?Pr.memoizedState=ci=l:ci=ci.next=l}return ci}function xl(l,f){return typeof f=="function"?f(l):f}function dm(l){var f=li(),w=f.queue;if(w===null)throw Error(n(311));w.lastRenderedReducer=l;var T=Or,U=T.baseQueue,q=w.pending;if(q!==null){if(U!==null){var ae=U.next;U.next=q.next,q.next=ae}T.baseQueue=U=q,w.pending=null}if(U!==null){q=U.next,T=T.baseState;var he=ae=null,ge=null,Le=q;do{var Ge=Le.lane;if((bl&Ge)===Ge)ge!==null&&(ge=ge.next={lane:0,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null}),T=Le.hasEagerState?Le.eagerState:l(T,Le.action);else{var Je={lane:Ge,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null};ge===null?(he=ge=Je,ae=T):ge=ge.next=Je,Pr.lanes|=Ge,yu|=Ge}Le=Le.next}while(Le!==null&&Le!==q);ge===null?ae=T:ge.next=he,Pe(T,f.memoizedState)||(qi=!0),f.memoizedState=T,f.baseState=ae,f.baseQueue=ge,w.lastRenderedState=T}if(l=w.interleaved,l!==null){U=l;do q=U.lane,Pr.lanes|=q,yu|=q,U=U.next;while(U!==l)}else U===null&&(w.lanes=0);return[f.memoizedState,w.dispatch]}function Gd(l){var f=li(),w=f.queue;if(w===null)throw Error(n(311));w.lastRenderedReducer=l;var T=w.dispatch,U=w.pending,q=f.memoizedState;if(U!==null){w.pending=null;var ae=U=U.next;do q=l(q,ae.action),ae=ae.next;while(ae!==U);Pe(q,f.memoizedState)||(qi=!0),f.memoizedState=q,f.baseQueue===null&&(f.baseState=q),w.lastRenderedState=q}return[q,T]}function B1(){}function fm(l,f){var w=Pr,T=li(),U=f(),q=!Pe(T.memoizedState,U);if(q&&(T.memoizedState=U,qi=!0),T=T.queue,$1(pm.bind(null,w,T,l),[l]),T.getSnapshot!==f||q||ci!==null&&ci.memoizedState.tag&1){if(w.flags|=2048,Kd(9,hm.bind(null,w,T,U,f),void 0,null),_i===null)throw Error(n(349));(bl&30)!==0||F1(w,f,U)}return U}function F1(l,f,w){l.flags|=16384,l={getSnapshot:f,value:w},f=Pr.updateQueue,f===null?(f={lastEffect:null,stores:null},Pr.updateQueue=f,f.stores=[l]):(w=f.stores,w===null?f.stores=[l]:w.push(l))}function hm(l,f,w,T){f.value=w,f.getSnapshot=T,vc(f)&&r2(l)}function pm(l,f,w){return w(function(){vc(f)&&r2(l)})}function vc(l){var f=l.getSnapshot;l=l.value;try{var w=f();return!Pe(l,w)}catch{return!0}}function r2(l){var f=Ho(l,1);f!==null&&Zo(f,l,1,-1)}function wc(l){var f=Dr();return typeof l=="function"&&(l=l()),f.memoizedState=f.baseState=l,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xl,lastRenderedState:l},f.queue=l,l=l.dispatch=a2.bind(null,Pr,l),[f.memoizedState,l]}function Kd(l,f,w,T){return l={tag:l,create:f,destroy:w,deps:T,next:null},f=Pr.updateQueue,f===null?(f={lastEffect:null,stores:null},Pr.updateQueue=f,f.lastEffect=l.next=l):(w=f.lastEffect,w===null?f.lastEffect=l.next=l:(T=w.next,w.next=l,l.next=T,f.lastEffect=l)),l}function D1(){return li().memoizedState}function Yd(l,f,w,T){var U=Dr();Pr.flags|=l,U.memoizedState=Kd(1|f,w,void 0,T===void 0?null:T)}function mm(l,f,w,T){var U=li();T=T===void 0?null:T;var q=void 0;if(Or!==null){var ae=Or.memoizedState;if(q=ae.destroy,T!==null&&qh(T,ae.deps)){U.memoizedState=Kd(f,w,q,T);return}}Pr.flags|=l,U.memoizedState=Kd(1|f,w,q,T)}function i2(l,f){return Yd(8390656,8,l,f)}function $1(l,f){return mm(2048,8,l,f)}function U1(l,f){return mm(4,2,l,f)}function z1(l,f){return mm(4,4,l,f)}function s2(l,f){if(typeof f=="function")return l=l(),f(l),function(){f(null)};if(f!=null)return l=l(),f.current=l,function(){f.current=null}}function V1(l,f,w){return w=w!=null?w.concat([l]):null,mm(4,4,s2.bind(null,f,l),w)}function ym(){}function is(l,f){var w=li();f=f===void 0?null:f;var T=w.memoizedState;return T!==null&&f!==null&&qh(f,T[1])?T[0]:(w.memoizedState=[l,f],l)}function Ko(l,f){var w=li();f=f===void 0?null:f;var T=w.memoizedState;return T!==null&&f!==null&&qh(f,T[1])?T[0]:(l=l(),w.memoizedState=[l,f],l)}function o2(l,f,w){return(bl&21)===0?(l.baseState&&(l.baseState=!1,qi=!0),l.memoizedState=w):(Pe(w,f)||(w=n1(),Pr.lanes|=w,yu|=w,l.baseState=!0),f)}function YE(l,f){var w=Qn;Qn=w!==0&&4>w?w:4,l(!0);var T=Sn.transition;Sn.transition={};try{l(!1),f()}finally{Qn=w,Sn.transition=T}}function Hh(){return li().memoizedState}function Zd(l,f,w){var T=bu(l);if(w={lane:T,action:w,hasEagerState:!1,eagerState:null,next:null},q1(l))c2(f,w);else if(w=zi(l,f,w,T),w!==null){var U=os();Zo(w,l,T,U),H1(w,f,T)}}function a2(l,f,w){var T=bu(l),U={lane:T,action:w,hasEagerState:!1,eagerState:null,next:null};if(q1(l))c2(f,U);else{var q=l.alternate;if(l.lanes===0&&(q===null||q.lanes===0)&&(q=f.lastRenderedReducer,q!==null))try{var ae=f.lastRenderedState,he=q(ae,w);if(U.hasEagerState=!0,U.eagerState=he,Pe(he,ae)){var ge=f.interleaved;ge===null?(U.next=U,nm(f)):(U.next=ge.next,ge.next=U),f.interleaved=U;return}}catch{}finally{}w=zi(l,f,U,T),w!==null&&(U=os(),Zo(w,l,T,U),H1(w,f,T))}}function q1(l){var f=l.alternate;return l===Pr||f!==null&&f===Pr}function c2(l,f){Vh=cm=!0;var w=l.pending;w===null?f.next=f:(f.next=w.next,w.next=f),l.pending=f}function H1(l,f,w){if((w&4194240)!==0){var T=f.lanes;T&=l.pendingLanes,w|=T,f.lanes=w,vh(l,w)}}var Ec={readContext:rs,useCallback:ui,useContext:ui,useEffect:ui,useImperativeHandle:ui,useInsertionEffect:ui,useLayoutEffect:ui,useMemo:ui,useReducer:ui,useRef:ui,useState:ui,useDebugValue:ui,useDeferredValue:ui,useTransition:ui,useMutableSource:ui,useSyncExternalStore:ui,useId:ui,unstable_isNewReconciler:!1},Wh={readContext:rs,useCallback:function(l,f){return Dr().memoizedState=[l,f===void 0?null:f],l},useContext:rs,useEffect:i2,useImperativeHandle:function(l,f,w){return w=w!=null?w.concat([l]):null,Yd(4194308,4,s2.bind(null,f,l),w)},useLayoutEffect:function(l,f){return Yd(4194308,4,l,f)},useInsertionEffect:function(l,f){return Yd(4,2,l,f)},useMemo:function(l,f){var w=Dr();return f=f===void 0?null:f,l=l(),w.memoizedState=[l,f],l},useReducer:function(l,f,w){var T=Dr();return f=w!==void 0?w(f):f,T.memoizedState=T.baseState=f,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:f},T.queue=l,l=l.dispatch=Zd.bind(null,Pr,l),[T.memoizedState,l]},useRef:function(l){var f=Dr();return l={current:l},f.memoizedState=l},useState:wc,useDebugValue:ym,useDeferredValue:function(l){return Dr().memoizedState=l},useTransition:function(){var l=wc(!1),f=l[0];return l=YE.bind(null,l[1]),Dr().memoizedState=l,[f,l]},useMutableSource:function(){},useSyncExternalStore:function(l,f,w){var T=Pr,U=Dr();if(Cr){if(w===void 0)throw Error(n(407));w=w()}else{if(w=f(),_i===null)throw Error(n(349));(bl&30)!==0||F1(T,f,w)}U.memoizedState=w;var q={value:w,getSnapshot:f};return U.queue=q,i2(pm.bind(null,T,q,l),[l]),T.flags|=2048,Kd(9,hm.bind(null,T,q,w,f),void 0,null),w},useId:function(){var l=Dr(),f=_i.identifierPrefix;if(Cr){var w=Ba,T=La;w=(T&~(1<<32-oi(T)-1)).toString(32)+w,f=":"+f+"R"+w,w=Vi++,0<w&&(f+="H"+w.toString(32)),f+=":"}else w=KE++,f=":"+f+"r"+w.toString(32)+":";return l.memoizedState=f},unstable_isNewReconciler:!1},ZE={readContext:rs,useCallback:is,useContext:rs,useEffect:$1,useImperativeHandle:V1,useInsertionEffect:U1,useLayoutEffect:z1,useMemo:Ko,useReducer:dm,useRef:D1,useState:function(){return dm(xl)},useDebugValue:ym,useDeferredValue:function(l){var f=li();return o2(f,Or.memoizedState,l)},useTransition:function(){var l=dm(xl)[0],f=li().memoizedState;return[l,f]},useMutableSource:B1,useSyncExternalStore:fm,useId:Hh,unstable_isNewReconciler:!1},u2={readContext:rs,useCallback:is,useContext:rs,useEffect:$1,useImperativeHandle:V1,useInsertionEffect:U1,useLayoutEffect:z1,useMemo:Ko,useReducer:Gd,useRef:D1,useState:function(){return Gd(xl)},useDebugValue:ym,useDeferredValue:function(l){var f=li();return Or===null?f.memoizedState=l:o2(f,Or.memoizedState,l)},useTransition:function(){var l=Gd(xl)[0],f=li().memoizedState;return[l,f]},useMutableSource:B1,useSyncExternalStore:fm,useId:Hh,unstable_isNewReconciler:!1};function vl(l,f){try{var w="",T=f;do w+=re(T),T=T.return;while(T);var U=w}catch(q){U=`
68Error generating stack: `+q.message+`
69`+q.stack}return{value:l,source:f,stack:U,digest:null}}function Xd(l,f,w){return{value:l,source:null,stack:w??null,digest:f??null}}function gm(l,f){try{console.error(f.value)}catch(w){setTimeout(function(){throw w})}}var bm=typeof WeakMap=="function"?WeakMap:Map;function xm(l,f,w){w=Wo(-1,w),w.tag=3,w.payload={element:null};var T=f.value;return w.callback=function(){Im||(Im=!0,ob=T),gm(l,f)},w}function Gh(l,f,w){w=Wo(-1,w),w.tag=3;var T=l.type.getDerivedStateFromError;if(typeof T=="function"){var U=f.value;w.payload=function(){return T(U)},w.callback=function(){gm(l,f)}}var q=l.stateNode;return q!==null&&typeof q.componentDidCatch=="function"&&(w.callback=function(){gm(l,f),typeof T!="function"&&(gu===null?gu=new Set([this]):gu.add(this));var ae=f.stack;this.componentDidCatch(f.value,{componentStack:ae!==null?ae:""})}),w}function l2(l,f,w){var T=l.pingCache;if(T===null){T=l.pingCache=new bm;var U=new Set;T.set(f,U)}else U=T.get(f),U===void 0&&(U=new Set,T.set(f,U));U.has(w)||(U.add(w),l=i4.bind(null,l,f,w),f.then(l,l))}function W1(l){do{var f;if((f=l.tag===13)&&(f=l.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return l;l=l.return}while(l!==null);return null}function Kh(l,f,w,T,U){return(l.mode&1)===0?(l===f?l.flags|=65536:(l.flags|=128,w.flags|=131072,w.flags&=-52805,w.tag===1&&(w.alternate===null?w.tag=17:(f=Wo(-1,1),f.tag=2,cu(w,f,1))),w.lanes|=1),l):(l.flags|=65536,l.lanes=U,l)}var d2=$.ReactCurrentOwner,qi=!1;function ss(l,f,w,T){f.child=l===null?j1(f,null,w,T):lu(f,l.child,w,T)}function G1(l,f,w,T,U){w=w.render;var q=f.ref;return ou(f,U),T=um(l,f,w,T,q,U),w=lm(),l!==null&&!qi?(f.updateQueue=l.updateQueue,f.flags&=-2053,l.lanes&=~U,Va(l,f,U)):(Cr&&w&&Oh(f),f.flags|=1,ss(l,f,T,U),f.child)}function Ua(l,f,w,T,U){if(l===null){var q=w.type;return typeof q=="function"&&!pb(q)&&q.defaultProps===void 0&&w.compare===null&&w.defaultProps===void 0?(f.tag=15,f.type=q,K1(l,f,q,T,U)):(l=Om(w.type,null,T,f,f.mode,U),l.ref=f.ref,l.return=f,f.child=l)}if(q=l.child,(l.lanes&U)===0){var ae=q.memoizedProps;if(w=w.compare,w=w!==null?w:gt,w(ae,T)&&l.ref===f.ref)return Va(l,f,U)}return f.flags|=1,l=wu(q,T),l.ref=f.ref,l.return=f,f.child=l}function K1(l,f,w,T,U){if(l!==null){var q=l.memoizedProps;if(gt(q,T)&&l.ref===f.ref)if(qi=!1,f.pendingProps=T=q,(l.lanes&U)!==0)(l.flags&131072)!==0&&(qi=!0);else return f.lanes=l.lanes,Va(l,f,U)}return vm(l,f,w,T,U)}function Y1(l,f,w){var T=f.pendingProps,U=T.children,q=l!==null?l.memoizedState:null;if(T.mode==="hidden")if((f.mode&1)===0)f.memoizedState={baseLanes:0,cachePool:null,transitions:null},wr(nf,Ws),Ws|=w;else{if((w&1073741824)===0)return l=q!==null?q.baseLanes|w:w,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:l,cachePool:null,transitions:null},f.updateQueue=null,wr(nf,Ws),Ws|=l,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},T=q!==null?q.baseLanes:w,wr(nf,Ws),Ws|=T}else q!==null?(T=q.baseLanes|w,f.memoizedState=null):T=w,wr(nf,Ws),Ws|=T;return ss(l,f,U,w),f.child}function f2(l,f){var w=f.ref;(l===null&&w!==null||l!==null&&l.ref!==w)&&(f.flags|=512,f.flags|=2097152)}function vm(l,f,w,T,U){var q=vs(w)?ns:Di.current;return q=Ud(f,q),ou(f,U),w=um(l,f,w,T,q,U),T=lm(),l!==null&&!qi?(f.updateQueue=l.updateQueue,f.flags&=-2053,l.lanes&=~U,Va(l,f,U)):(Cr&&T&&Oh(f),f.flags|=1,ss(l,f,w,U),f.child)}function h2(l,f,w,T,U){if(vs(w)){var q=!0;po(f)}else q=!1;if(ou(f,U),f.stateNode===null)Qd(l,f),M1(f,w,T),N1(f,w,T,U),T=!0;else if(l===null){var ae=f.stateNode,he=f.memoizedProps;ae.props=he;var ge=ae.context,Le=w.contextType;typeof Le=="object"&&Le!==null?Le=rs(Le):(Le=vs(w)?ns:Di.current,Le=Ud(f,Le));var Ge=w.getDerivedStateFromProps,Je=typeof Ge=="function"||typeof ae.getSnapshotBeforeUpdate=="function";Je||typeof ae.UNSAFE_componentWillReceiveProps!="function"&&typeof ae.componentWillReceiveProps!="function"||(he!==T||ge!==Le)&&t2(f,ae,T,Le),au=!1;var He=f.memoizedState;ae.state=He,rm(f,T,ae,U),ge=f.memoizedState,he!==T||He!==ge||xs.current||au?(typeof Ge=="function"&&(R1(f,w,Ge,T),ge=f.memoizedState),(he=au||sm(f,w,he,T,He,ge,Le))?(Je||typeof ae.UNSAFE_componentWillMount!="function"&&typeof ae.componentWillMount!="function"||(typeof ae.componentWillMount=="function"&&ae.componentWillMount(),typeof ae.UNSAFE_componentWillMount=="function"&&ae.UNSAFE_componentWillMount()),typeof ae.componentDidMount=="function"&&(f.flags|=4194308)):(typeof ae.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=T,f.memoizedState=ge),ae.props=T,ae.state=ge,ae.context=Le,T=he):(typeof ae.componentDidMount=="function"&&(f.flags|=4194308),T=!1)}else{ae=f.stateNode,Jw(l,f),he=f.memoizedProps,Le=f.type===f.elementType?he:qo(f.type,he),ae.props=Le,Je=f.pendingProps,He=ae.context,ge=w.contextType,typeof ge=="object"&&ge!==null?ge=rs(ge):(ge=vs(w)?ns:Di.current,ge=Ud(f,ge));var bt=w.getDerivedStateFromProps;(Ge=typeof bt=="function"||typeof ae.getSnapshotBeforeUpdate=="function")||typeof ae.UNSAFE_componentWillReceiveProps!="function"&&typeof ae.componentWillReceiveProps!="function"||(he!==Je||He!==ge)&&t2(f,ae,T,ge),au=!1,He=f.memoizedState,ae.state=He,rm(f,T,ae,U);var kt=f.memoizedState;he!==Je||He!==kt||xs.current||au?(typeof bt=="function"&&(R1(f,w,bt,T),kt=f.memoizedState),(Le=au||sm(f,w,Le,T,He,kt,ge)||!1)?(Ge||typeof ae.UNSAFE_componentWillUpdate!="function"&&typeof ae.componentWillUpdate!="function"||(typeof ae.componentWillUpdate=="function"&&ae.componentWillUpdate(T,kt,ge),typeof ae.UNSAFE_componentWillUpdate=="function"&&ae.UNSAFE_componentWillUpdate(T,kt,ge)),typeof ae.componentDidUpdate=="function"&&(f.flags|=4),typeof ae.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof ae.componentDidUpdate!="function"||he===l.memoizedProps&&He===l.memoizedState||(f.flags|=4),typeof ae.getSnapshotBeforeUpdate!="function"||he===l.memoizedProps&&He===l.memoizedState||(f.flags|=1024),f.memoizedProps=T,f.memoizedState=kt),ae.props=T,ae.state=kt,ae.context=ge,T=Le):(typeof ae.componentDidUpdate!="function"||he===l.memoizedProps&&He===l.memoizedState||(f.flags|=4),typeof ae.getSnapshotBeforeUpdate!="function"||he===l.memoizedProps&&He===l.memoizedState||(f.flags|=1024),T=!1)}return Z1(l,f,w,T,q,U)}function Z1(l,f,w,T,U,q){f2(l,f);var ae=(f.flags&128)!==0;if(!T&&!ae)return U&&Kw(f,w,!1),Va(l,f,q);T=f.stateNode,d2.current=f;var he=ae&&typeof w.getDerivedStateFromError!="function"?null:T.render();return f.flags|=1,l!==null&&ae?(f.child=lu(f,l.child,null,q),f.child=lu(f,null,he,q)):ss(l,f,he,q),f.memoizedState=T.state,U&&Kw(f,w,!0),f.child}function za(l){var f=l.stateNode;f.pendingContext?Ww(l,f.pendingContext,f.pendingContext!==f.context):f.context&&Ww(l,f.context,!1),am(l,f.containerInfo)}function wm(l,f,w,T,U){return Da(),$a(U),f.flags|=256,ss(l,f,w,T),f.child}var Yh={dehydrated:null,treeContext:null,retryLane:0};function Zh(l){return{baseLanes:l,cachePool:null,transitions:null}}function Xh(l,f,w){var T=f.pendingProps,U=Ir.current,q=!1,ae=(f.flags&128)!==0,he;if((he=ae)||(he=l!==null&&l.memoizedState===null?!1:(U&2)!==0),he?(q=!0,f.flags&=-129):(l===null||l.memoizedState!==null)&&(U|=1),wr(Ir,U&1),l===null)return ws(f),l=f.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?((f.mode&1)===0?f.lanes=1:l.data==="$!"?f.lanes=8:f.lanes=1073741824,null):(ae=T.children,l=T.fallback,q?(T=f.mode,q=f.child,ae={mode:"hidden",children:ae},(T&1)===0&&q!==null?(q.childLanes=0,q.pendingProps=ae):q=Lm(ae,T,0,null),l=Sl(l,T,w,null),q.return=f,l.return=f,q.sibling=l,f.child=q,f.child.memoizedState=Zh(w),f.memoizedState=Yh,l):hu(f,ae));if(U=l.memoizedState,U!==null&&(he=U.dehydrated,he!==null))return Em(l,f,ae,T,he,U,w);if(q){q=T.fallback,ae=f.mode,U=l.child,he=U.sibling;var ge={mode:"hidden",children:T.children};return(ae&1)===0&&f.child!==U?(T=f.child,T.childLanes=0,T.pendingProps=ge,f.deletions=null):(T=wu(U,ge),T.subtreeFlags=U.subtreeFlags&14680064),he!==null?q=wu(he,q):(q=Sl(q,ae,w,null),q.flags|=2),q.return=f,T.return=f,T.sibling=q,f.child=T,T=q,q=f.child,ae=l.child.memoizedState,ae=ae===null?Zh(w):{baseLanes:ae.baseLanes|w,cachePool:null,transitions:ae.transitions},q.memoizedState=ae,q.childLanes=l.childLanes&~w,f.memoizedState=Yh,T}return q=l.child,l=q.sibling,T=wu(q,{mode:"visible",children:T.children}),(f.mode&1)===0&&(T.lanes=w),T.return=f,T.sibling=null,l!==null&&(w=f.deletions,w===null?(f.deletions=[l],f.flags|=16):w.push(l)),f.child=T,f.memoizedState=null,T}function hu(l,f){return f=Lm({mode:"visible",children:f},l.mode,0,null),f.return=l,l.child=f}function Vt(l,f,w,T){return T!==null&&$a(T),lu(f,l.child,null,w),l=hu(f,f.pendingProps.children),l.flags|=2,f.memoizedState=null,l}function Em(l,f,w,T,U,q,ae){if(w)return f.flags&256?(f.flags&=-257,T=Xd(Error(n(422))),Vt(l,f,ae,T)):f.memoizedState!==null?(f.child=l.child,f.flags|=128,null):(q=T.fallback,U=f.mode,T=Lm({mode:"visible",children:T.children},U,0,null),q=Sl(q,U,ae,null),q.flags|=2,T.return=f,q.return=f,T.sibling=q,f.child=T,(f.mode&1)!==0&&lu(f,l.child,null,ae),f.child.memoizedState=Zh(ae),f.memoizedState=Yh,q);if((f.mode&1)===0)return Vt(l,f,ae,null);if(U.data==="$!"){if(T=U.nextSibling&&U.nextSibling.dataset,T)var he=T.dgst;return T=he,q=Error(n(419)),T=Xd(q,T,void 0),Vt(l,f,ae,T)}if(he=(ae&l.childLanes)!==0,qi||he){if(T=_i,T!==null){switch(ae&-ae){case 4:U=2;break;case 16:U=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:U=32;break;case 536870912:U=268435456;break;default:U=0}U=(U&(T.suspendedLanes|ae))!==0?0:U,U!==0&&U!==q.retryLane&&(q.retryLane=U,Ho(l,U),Zo(T,l,U,-1))}return fb(),T=Xd(Error(n(421))),Vt(l,f,ae,T)}return U.data==="$?"?(f.flags|=128,f.child=l.child,f=s4.bind(null,l),U._reactRetry=f,null):(l=q.treeContext,zs=nu(U.nextSibling),Ui=f,Cr=!0,Vo=null,l!==null&&(mo[yo++]=La,mo[yo++]=Ba,mo[yo++]=hl,La=l.id,Ba=l.overflow,hl=f),f=hu(f,T.children),f.flags|=4096,f)}function _m(l,f,w){l.lanes|=f;var T=l.alternate;T!==null&&(T.lanes|=f),go(l.return,f,w)}function _c(l,f,w,T,U){var q=l.memoizedState;q===null?l.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:T,tail:w,tailMode:U}:(q.isBackwards=f,q.rendering=null,q.renderingStartTime=0,q.last=T,q.tail=w,q.tailMode=U)}function p2(l,f,w){var T=f.pendingProps,U=T.revealOrder,q=T.tail;if(ss(l,f,T.children,w),T=Ir.current,(T&2)!==0)T=T&1|2,f.flags|=128;else{if(l!==null&&(l.flags&128)!==0)e:for(l=f.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&_m(l,w,f);else if(l.tag===19)_m(l,w,f);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===f)break e;for(;l.sibling===null;){if(l.return===null||l.return===f)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}T&=1}if(wr(Ir,T),(f.mode&1)===0)f.memoizedState=null;else switch(U){case"forwards":for(w=f.child,U=null;w!==null;)l=w.alternate,l!==null&&Uh(l)===null&&(U=w),w=w.sibling;w=U,w===null?(U=f.child,f.child=null):(U=w.sibling,w.sibling=null),_c(f,!1,U,w,q);break;case"backwards":for(w=null,U=f.child,f.child=null;U!==null;){if(l=U.alternate,l!==null&&Uh(l)===null){f.child=U;break}l=U.sibling,U.sibling=w,w=U,U=l}_c(f,!0,w,null,q);break;case"together":_c(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function Qd(l,f){(f.mode&1)===0&&l!==null&&(l.alternate=null,f.alternate=null,f.flags|=2)}function Va(l,f,w){if(l!==null&&(f.dependencies=l.dependencies),yu|=f.lanes,(w&f.childLanes)===0)return null;if(l!==null&&f.child!==l.child)throw Error(n(153));if(f.child!==null){for(l=f.child,w=wu(l,l.pendingProps),f.child=w,w.return=f;l.sibling!==null;)l=l.sibling,w=w.sibling=wu(l,l.pendingProps),w.return=f;w.sibling=null}return f.child}function Hi(l,f,w){switch(f.tag){case 3:za(f),Da();break;case 5:P1(f);break;case 1:vs(f.type)&&po(f);break;case 4:am(f,f.stateNode.containerInfo);break;case 10:var T=f.type._context,U=f.memoizedProps.value;wr(yl,T._currentValue),T._currentValue=U;break;case 13:if(T=f.memoizedState,T!==null)return T.dehydrated!==null?(wr(Ir,Ir.current&1),f.flags|=128,null):(w&f.child.childLanes)!==0?Xh(l,f,w):(wr(Ir,Ir.current&1),l=Va(l,f,w),l!==null?l.sibling:null);wr(Ir,Ir.current&1);break;case 19:if(T=(w&f.childLanes)!==0,(l.flags&128)!==0){if(T)return p2(l,f,w);f.flags|=128}if(U=f.memoizedState,U!==null&&(U.rendering=null,U.tail=null,U.lastEffect=null),wr(Ir,Ir.current),T)break;return null;case 22:case 23:return f.lanes=0,Y1(l,f,w)}return Va(l,f,w)}var m2,X1,Q1,y2;m2=function(l,f){for(var w=f.child;w!==null;){if(w.tag===5||w.tag===6)l.appendChild(w.stateNode);else if(w.tag!==4&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===f)break;for(;w.sibling===null;){if(w.return===null||w.return===f)return;w=w.return}w.sibling.return=w.return,w=w.sibling}},X1=function(){},Q1=function(l,f,w,T){var U=l.memoizedProps;if(U!==T){l=f.stateNode,fu(Go.current);var q=null;switch(w){case"input":U=tt(l,U),T=tt(l,T),q=[];break;case"select":U=O({},U,{value:void 0}),T=O({},T,{value:void 0}),q=[];break;case"textarea":U=Dn(l,U),T=Dn(l,T),q=[];break;default:typeof U.onClick!="function"&&typeof T.onClick=="function"&&(l.onclick=H0)}Re(w,T);var ae;w=null;for(Le in U)if(!T.hasOwnProperty(Le)&&U.hasOwnProperty(Le)&&U[Le]!=null)if(Le==="style"){var he=U[Le];for(ae in he)he.hasOwnProperty(ae)&&(w||(w={}),w[ae]="")}else Le!=="dangerouslySetInnerHTML"&&Le!=="children"&&Le!=="suppressContentEditableWarning"&&Le!=="suppressHydrationWarning"&&Le!=="autoFocus"&&(i.hasOwnProperty(Le)?q||(q=[]):(q=q||[]).push(Le,null));for(Le in T){var ge=T[Le];if(he=U?.[Le],T.hasOwnProperty(Le)&&ge!==he&&(ge!=null||he!=null))if(Le==="style")if(he){for(ae in he)!he.hasOwnProperty(ae)||ge&&ge.hasOwnProperty(ae)||(w||(w={}),w[ae]="");for(ae in ge)ge.hasOwnProperty(ae)&&he[ae]!==ge[ae]&&(w||(w={}),w[ae]=ge[ae])}else w||(q||(q=[]),q.push(Le,w)),w=ge;else Le==="dangerouslySetInnerHTML"?(ge=ge?ge.__html:void 0,he=he?he.__html:void 0,ge!=null&&he!==ge&&(q=q||[]).push(Le,ge)):Le==="children"?typeof ge!="string"&&typeof ge!="number"||(q=q||[]).push(Le,""+ge):Le!=="suppressContentEditableWarning"&&Le!=="suppressHydrationWarning"&&(i.hasOwnProperty(Le)?(ge!=null&&Le==="onScroll"&&Ar("scroll",l),q||he===ge||(q=[])):(q=q||[]).push(Le,ge))}w&&(q=q||[]).push("style",w);var Le=q;(f.updateQueue=Le)&&(f.flags|=4)}},y2=function(l,f,w,T){w!==T&&(f.flags|=4)};function Jd(l,f){if(!Cr)switch(l.tailMode){case"hidden":f=l.tail;for(var w=null;f!==null;)f.alternate!==null&&(w=f),f=f.sibling;w===null?l.tail=null:w.sibling=null;break;case"collapsed":w=l.tail;for(var T=null;w!==null;)w.alternate!==null&&(T=w),w=w.sibling;T===null?f||l.tail===null?l.tail=null:l.tail.sibling=null:T.sibling=null}}function Wi(l){var f=l.alternate!==null&&l.alternate.child===l.child,w=0,T=0;if(f)for(var U=l.child;U!==null;)w|=U.lanes|U.childLanes,T|=U.subtreeFlags&14680064,T|=U.flags&14680064,U.return=l,U=U.sibling;else for(U=l.child;U!==null;)w|=U.lanes|U.childLanes,T|=U.subtreeFlags,T|=U.flags,U.return=l,U=U.sibling;return l.subtreeFlags|=T,l.childLanes=w,f}function XE(l,f,w){var T=f.pendingProps;switch(ml(f),f.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wi(f),null;case 1:return vs(f.type)&&Y0(),Wi(f),null;case 3:return T=f.stateNode,Hd(),kr(xs),kr(Di),L1(),T.pendingContext&&(T.context=T.pendingContext,T.pendingContext=null),(l===null||l.child===null)&&(Lh(f)?f.flags|=4:l===null||l.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,Vo!==null&&(ub(Vo),Vo=null))),X1(l,f),Wi(f),null;case 5:O1(f);var U=fu($h.current);if(w=f.type,l!==null&&f.stateNode!=null)Q1(l,f,w,T,U),l.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!T){if(f.stateNode===null)throw Error(n(166));return Wi(f),null}if(l=fu(Go.current),Lh(f)){T=f.stateNode,w=f.type;var q=f.memoizedProps;switch(T[Pa]=f,T[ru]=q,l=(f.mode&1)!==0,w){case"dialog":Ar("cancel",T),Ar("close",T);break;case"iframe":case"object":case"embed":Ar("load",T);break;case"video":case"audio":for(U=0;U<gc.length;U++)Ar(gc[U],T);break;case"source":Ar("error",T);break;case"img":case"image":case"link":Ar("error",T),Ar("load",T);break;case"details":Ar("toggle",T);break;case"input":ut(T,q),Ar("invalid",T);break;case"select":T._wrapperState={wasMultiple:!!q.multiple},Ar("invalid",T);break;case"textarea":At(T,q),Ar("invalid",T)}Re(w,q),U=null;for(var ae in q)if(q.hasOwnProperty(ae)){var he=q[ae];ae==="children"?typeof he=="string"?T.textContent!==he&&(q.suppressHydrationWarning!==!0&&Mh(T.textContent,he,l),U=["children",he]):typeof he=="number"&&T.textContent!==""+he&&(q.suppressHydrationWarning!==!0&&Mh(T.textContent,he,l),U=["children",""+he]):i.hasOwnProperty(ae)&&he!=null&&ae==="onScroll"&&Ar("scroll",T)}switch(w){case"input":Ve(T),Qt(T,q,!0);break;case"textarea":Ve(T),xr(T);break;case"select":case"option":break;default:typeof q.onClick=="function"&&(T.onclick=H0)}T=U,f.updateQueue=T,T!==null&&(f.flags|=4)}else{ae=U.nodeType===9?U:U.ownerDocument,l==="http://www.w3.org/1999/xhtml"&&(l=Yt(w)),l==="http://www.w3.org/1999/xhtml"?w==="script"?(l=ae.createElement("div"),l.innerHTML="<script><\/script>
69",l=l.removeChild(l.firstChild)):typeof T.is=="string"?l=ae.createElement(w,{is:T.is}):(l=ae.createElement(w),w==="select"&&(ae=l,T.multiple?ae.multiple=!0:T.size&&(ae.size=T.size))):l=ae.createElementNS(l,w),l[Pa]=f,l[ru]=T,m2(l,f,!1,!1),f.stateNode=l;e:{switch(ae=Zt(w,T),w){case"dialog":Ar("cancel",l),Ar("close",l),U=T;break;case"iframe":case"object":case"embed":Ar("load",l),U=T;break;case"video":case"audio":for(U=0;U<gc.length;U++)Ar(gc[U],l);U=T;break;case"source":Ar("error",l),U=T;break;case"img":case"image":case"link":Ar("error",l),Ar("load",l),U=T;break;case"details":Ar("toggle",l),U=T;break;case"input":ut(l,T),U=tt(l,T),Ar("invalid",l);break;case"option":U=T;break;case"select":l._wrapperState={wasMultiple:!!T.multiple},U=O({},T,{value:void 0}),Ar("invalid",l);break;case"textarea":At(l,T),U=Dn(l,T),Ar("invalid",l);break;default:U=T}Re(w,U),he=U;for(q in he)if(he.hasOwnProperty(q)){var ge=he[q];q==="style"?xe(l,ge):q==="dangerouslySetInnerHTML"?(ge=ge?ge.__html:void 0,ge!=null&&$t(l,ge)):q==="children"?typeof ge=="string"?(w!=="textarea"||ge!=="")&&se(l,ge):typeof ge=="number"&&se(l,""+ge):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(i.hasOwnProperty(q)?ge!=null&&q==="onScroll"&&Ar("scroll",l):ge!=null&&F(l,q,ge,ae))}switch(w){case"input":Ve(l),Qt(l,T,!1);break;case"textarea":Ve(l),xr(l);break;case"option":T.value!=null&&l.setAttribute("value",""+we(T.value));break;case"select":l.multiple=!!T.multiple,q=T.value,q!=null?Mt(l,!!T.multiple,q,!1):T.defaultValue!=null&&Mt(l,!!T.multiple,T.defaultValue,!0);break;default:typeof U.onClick=="function"&&(l.onclick=H0)}switch(w){case"button":case"input":case"select":case"textarea":T=!!T.autoFocus;break e;case"img":T=!0;break e;default:T=!1}}T&&(f.flags|=4)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return Wi(f),null;case 6:if(l&&f.stateNode!=null)y2(l,f,l.memoizedProps,T);else{if(typeof T!="string"&&f.stateNode===null)throw Error(n(166));if(w=fu($h.current),fu(Go.current),Lh(f)){if(T=f.stateNode,w=f.memoizedProps,T[Pa]=f,(q=T.nodeValue!==w)&&(l=Ui,l!==null))switch(l.tag){case 3:Mh(T.nodeValue,w,(l.mode&1)!==0);break;case 5:l.memoizedProps.suppressHydrationWarning!==!0&&Mh(T.nodeValue,w,(l.mode&1)!==0)}q&&(f.flags|=4)}else T=(w.nodeType===9?w:w.ownerDocument).createTextNode(T),T[Pa]=f,f.stateNode=T}return Wi(f),null;case 13:if(kr(Ir),T=f.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(Cr&&zs!==null&&(f.mode&1)!==0&&(f.flags&128)===0)k1(),Da(),f.flags|=98560,q=!1;else if(q=Lh(f),T!==null&&T.dehydrated!==null){if(l===null){if(!q)throw Error(n(318));if(q=f.memoizedState,q=q!==null?q.dehydrated:null,!q)throw Error(n(317));q[Pa]=f}else Da(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Wi(f),q=!1}else Vo!==null&&(ub(Vo),Vo=null),q=!0;if(!q)return f.flags&65536?f:null}return(f.flags&128)!==0?(f.lanes=w,f):(T=T!==null,T!==(l!==null&&l.memoizedState!==null)&&T&&(f.child.flags|=8192,(f.mode&1)!==0&&(l===null||(Ir.current&1)!==0?di===0&&(di=3):fb())),f.updateQueue!==null&&(f.flags|=4),Wi(f),null);case 4:return Hd(),X1(l,f),l===null&&eu(f.stateNode.containerInfo),Wi(f),null;case 10:return tm(f.type._context),Wi(f),null;case 17:return vs(f.type)&&Y0(),Wi(f),null;case 19:if(kr(Ir),q=f.memoizedState,q===null)return Wi(f),null;if(T=(f.flags&128)!==0,ae=q.rendering,ae===null)if(T)Jd(q,!1);else{if(di!==0||l!==null&&(l.flags&128)!==0)for(l=f.child;l!==null;){if(ae=Uh(l),ae!==null){for(f.flags|=128,Jd(q,!1),T=ae.updateQueue,T!==null&&(f.updateQueue=T,f.flags|=4),f.subtreeFlags=0,T=w,w=f.child;w!==null;)q=w,l=T,q.flags&=14680066,ae=q.alternate,ae===null?(q.childLanes=0,q.lanes=l,q.child=null,q.subtreeFlags=0,q.memoizedProps=null,q.memoizedState=null,q.updateQueue=null,q.dependencies=null,q.stateNode=null):(q.childLanes=ae.childLanes,q.lanes=ae.lanes,q.child=ae.child,q.subtreeFlags=0,q.deletions=null,q.memoizedProps=ae.memoizedProps,q.memoizedState=ae.memoizedState,q.updateQueue=ae.updateQueue,q.type=ae.type,l=ae.dependencies,q.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),w=w.sibling;return wr(Ir,Ir.current&1|2),f.child}l=l.sibling}q.tail!==null&&Wn()>sf&&(f.flags|=128,T=!0,Jd(q,!1),f.lanes=4194304)}else{if(!T)if(l=Uh(ae),l!==null){if(f.flags|=128,T=!0,w=l.updateQueue,w!==null&&(f.updateQueue=w,f.flags|=4),Jd(q,!0),q.tail===null&&q.tailMode==="hidden"&&!ae.alternate&&!Cr)return Wi(f),null}else 2*Wn()-q.renderingStartTime>sf&&w!==1073741824&&(f.flags|=128,T=!0,Jd(q,!1),f.lanes=4194304);q.isBackwards?(ae.sibling=f.child,f.child=ae):(w=q.last,w!==null?w.sibling=ae:f.child=ae,q.last=ae)}return q.tail!==null?(f=q.tail,q.rendering=f,q.tail=f.sibling,q.renderingStartTime=Wn(),f.sibling=null,w=Ir.current,wr(Ir,T?w&1|2
vendor: 34,775 bytes, line 69
69:w&1),f):(Wi(f),null);case 22:case 23:return db(),T=f.memoizedState!==null,l!==null&&l.memoizedState!==null!==T&&(f.flags|=8192),T&&(f.mode&1)!==0?(Ws&1073741824)!==0&&(Wi(f),f.subtreeFlags&6&&(f.flags|=8192)):Wi(f),null;case 24:return null;case 25:return null}throw Error(n(156,f.tag))}function QE(l,f){switch(ml(f),f.tag){case 1:return vs(f.type)&&Y0(),l=f.flags,l&65536?(f.flags=l&-65537|128,f):null;case 3:return Hd(),kr(xs),kr(Di),L1(),l=f.flags,(l&65536)!==0&&(l&128)===0?(f.flags=l&-65537|128,f):null;case 5:return O1(f),null;case 13:if(kr(Ir),l=f.memoizedState,l!==null&&l.dehydrated!==null){if(f.alternate===null)throw Error(n(340));Da()}return l=f.flags,l&65536?(f.flags=l&-65537|128,f):null;case 19:return kr(Ir),null;case 4:return Hd(),null;case 10:return tm(f.type._context),null;case 22:case 23:return db(),null;case 24:return null;default:return null}}var bo=!1,sr=!1,J1=typeof WeakSet=="function"?WeakSet:Set,Tt=null;function pu(l,f){var w=l.ref;if(w!==null)if(typeof w=="function")try{w(null)}catch(T){$r(l,f,T)}else w.current=null}function eb(l,f,w){try{w()}catch(T){$r(l,f,T)}}var g2=!1;function Qh(l,f){if(Nh=k0,l=ur(),Th(l)){if("selectionStart"in l)var w={start:l.selectionStart,end:l.selectionEnd};else e:{w=(w=l.ownerDocument)&&w.defaultView||window;var T=w.getSelection&&w.getSelection();if(T&&T.rangeCount!==0){w=T.anchorNode;var U=T.anchorOffset,q=T.focusNode;T=T.focusOffset;try{w.nodeType,q.nodeType}catch{w=null;break e}var ae=0,he=-1,ge=-1,Le=0,Ge=0,Je=l,He=null;t:for(;;){for(var bt;Je!==w||U!==0&&Je.nodeType!==3||(he=ae+U),Je!==q||T!==0&&Je.nodeType!==3||(ge=ae+T),Je.nodeType===3&&(ae+=Je.nodeValue.length),(bt=Je.firstChild)!==null;)He=Je,Je=bt;for(;;){if(Je===l)break t;if(He===w&&++Le===U&&(he=ae),He===q&&++Ge===T&&(ge=ae),(bt=Je.nextSibling)!==null)break;Je=He,He=Je.parentNode}Je=bt}w=he===-1||ge===-1?null:{start:he,end:ge}}else w=null}w=w||{start:0,end:0}}else w=null;for(dl={focusedElem:l,selectionRange:w},k0=!1,Tt=f;Tt!==null;)if(f=Tt,l=f.child,(f.subtreeFlags&1028)!==0&&l!==null)l.return=f,Tt=l;else for(;Tt!==null;){f=Tt;try{var kt=f.alternate;if((f.flags&1024)!==0)switch(f.tag){case 0:case 11:case 15:break;case 1:if(kt!==null){var Nt=kt.memoizedProps,Vr=kt.memoizedState,Ie=f.stateNode,_e=Ie.getSnapshotBeforeUpdate(f.elementType===f.type?Nt:qo(f.type,Nt),Vr);Ie.__reactInternalSnapshotBeforeUpdate=_e}break;case 3:var Ne=f.stateNode.containerInfo;Ne.nodeType===1?Ne.textContent="":Ne.nodeType===9&&Ne.documentElement&&Ne.removeChild(Ne.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(nt){$r(f,f.return,nt)}if(l=f.sibling,l!==null){l.return=f.return,Tt=l;break}Tt=f.return}return kt=g2,g2=!1,kt}function ef(l,f,w){var T=f.updateQueue;if(T=T!==null?T.lastEffect:null,T!==null){var U=T=T.next;do{if((U.tag&l)===l){var q=U.destroy;U.destroy=void 0,q!==void 0&&eb(f,w,q)}U=U.next}while(U!==T)}}function Jh(l,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var w=f=f.next;do{if((w.tag&l)===l){var T=w.create;w.destroy=T()}w=w.next}while(w!==f)}}function tb(l){var f=l.ref;if(f!==null){var w=l.stateNode;switch(l.tag){case 5:l=w;break;default:l=w}typeof f=="function"?f(l):f.current=l}}function b2(l){var f=l.alternate;f!==null&&(l.alternate=null,b2(f)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(f=l.stateNode,f!==null&&(delete f[Pa],delete f[ru],delete f[G0],delete f[ce],delete f[Dd])),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function x2(l){return l.tag===5||l.tag===3||l.tag===4}function v2(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||x2(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Sm(l,f,w){var T=l.tag;if(T===5||T===6)l=l.stateNode,f?w.nodeType===8?w.parentNode.insertBefore(l,f):w.insertBefore(l,f):(w.nodeType===8?(f=w.parentNode,f.insertBefore(l,w)):(f=w,f.appendChild(l)),w=w._reactRootContainer,w!=null||f.onclick!==null||(f.onclick=H0));else if(T!==4&&(l=l.child,l!==null))for(Sm(l,f,w),l=l.sibling;l!==null;)Sm(l,f,w),l=l.sibling}function Tm(l,f,w){var T=l.tag;if(T===5||T===6)l=l.stateNode,f?w.insertBefore(l,f):w.appendChild(l);else if(T!==4&&(l=l.child,l!==null))for(Tm(l,f,w),l=l.sibling;l!==null;)Tm(l,f,w),l=l.sibling}var Ni=null,qs=!1;function Sc(l,f,w){for(w=w.child;w!==null;)tf(l,f,w),w=w.sibling}function tf(l,f,w){if(Ei&&typeof Ei.onCommitFiberUnmount=="function")try{Ei.onCommitFiberUnmount(lo,w)}catch{}switch(w.tag){case 5:sr||pu(w,f);case 6:var T=Ni,U=qs;Ni=null,Sc(l,f,w),Ni=T,qs=U,Ni!==null&&(qs?(l=Ni,w=w.stateNode,l.nodeType===8?l.parentNode.removeChild(w):l.removeChild(w)):Ni.removeChild(w.stateNode));break;case 18:Ni!==null&&(qs?(l=Ni,w=w.stateNode,l.nodeType===8?S1(l.parentNode,w):l.nodeType===1&&S1(l,w),ir(l)):S1(Ni,w.stateNode));break;case 4:T=Ni,U=qs,Ni=w.stateNode.containerInfo,qs=!0,Sc(l,f,w),Ni=T,qs=U;break;case 0:case 11:case 14:case 15:if(!sr&&(T=w.updateQueue,T!==null&&(T=T.lastEffect,T!==null))){U=T=T.next;do{var q=U,ae=q.destroy;q=q.tag,ae!==void 0&&((q&2)!==0||(q&4)!==0)&&eb(w,f,ae),U=U.next}while(U!==T)}Sc(l,f,w);break;case 1:if(!sr&&(pu(w,f),T=w.stateNode,typeof T.componentWillUnmount=="function"))try{T.props=w.memoizedProps,T.state=w.memoizedState,T.componentWillUnmount()}catch(he){$r(w,f,he)}Sc(l,f,w);break;case 21:Sc(l,f,w);break;case 22:w.mode&1?(sr=(T=sr)||w.memoizedState!==null,Sc(l,f,w),sr=T):Sc(l,f,w);break;default:Sc(l,f,w)}}function Am(l){var f=l.updateQueue;if(f!==null){l.updateQueue=null;var w=l.stateNode;w===null&&(w=l.stateNode=new J1),f.forEach(function(T){var U=o4.bind(null,l,T);w.has(T)||(w.add(T),T.then(U,U))})}}function xo(l,f){var w=f.deletions;if(w!==null)for(var T=0;T<w.length;T++){var U=w[T];try{var q=l,ae=f,he=ae;e:for(;he!==null;){switch(he.tag){case 5:Ni=he.stateNode,qs=!1;break e;case 3:Ni=he.stateNode.containerInfo,qs=!0;break e;case 4:Ni=he.stateNode.containerInfo,qs=!0;break e}he=he.return}if(Ni===null)throw Error(n(160));tf(q,ae,U),Ni=null,qs=!1;var ge=U.alternate;ge!==null&&(ge.return=null),U.return=null}catch(Le){$r(U,f,Le)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)nb(f,l),f=f.sibling}function nb(l,f){var w=l.alternate,T=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:if(xo(f,l),Hs(l),T&4){try{ef(3,l,l.return),Jh(3,l)}catch(Nt){$r(l,l.return,Nt)}try{ef(5,l,l.return)}catch(Nt){$r(l,l.return,Nt)}}break;case 1:xo(f,l),Hs(l),T&512&&w!==null&&pu(w,w.return);break;case 5:if(xo(f,l),Hs(l),T&512&&w!==null&&pu(w,w.return),l.flags&32){var U=l.stateNode;try{se(U,"")}catch(Nt){$r(l,l.return,Nt)}}if(T&4&&(U=l.stateNode,U!=null)){var q=l.memoizedProps,ae=w!==null?w.memoizedProps:q,he=l.type,ge=l.updateQueue;if(l.updateQueue=null,ge!==null)try{he==="input"&&q.type==="radio"&&q.name!=null&&nr(U,q),Zt(he,ae);var Le=Zt(he,q);for(ae=0;ae<ge.length;ae+=2){var Ge=ge[ae],Je=ge[ae+1];Ge==="style"?xe(U,Je):Ge==="dangerouslySetInnerHTML"?$t(U,Je):Ge==="children"?se(U,Je):F(U,Ge,Je,Le)}switch(he){case"input":Rt(U,q);break;case"textarea":Wt(U,q);break;case"select":var He=U._wrapperState.wasMultiple;U._wrapperState.wasMultiple=!!q.multiple;var bt=q.value;bt!=null?Mt(U,!!q.multiple,bt,!1):He!==!!q.multiple&&(q.defaultValue!=null?Mt(U,!!q.multiple,q.defaultValue,!0):Mt(U,!!q.multiple,q.multiple?[]:"",!1))}U[ru]=q}catch(Nt){$r(l,l.return,Nt)}}break;case 6:if(xo(f,l),Hs(l),T&4){if(l.stateNode===null)throw Error(n(162));U=l.stateNode,q=l.memoizedProps;try{U.nodeValue=q}catch(Nt){$r(l,l.return,Nt)}}break;case 3:if(xo(f,l),Hs(l),T&4&&w!==null&&w.memoizedState.isDehydrated)try{ir(f.containerInfo)}catch(Nt){$r(l,l.return,Nt)}break;case 4:xo(f,l),Hs(l);break;case 13:xo(f,l),Hs(l),U=l.child,U.flags&8192&&(q=U.memoizedState!==null,U.stateNode.isHidden=q,!q||U.alternate!==null&&U.alternate.memoizedState!==null||(Cm=Wn())),T&4&&Am(l);break;case 22:if(Ge=w!==null&&w.memoizedState!==null,l.mode&1?(sr=(Le=sr)||Ge,xo(f,l),sr=Le):xo(f,l),Hs(l),T&8192){if(Le=l.memoizedState!==null,(l.stateNode.isHidden=Le)&&!Ge&&(l.mode&1)!==0)for(Tt=l,Ge=l.child;Ge!==null;){for(Je=Tt=Ge;Tt!==null;){switch(He=Tt,bt=He.child,He.tag){case 0:case 11:case 14:case 15:ef(4,He,He.return);break;case 1:pu(He,He.return);var kt=He.stateNode;if(typeof kt.componentWillUnmount=="function"){T=He,w=He.return;try{f=T,kt.props=f.memoizedProps,kt.state=f.memoizedState,kt.componentWillUnmount()}catch(Nt){$r(T,w,Nt)}}break;case 5:pu(He,He.return);break;case 22:if(He.memoizedState!==null){E2(Je);continue}}bt!==null?(bt.return=He,Tt=bt):E2(Je)}Ge=Ge.sibling}e:for(Ge=null,Je=l;;){if(Je.tag===5){if(Ge===null){Ge=Je;try{U=Je.stateNode,Le?(q=U.style,typeof q.setProperty=="function"?q.setProperty("display","none","important"):q.display="none"):(he=Je.stateNode,ge=Je.memoizedProps.style,ae=ge!=null&&ge.hasOwnProperty("display")?ge.display:null,he.style.display=le("display",ae))}catch(Nt){$r(l,l.return,Nt)}}}else if(Je.tag===6){if(Ge===null)try{Je.stateNode.nodeValue=Le?"":Je.memoizedProps}catch(Nt){$r(l,l.return,Nt)}}else if((Je.tag!==22&&Je.tag!==23||Je.memoizedState===null||Je===l)&&Je.child!==null){Je.child.return=Je,Je=Je.child;continue}if(Je===l)break e;for(;Je.sibling===null;){if(Je.return===null||Je.return===l)break e;Ge===Je&&(Ge=null),Je=Je.return}Ge===Je&&(Ge=null),Je.sibling.return=Je.return,Je=Je.sibling}}break;case 19:xo(f,l),Hs(l),T&4&&Am(l);break;case 21:break;default:xo(f,l),Hs(l)}}function Hs(l){var f=l.flags;if(f&2){try{e:{for(var w=l.return;w!==null;){if(x2(w)){var T=w;break e}w=w.return}throw Error(n(160))}switch(T.tag){case 5:var U=T.stateNode;T.flags&32&&(se(U,""),T.flags&=-33);var q=v2(l);Tm(l,q,U);break;case 3:case 4:var ae=T.stateNode.containerInfo,he=v2(l);Sm(l,he,ae);break;default:throw Error(n(161))}}catch(ge){$r(l,l.return,ge)}l.flags&=-3}f&4096&&(l.flags&=-4097)}function w2(l,f,w){Tt=l,Yo(l)}function Yo(l,f,w){for(var T=(l.mode&1)!==0;Tt!==null;){var U=Tt,q=U.child;if(U.tag===22&&T){var ae=U.memoizedState!==null||bo;if(!ae){var he=U.alternate,ge=he!==null&&he.memoizedState!==null||sr;he=bo;var Le=sr;if(bo=ae,(sr=ge)&&!Le)for(Tt=U;Tt!==null;)ae=Tt,ge=ae.child,ae.tag===22&&ae.memoizedState!==null?rb(U):ge!==null?(ge.return=ae,Tt=ge):rb(U);for(;q!==null;)Tt=q,Yo(q),q=q.sibling;Tt=U,bo=he,sr=Le}mu(l)}else(U.subtreeFlags&8772)!==0&&q!==null?(q.return=U,Tt=q):mu(l)}}function mu(l){for(;Tt!==null;){var f=Tt;if((f.flags&8772)!==0){var w=f.alternate;try{if((f.flags&8772)!==0)switch(f.tag){case 0:case 11:case 15:sr||Jh(5,f);break;case 1:var T=f.stateNode;if(f.flags&4&&!sr)if(w===null)T.componentDidMount();else{var U=f.elementType===f.type?w.memoizedProps:qo(f.type,w.memoizedProps);T.componentDidUpdate(U,w.memoizedState,T.__reactInternalSnapshotBeforeUpdate)}var q=f.updateQueue;q!==null&&e2(f,q,T);break;case 3:var ae=f.updateQueue;if(ae!==null){if(w=null,f.child!==null)switch(f.child.tag){case 5:w=f.child.stateNode;break;case 1:w=f.child.stateNode}e2(f,ae,w)}break;case 5:var he=f.stateNode;if(w===null&&f.flags&4){w=he;var ge=f.memoizedProps;switch(f.type){case"button":case"input":case"select":case"textarea":ge.autoFocus&&w.focus();break;case"img":ge.src&&(w.src=ge.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(f.memoizedState===null){var Le=f.alternate;if(Le!==null){var Ge=Le.memoizedState;if(Ge!==null){var Je=Ge.dehydrated;Je!==null&&ir(Je)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}sr||f.flags&512&&tb(f)}catch(He){$r(f,f.return,He)}}if(f===l){Tt=null;break}if(w=f.sibling,w!==null){w.return=f.return,Tt=w;break}Tt=f.return}}function E2(l){for(;Tt!==null;){var f=Tt;if(f===l){Tt=null;break}var w=f.sibling;if(w!==null){w.return=f.return,Tt=w;break}Tt=f.return}}function rb(l){for(;Tt!==null;){var f=Tt;try{switch(f.tag){case 0:case 11:case 15:var w=f.return;try{Jh(4,f)}catch(ge){$r(f,w,ge)}break;case 1:var T=f.stateNode;if(typeof T.componentDidMount=="function"){var U=f.return;try{T.componentDidMount()}catch(ge){$r(f,U,ge)}}var q=f.return;try{tb(f)}catch(ge){$r(f,q,ge)}break;case 5:var ae=f.return;try{tb(f)}catch(ge){$r(f,ae,ge)}}}catch(ge){$r(f,f.return,ge)}if(f===l){Tt=null;break}var he=f.sibling;if(he!==null){he.return=f.return,Tt=he;break}Tt=f.return}}var JE=Math.ceil,km=$.ReactCurrentDispatcher,ib=$.ReactCurrentOwner,vo=$.ReactCurrentBatchConfig,Un=0,_i=null,Xr=null,ji=0,Ws=0,nf=bs(0),di=0,rf=null,yu=0,ep=0,sb=0,tp=null,Es=null,Cm=0,sf=1/0,Tc=null,Im=!1,ob=null,gu=null,Rm=!1,fi=null,Mm=0,np=0,ab=null,rp=-1,Nm=0;function os(){return(Un&6)!==0?Wn():rp!==-1?rp:rp=Wn()}function bu(l){return(l.mode&1)===0?1:(Un&2)!==0&&ji!==0?ji&-ji:Qw.transition!==null?(Nm===0&&(Nm=n1()),Nm):(l=Qn,l!==0||(l=window.event,l=l===void 0?16:Sw(l.type)),l)}function Zo(l,f,w,T){if(50<np)throw np=0,ab=null,Error(n(185));xh(l,w,T),((Un&2)===0||l!==_i)&&(l===_i&&((Un&2)===0&&(ep|=w),di===4&&xu(l,ji)),Gi(l,T),w===1&&Un===0&&(f.mode&1)===0&&(sf=Wn()+500,Z0&&su()))}function Gi(l,f){var w=l.callbackNode;IE(l,f);var T=il(l,l===_i?ji:0);if(T===0)w!==null&&Ca(w),l.callbackNode=null,l.callbackPriority=0;else if(f=T&-T,l.callbackPriority!==f){if(w!=null&&Ca(w),f===1)l.tag===0?fl(S2.bind(null,l)):Yw(S2.bind(null,l)),W0(function(){(Un&6)===0&&su()}),w=null;else{switch(sl(T)){case 1:w=$o;break;case 4:w=Ia;break;case 16:w=Fs;break;case 536870912:w=Uo;break;default:w=Fs}w=M2(w,_2.bind(null,l))}l.callbackPriority=f,l.callbackNode=w}}function _2(l,f){if(rp=-1,Nm=0,(Un&6)!==0)throw Error(n(327));var w=l.callbackNode;if(vu()&&l.callbackNode!==w)return null;var T=il(l,l===_i?ji:0);if(T===0)return null;if((T&30)!==0||(T&l.expiredLanes)!==0||f)f=jm(l,T);else{f=T;var U=Un;Un|=2;var q=A2();(_i!==l||ji!==f)&&(Tc=null,sf=Wn()+500,El(l,f));do try{n4();break}catch(he){T2(l,he)}while(!0);Bh(),km.current=q,Un=U,Xr!==null?f=0:(_i=null,ji=0,f=di)}if(f!==0){if(f===2&&(U=_0(l),U!==0&&(T=U,f=cb(l,U))),f===1)throw w=rf,El(l,0),xu(l,T),Gi(l,Wn()),w;if(f===6)xu(l,T);else{if(U=l.current.alternate,(T&30)===0&&!e4(U)&&(f=jm(l,T),f===2&&(q=_0(l),q!==0&&(T=q,f=cb(l,q))),f===1))throw w=rf,El(l,0),xu(l,T),Gi(l,Wn()),w;switch(l.finishedWork=U,l.finishedLanes=T,f){case 0:case 1:throw Error(n(345));case 2:_l(l,Es,Tc);break;case 3:if(xu(l,T),(T&130023424)===T&&(f=Cm+500-Wn(),10<f)){if(il(l,0)!==0)break;if(U=l.suspendedLanes,(U&T)!==T){os(),l.pingedLanes|=l.suspendedLanes&U;break}l.timeoutHandle=tu(_l.bind(null,l,Es,Tc),f);break}_l(l,Es,Tc);break;case 4:if(xu(l,T),(T&4194240)===T)break;for(f=l.eventTimes,U=-1;0<T;){var ae=31-oi(T);q=1<<ae,ae=f[ae],ae>U&&(U=ae),T&=~q}if(T=U,T=Wn()-T,T=(120>T?120:480>T?480:1080>T?1080:1920>T?1920:3e3>T?3e3:4320>T?4320:1960*JE(T/1960))-T,10<T){l.timeoutHandle=tu(_l.bind(null,l,Es,Tc),T);break}_l(l,Es,Tc);break;case 5:_l(l,Es,Tc);break;default:throw Error(n(329))}}}return Gi(l,Wn()),l.callbackNode===w?_2.bind(null,l):null}function cb(l,f){var w=tp;return l.current.memoizedState.isDehydrated&&(El(l,f).flags|=256),l=jm(l,f),l!==2&&(f=Es,Es=w,f!==null&&ub(f)),l}function ub(l){Es===null?Es=l:Es.push.apply(Es,l)}function e4(l){for(var f=l;;){if(f.flags&16384){var w=f.updateQueue;if(w!==null&&(w=w.stores,w!==null))for(var T=0;T<w.length;T++){var U=w[T],q=U.getSnapshot;U=U.value;try{if(!Pe(q(),U))return!1}catch{return!1}}}if(w=f.child,f.subtreeFlags&16384&&w!==null)w.return=f,f=w;else{if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function xu(l,f){for(f&=~sb,f&=~ep,l.suspendedLanes|=f,l.pingedLanes&=~f,l=l.expirationTimes;0<f;){var w=31-oi(f),T=1<<w;l[w]=-1,f&=~T}}function S2(l){if((Un&6)!==0)throw Error(n(327));vu();var f=il(l,0);if((f&1)===0)return Gi(l,Wn()),null;var w=jm(l,f);if(l.tag!==0&&w===2){var T=_0(l);T!==0&&(f=T,w=cb(l,T))}if(w===1)throw w=rf,El(l,0),xu(l,f),Gi(l,Wn()),w;if(w===6)throw Error(n(345));return l.finishedWork=l.current.alternate,l.finishedLanes=f,_l(l,Es,Tc),Gi(l,Wn()),null}function lb(l,f){var w=Un;Un|=1;try{return l(f)}finally{Un=w,Un===0&&(sf=Wn()+500,Z0&&su())}}function wl(l){fi!==null&&fi.tag===0&&(Un&6)===0&&vu();var f=Un;Un|=1;var w=vo.transition,T=Qn;try{if(vo.transition=null,Qn=1,l)return l()}finally{Qn=T,vo.transition=w,Un=f,(Un&6)===0&&su()}}function db(){Ws=nf.current,kr(nf)}function El(l,f){l.finishedWork=null,l.finishedLanes=0;var w=l.timeoutHandle;if(w!==-1&&(l.timeoutHandle=-1,Ph(w)),Xr!==null)for(w=Xr.return;w!==null;){var T=w;switch(ml(T),T.tag){case 1:T=T.type.childContextTypes,T!=null&&Y0();break;case 3:Hd(),kr(xs),kr(Di),L1();break;case 5:O1(T);break;case 4:Hd();break;case 13:kr(Ir);break;case 19:kr(Ir);break;case 10:tm(T.type._context);break;case 22:case 23:db()}w=w.return}if(_i=l,Xr=l=wu(l.current,null),ji=Ws=f,di=0,rf=null,sb=ep=yu=0,Es=tp=null,Vs!==null){for(f=0;f<Vs.length;f++)if(w=Vs[f],T=w.interleaved,T!==null){w.interleaved=null;var U=T.next,q=w.pending;if(q!==null){var ae=q.next;q.next=U,T.next=ae}w.pending=T}Vs=null}return l}function T2(l,f){do{var w=Xr;try{if(Bh(),Wd.current=Ec,cm){for(var T=Pr.memoizedState;T!==null;){var U=T.queue;U!==null&&(U.pending=null),T=T.next}cm=!1}if(bl=0,ci=Or=Pr=null,Vh=!1,Vi=0,ib.current=null,w===null||w.return===null){di=1,rf=f,Xr=null;break}e:{var q=l,ae=w.return,he=w,ge=f;if(f=ji,he.flags|=32768,ge!==null&&typeof ge=="object"&&typeof ge.then=="function"){var Le=ge,Ge=he,Je=Ge.tag;if((Ge.mode&1)===0&&(Je===0||Je===11||Je===15)){var He=Ge.alternate;He?(Ge.updateQueue=He.updateQueue,Ge.memoizedState=He.memoizedState,Ge.lanes=He.lanes):(Ge.updateQueue=null,Ge.memoizedState=null)}var bt=W1(ae);if(bt!==null){bt.flags&=-257,Kh(bt,ae,he,q,f),bt.mode&1&&l2(q,Le,f),f=bt,ge=Le;var kt=f.updateQueue;if(kt===null){var Nt=new Set;Nt.add(ge),f.updateQueue=Nt}else kt.add(ge);break e}else{if((f&1)===0){l2(q,Le,f),fb();break e}ge=Error(n(426))}}else if(Cr&&he.mode&1){var Vr=W1(ae);if(Vr!==null){(Vr.flags&65536)===0&&(Vr.flags|=256),Kh(Vr,ae,he,q,f),$a(vl(ge,he));break e}}q=ge=vl(ge,he),di!==4&&(di=2),tp===null?tp=[q]:tp.push(q),q=ae;do{switch(q.tag){case 3:q.flags|=65536,f&=-f,q.lanes|=f;var Ie=xm(q,ge,f);I1(q,Ie);break e;case 1:he=ge;var _e=q.type,Ne=q.stateNode;if((q.flags&128)===0&&(typeof _e.getDerivedStateFromError=="function"||Ne!==null&&typeof Ne.componentDidCatch=="function"&&(gu===null||!gu.has(Ne)))){q.flags|=65536,f&=-f,q.lanes|=f;var nt=Gh(q,he,f);I1(q,nt);break e}}q=q.return}while(q!==null)}C2(w)}catch(Ot){f=Ot,Xr===w&&w!==null&&(Xr=w=w.return);continue}break}while(!0)}function A2(){var l=km.current;return km.current=Ec,l===null?Ec:l}function fb(){(di===0||di===3||di===2)&&(di=4),_i===null||(yu&268435455)===0&&(ep&268435455)===0||xu(_i,ji)}function jm(l,f){var w=Un;Un|=2;var T=A2();(_i!==l||ji!==f)&&(Tc=null,El(l,f));do try{t4();break}catch(U){T2(l,U)}while(!0);if(Bh(),Un=w,km.current=T,Xr!==null)throw Error(n(261));return _i=null,ji=0,di}function t4(){for(;Xr!==null;)k2(Xr)}function n4(){for(;Xr!==null&&!uo();)k2(Xr)}function k2(l){var f=R2(l.alternate,l,Ws);l.memoizedProps=l.pendingProps,f===null?C2(l):Xr=f,ib.current=null}function C2(l){var f=l;do{var w=f.alternate;if(l=f.return,(f.flags&32768)===0){if(w=XE(w,f,Ws),w!==null){Xr=w;return}}else{if(w=QE(w,f),w!==null){w.flags&=32767,Xr=w;return}if(l!==null)l.flags|=32768,l.subtreeFlags=0,l.deletions=null;else{di=6,Xr=null;return}}if(f=f.sibling,f!==null){Xr=f;return}Xr=f=l}while(f!==null);di===0&&(di=5)}function _l(l,f,w){var T=Qn,U=vo.transition;try{vo.transition=null,Qn=1,r4(l,f,w,T)}finally{vo.transition=U,Qn=T}return null}function r4(l,f,w,T){do vu();while(fi!==null);if((Un&6)!==0)throw Error(n(327));w=l.finishedWork;var U=l.finishedLanes;if(w===null)return null;if(l.finishedWork=null,l.finishedLanes=0,w===l.current)throw Error(n(177));l.callbackNode=null,l.callbackPriority=0;var q=w.lanes|w.childLanes;if(xw(l,q),l===_i&&(Xr=_i=null,ji=0),(w.subtreeFlags&2064)===0&&(w.flags&2064)===0||Rm||(Rm=!0,M2(Fs,function(){return vu(),null})),q=(w.flags&15990)!==0,(w.subtreeFlags&15990)!==0||q){q=vo.transition,vo.transition=null;var ae=Qn;Qn=1;var he=Un;Un|=4,ib.current=null,Qh(l,w),nb(w,l),WE(dl),k0=!!Nh,dl=Nh=null,l.current=w,w2(w),dc(),Un=he,Qn=ae,vo.transition=q}else l.current=w;if(Rm&&(Rm=!1,fi=l,Mm=U),q=l.pendingLanes,q===0&&(gu=null),hc(w.stateNode),Gi(l,Wn()),f!==null)for(T=l.onRecoverableError,w=0;w<f.length;w++)U=f[w],T(U.value,{componentStack:U.stack,digest:U.digest});if(Im)throw Im=!1,l=ob,ob=null,l;return(Mm&1)!==0&&l.tag!==0&&vu(),q=l.pendingLanes,(q&1)!==0?l===ab?np++:(np=0,ab=l):np=0,su(),null}function vu(){if(fi!==null){var l=sl(Mm),f=vo.transition,w=Qn;try{if(vo.transition=null,Qn=16>l?16:l,fi===null)var T=!1;else{if(l=fi,fi=null,Mm=0,(Un&6)!==0)throw Error(n(331));var U=Un;for(Un|=4,Tt=l.current;Tt!==null;){var q=Tt,ae=q.child;if((Tt.flags&16)!==0){var he=q.deletions;if(he!==null){for(var ge=0;ge<he.length;ge++){var Le=he[ge];for(Tt=Le;Tt!==null;){var Ge=Tt;switch(Ge.tag){case 0:case 11:case 15:ef(8,Ge,q)}var Je=Ge.child;if(Je!==null)Je.return=Ge,Tt=Je;else for(;Tt!==null;){Ge=Tt;var He=Ge.sibling,bt=Ge.return;if(b2(Ge),Ge===Le){Tt=null;break}if(He!==null){He.return=bt,Tt=He;break}Tt=bt}}}var kt=q.alternate;if(kt!==null){var Nt=kt.child;if(Nt!==null){kt.child=null;do{var Vr=Nt.sibling;Nt.sibling=null,Nt=Vr}while(Nt!==null)}}Tt=q}}if((q.subtreeFlags&2064)!==0&&ae!==null)ae.return=q,Tt=ae;else e:for(;Tt!==null;){if(q=Tt,(q.flags&2048)!==0)switch(q.tag){case 0:case 11:case 15:ef(9,q,q.return)}var Ie=q.sibling;if(Ie!==null){Ie.return=q.return,Tt=Ie;break e}Tt=q.return}}var _e=l.current;for(Tt=_e;Tt!==null;){ae=Tt;var Ne=ae.child;if((ae.subtreeFlags&2064)!==0&&Ne!==null)Ne.return=ae,Tt=Ne;else e:for(ae=_e;Tt!==null;){if(he=Tt,(he.flags&2048)!==0)try{switch(he.tag){case 0:case 11:case 15:Jh(9,he)}}catch(Ot){$r(he,he.return,Ot)}if(he===ae){Tt=null;break e}var nt=he.sibling;if(nt!==null){nt.return=he.return,Tt=nt;break e}Tt=he.return}}if(Un=U,su(),Ei&&typeof Ei.onPostCommitFiberRoot=="function")try{Ei.onPostCommitFiberRoot(lo,l)}catch{}T=!0}return T}finally{Qn=w,vo.transition=f}}return!1}function hb(l,f,w){f=vl(w,f),f=xm(l,f,1),l=cu(l,f,1),f=os(),l!==null&&(xh(l,1,f),Gi(l,f))}function $r(l,f,w){if(l.tag===3)hb(l,l,w);else for(;f!==null;){if(f.tag===3){hb(f,l,w);break}else if(f.tag===1){var T=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof T.componentDidCatch=="function"&&(gu===null||!gu.has(T))){l=vl(w,l),l=Gh(f,l,1),f=cu(f,l,1),l=os(),f!==null&&(xh(f,1,l),Gi(f,l));break}}f=f.return}}function i4(l,f,w){var T=l.pingCache;T!==null&&T.delete(f),f=os(),l.pingedLanes|=l.suspendedLanes&w,_i===l&&(ji&w)===w&&(di===4||di===3&&(ji&130023424)===ji&&500>Wn()-Cm?El(l,0):sb|=w),Gi(l,f)}function I2(l,f){f===0&&((l.mode&1)===0?f=1:(f=E0,E0<<=1,(E0&130023424)===0&&(E0=4194304)));var w=os();l=Ho(l,f),l!==null&&(xh(l,f,w),Gi(l,w))}function s4(l){var f=l.memoizedState,w=0;f!==null&&(w=f.retryLane),I2(l,w)}function o4(l,f){var w=0;switch(l.tag){case 13:var T=l.stateNode,U=l.memoizedState;U!==null&&(w=U.retryLane);break;case 19:T=l.stateNode;break;default:throw Error(n(314))}T!==null&&T.delete(f),I2(l,w)}var R2;R2=function(l,f,w){if(l!==null)if(l.memoizedProps!==f.pendingProps||xs.current)qi=!0;else{if((l.lanes&w)===0&&(f.flags&128)===0)return qi=!1,Hi(l,f,w);qi=(l.flags&131072)!==0}else qi=!1,Cr&&(f.flags&1048576)!==0&&Zw(f,Q0,f.index);switch(f.lanes=0,f.tag){case 2:var T=f.type;Qd(l,f),l=f.pendingProps;var U=Ud(f,Di.current);ou(f,w),U=um(null,f,T,l,U,w);var q=lm();return f.flags|=1,typeof U=="object"&&U!==null&&typeof U.render=="function"&&U.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,vs(T)?(q=!0,po(f)):q=!1,f.memoizedState=U.state!==null&&U.state!==void 0?U.state:null,C1(f),U.updater=im,f.stateNode=U,U._reactInternals=f,N1(f,T,l,w),f=Z1(null,f,T,!0,q,w)):(f.tag=0,Cr&&q&&Oh(f),ss(null,f,U,w),f=f.child),f;case 16:T=f.elementType;e:{switch(Qd(l,f),l=f.pendingProps,U=T._init,T=U(T._payload),f.type=T,U=f.tag=Pm(T),l=qo(T,l),U){case 0:f=vm(null,f,T,l,w);break e;case 1:f=h2(null,f,T,l,w);break e;case 11:f=G1(null,f,T,l,w);break e;case 14:f=Ua(null,f,T,qo(T.type,l),w);break e}throw Error(n(306,T,""))}return f;case 0:return T=f.type,U=f.pendingProps,U=f.elementType===T?U:qo(T,U),vm(l,f,T,U,w);case 1:return T=f.type,U=f.pendingProps,U=f.elementType===T?U:qo(T,U),h2(l,f,T,U,w);case 3:e:{if(za(f),l===null)throw Error(n(387));T=f.pendingProps,q=f.memoizedState,U=q.element,Jw(l,f),rm(f,T,null,w);var ae=f.memoizedState;if(T=ae.element,q.isDehydrated)if(q={element:T,isDehydrated:!1,cache:ae.cache,pendingSuspenseBoundaries:ae.pendingSuspenseBoundaries,transitions:ae.transitions},f.updateQueue.baseState=q,f.memoizedState=q,f.flags&256){U=vl(Error(n(423)),f),f=wm(l,f,T,w,U);break e}else if(T!==U){U=vl(Error(n(424)),f),f=wm(l,f,T,w,U);break e}else for(zs=nu(f.stateNode.containerInfo.firstChild),Ui=f,Cr=!0,Vo=null,w=j1(f,null,T,w),f.child=w;w;)w.flags=w.flags&-3|4096,w=w.sibling;else{if(Da(),T===U){f=Va(l,f,w);break e}ss(l,f,T,w)}f=f.child}return f;case 5:return P1(f),l===null&&ws(f),T=f.type,U=f.pendingProps,q=l!==null?l.memoizedProps:null,ae=U.children,jh(T,U)?ae=null:q!==null&&jh(T,q)&&(f.flags|=32),f2(l,f),ss(l,f,ae,w),f.child;case 6:return l===null&&ws(f),null;case 13:return Xh(l,f,w);case 4:return am(f,f.stateNode.containerInfo),T=f.pendingProps,l===null?f.child=lu(f,null,T,w):ss(l,f,T,w),f.child;case 11:return T=f.type,U=f.pendingProps,U=f.elementType===T?U:qo(T,U),G1(l,f,T,U,w);case 7:return ss(l,f,f.pendingProps,w),f.child;case 8:return ss(l,f,f.pendingProps.children,w),f.child;case 12:return ss(l,f,f.pendingProps.children,w),f.child;case 10:e:{if(T=f.type._context,U=f.pendingProps,q=f.memoizedProps,ae=U.value,wr(yl,T._currentValue),T._currentValue=ae,q!==null)if(Pe(q.value,ae)){if(q.children===U.children&&!xs.current){f=Va(l,f,w);break e}}else for(q=f.child,q!==null&&(q.return=f);q!==null;){var he=q.dependencies;if(he!==null){ae=q.child;for(var ge=he.firstContext;ge!==null;){if(ge.context===T){if(q.tag===1){ge=Wo(-1,w&-w),ge.tag=2;var Le=q.updateQueue;if(Le!==null){Le=Le.shared;var Ge=Le.pending;Ge===null?ge.next=ge:(ge.next=Ge.next,Ge.next=ge),Le.pending=ge}}q.lanes|=w,ge=q.alternate,ge!==null&&(ge.lanes|=w),go(q.return,w,f),he.lanes|=w;break}ge=ge.next}}else if(q.tag===10)ae=q.type===f.type?null:q.child;else if(q.tag===18){if(ae=q.return,ae===null)throw Error(n(341));ae.lanes|=w,he=ae.alternate,he!==null&&(he.lanes|=w),go(ae,w,f),ae=q.sibling}else ae=q.child;if(ae!==null)ae.return=q;else for(ae=q;ae!==null;){if(ae===f){ae=null;break}if(q=ae.sibling,q!==null){q.return=ae.return,ae=q;break}ae=ae.return}q=ae}ss(l,f,U.children,w),f=f.child}return f;case 9:return U=f.type,T=f.pendingProps.children,ou(f,w),U=rs(U),T=T(U),f.flags|=1,ss(l,f,T,w),f.child;case 14:return T=f.type,U=qo(T,f.pendingProps),U=qo(T.type,U),Ua(l,f,T,U,w);case 15:return K1(l,f,f.type,f.pendingProps,w);case 17:return T=f.type,U=f.pendingProps,U=f.elementType===T?U:qo(T,U),Qd(l,f),f.tag=1,vs(T)?(l=!0,po(f)):l=!1,ou(f,w),M1(f,T,U),N1(f,T,U,w),Z1(null,f,T,!0,l,w);case 19:return p2(l,f,w);case 22:return Y1(l,f,w)}throw Error(n(156,f.tag))};function M2(l,f){return ka(l,f)}function a4(l,f,w,T){this.tag=l,this.key=w,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=T,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gs(l,f,w,T){return new a4(l,f,w,T)}function pb(l){return l=l.prototype,!(!l||!l.isReactComponent)}function Pm(l){if(typeof l=="function")return pb(l)?1:0;if(l!=null){if(l=l.$$typeof,l===J)return 11;if(l===E)return 14}return 2}function wu(l,f){var w=l.alternate;return w===null?(w=Gs(l.tag,f,l.key,l.mode),w.elementType=l.elementType,w.type=l.type,w.stateNode=l.stateNode,w.alternate=l,l.alternate=w):(w.pendingProps=f,w.type=l.type,w.flags=0,w.subtreeFlags=0,w.deletions=null),w.flags=l.flags&14680064,w.childLanes=l.childLanes,w.lanes=l.lanes,w.child=l.child,w.memoizedProps=l.memoizedProps,w.memoizedState=l.memoizedState,w.updateQueue=l.updateQueue,f=l.dependencies,w.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},w.sibling=l.sibling,w.index=l.index,w.ref=l.ref,w}function Om(l,f,w,T,U,q){var ae=2;if(T=l,typeof l=="function")pb(l)&&(ae=1);else if(typeof l=="string")ae=5;else e:switch(l){case K:return Sl(w.children,U,q,f);case te:ae=8,U|=8;break;case Q:return l=Gs(12,w,f,U|2),l.elementType=Q,l.lanes=q,l;case M:return l=Gs(13,w,f,U),l.elementType=M,l.lanes=q,l;case m:return l=Gs(19,w,f,U),l.elementType=m,l.lanes=q,l;case N:return Lm(w,U,q,f);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case ee:ae=10;break e;case ne:ae=9;break e;case J:ae=11;break e;case E:ae=14;break e;case C:ae=16,T=null;break e}throw Error(n(130,l==null?l:typeof l,""))}return f=Gs(ae,w,f,U),f.elementType=l,f.type=T,f.lanes=q,f}function Sl(l,f,w,T){return l=Gs(7,l,T,f),l.lanes=w,l}function Lm(l,f,w,T){return l=Gs(22,l,T,f),l.elementType=N,l.lanes=w,l.stateNode={isHidden:!1},l}function mb(l,f,w){return l=Gs(6,l,null,f),l.lanes=w,l}function yb(l,f,w){return f=Gs(4,l.children!==null?l.children:[],l.key,f),f.lanes=w,f.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},f}function c4(l,f,w,T,U){this.tag=f,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bh(0),this.expirationTimes=bh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bh(0),this.identifierPrefix=T,this.onRecoverableError=U,this.mutableSourceEagerHydrationData=null}function gb(l,f,w,T,U,q,ae,he,ge){return l=new c4(l,f,w,he,ge),f===1?(f=1,q===!0&&(f|=8)):f=0,q=Gs(3,null,null,f),l.current=q,q.stateNode=l,q.memoizedState={element:T,isDehydrated:w,cache:null,transitions:null,pendingSuspenseBoundaries:null},C1(q),l}function u4(l,f,w){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:V,key:T==null?null:""+T,children:l,containerInfo:f,implementation:w}}function N2(l){if(!l)return iu;l=l._reactInternals;e:{if(Bs(l)!==l||l.tag!==1)throw Error(n(170));var f=l;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(vs(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(n(171))}if(l.tag===1){var w=l.type;if(vs(w))return Gw(l,w,f)}return f}function j2(l,f,w,T,U,q,ae,he,ge){return l=gb(w,T,!0,l,U,q,ae,he,ge),l.context=N2(null),w=l.current,T=os(),U=bu(w),q=Wo(T,U),q.callback=f??null,cu(w,q,U),l.current.lanes=U,xh(l,U,T),Gi(l,T),l}function Bm(l,f,w,T){var U=f.current,q=os(),ae=bu(U);return w=N2(w),f.context===null?f.context=w:f.pendingContext=w,f=Wo(q,ae),f.payload={element:l},T=T===void 0?null:T,T!==null&&(f.callback=T),l=cu(U,f,ae),l!==null&&(Zo(l,U,ae,q),uu(l,U,ae)),ae}function Fm(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return l.child.stateNode;default:return l.child.stateNode}}function P2(l,f){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var w=l.retryLane;l.retryLane=w!==0&&w<f?w:f}}function bb(l,f){P2(l,f),(l=l.alternate)&&P2(l,f)}function l4(){return null}var xb=typeof reportError=="function"?reportError:function(l){console.error(l)};function Dm(l){this._internalRoot=l}$m.prototype.render=Dm.prototype.render=function(l){var f=this._internalRoot;if(f===null)throw Error(n(409));Bm(l,f,null,null)},$m.prototype.unmount=Dm.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var f=l.containerInfo;wl(function(){Bm(null,l,null,null)}),f[Us]=null}};function $m(l){this._internalRoot=l}$m.prototype.unstable_scheduleHydration=function(l){if(l){var f=i1();l={blockedOn:null,target:l,priority:f};for(var w=0;w<Zc.length&&f!==0&&f<Zc[w].priority;w++);Zc.splice(w,0,l),w===0&&Ew(l)}};function vb(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function Um(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11&&(l.nodeType!==8||l.nodeValue!==" react-mount-point-unstable "))}function O2(){}function zm(l,f,w,T,U){if(U){if(typeof T=="function"){var q=T;T=function(){var Le=Fm(ae);q.call(Le)}}var ae=j2(f,T,l,0,null,!1,!1,"",O2);return l._reactRootContainer=ae,l[Us]=ae.current,eu(l.nodeType===8?l.parentNode:l),wl(),ae}for(;U=l.lastChild;)l.removeChild(U);if(typeof T=="function"){var he=T;T=function(){var Le=Fm(ge);he.call(Le)}}var ge=gb(l,0,!1,null,null,!1,!1,"",O2);return l._reactRootContainer=ge,l[Us]=ge.current,eu(l.nodeType===8?l.parentNode:l),wl(function(){Bm(f,ge,w,T)}),ge}function Vm(l,f,w,T,U){var q=w._reactRootContainer;if(q){var ae=q;if(typeof U=="function"){var he=U;U=function(){var ge=Fm(ae);he.call(ge)}}Bm(f,ae,l,U)}else ae=zm(w,f,l,U,T);return Fm(ae)}r1=function(l){switch(l.tag){case 3:var f=l.stateNode;if(f.current.memoizedState.isDehydrated){var w=_d(f.pendingLanes);w!==0&&(vh(f,w|1),Gi(f,Wn()),(Un&6)===0&&(sf=Wn()+500,su()))}break;case 13:wl(function(){var T=Ho(l,1);if(T!==null){var U=os();Zo(T,l,1,U)}}),bb(l,1)}},S0=function(l){if(l.tag===13){var f=Ho(l,134217728);if(f!==null){var w=os();Zo(f,l,134217728,w)}bb(l,134217728)}},vw=function(l){if(l.tag===13){var f=bu(l),w=Ho(l,f);if(w!==null){var T=os();Zo(w,l,f,T)}bb(l,f)}},i1=function(){return Qn},s1=function(l,f){var w=Qn;try{return Qn=l,f()}finally{Qn=w}},$n=function(l,f,w){switch(f){case"input":if(Rt(l,w),f=w.name,w.type==="radio"&&f!=null){for(w=l;w.parentNode;)w=w.parentNode;for(w=w.querySelectorAll("input[name="+JSON.stringify(""+f)+'][type="radio"]'),f=0;f<w.length;f++){var T=w[f];if(T!==l&&T.form===l.form){var U=K0(T);if(!U)throw Error(n(90));et(T),Rt(T,U)}}}break;case"textarea":Wt(l,w);break;case"select":f=w.value,f!=null&&Mt(l,!!w.multiple,f,!1)}},Mi=lb,an=wl;var d4={usingClientEntryPoint:!1,Events:[Fi,_n,K0,tn,un,lb]},ip={findFiberByHostInstance:Oa,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},f4={bundleType:ip.bundleType,version:ip.version,rendererPackageName:ip.rendererPackageName,rendererConfig:ip.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$.ReactCurrentDispatcher,findHostInstanceByFiber:function(l){return l=Ta(l),l===null?null:l.stateNode},findFiberByHostInstance:ip.findFiberByHostInstance||l4,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};
69if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var qm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qm.isDisabled&&qm.supportsFiber)try{lo=qm.inject(f4),Ei=qm}catch{}}return So.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d4,So.createPortal=function(l,f){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vb(f))throw Error(n(200));return u4(l,f,null,w)},So.createRoot=function(l,f){if(!vb(l))throw Error(n(299));var w=!1,T="",U=xb;return f!=null&&(f.unstable_strictMode===!0&&(w=!0),f.identifierPrefix!==void 0&&(T=f.identifierPrefix),f.onRecoverableError!==void 0&&(U=f.onRecoverableError)),f=gb(l,1,!1,null,null,w,!1,T,U),l[Us]=f.current,eu(l.nodeType===8?l.parentNode:l),new Dm(f)},So.findDOMNode=function(l){if(l==null)return null;if(l.nodeType===1)return l;var f=l._reactInternals;if(f===void 0)throw typeof l.render=="function"?Error(n(188)):(l=Object.keys(l).join(","),Error(n(268,l)));return l=Ta(f),l=l===null?null:l.stateNode,l},So.flushSync=function(l){return wl(l)},So.hydrate=function(l,f,w){if(!Um(f))throw Error(n(200));return Vm(null,l,f,!0,w)},So.hydrateRoot=function(l,f,w){if(!vb(l))throw Error(n(405));var T=w!=null&&w.hydratedSources||null,U=!1,q="",ae=xb;if(w!=null&&(w.unstable_strictMode===!0&&(U=!0),w.identifierPrefix!==void 0&&(q=w.identifierPrefix),w.onRecoverableError!==void 0&&(ae=w.onRecoverableError)),f=j2(f,null,l,1,w??null,U,!1,q,ae),l[Us]=f.current,eu(l),T)for(l=0;l<T.length;l++)w=T[l],U=w._getVersion,U=U(w._source),f.mutableSourceEagerHydrationData==null?f.mutableSourceEagerHydrationData=[w,U]:f.mutableSourceEagerHydrationData.push(w,U);return new $m(f)},So.render=function(l,f,w){if(!Um(f))throw Error(n(200));return Vm(null,l,f,!1,w)},So.unmountComponentAtNode=function(l){if(!Um(l))throw Error(n(40));return l._reactRootContainer?(wl(function(){Vm(null,null,l,!1,function(){l._reactRootContainer=null,l[Us]=null})}),!0):!1},So.unstable_batchedUpdates=lb,So.unstable_renderSubtreeIntoContainer=function(l,f,w,T){if(!Um(w))throw Error(n(200));if(l==null||l._reactInternals===void 0)throw Error(n(38));return Vm(l,f,w,!1,T)},So.version="18.2.0-next-9e3b772b8-20220608",So}var Y7;function oL(){if(Y7)return h8.exports;Y7=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),h8.exports=Qee(),h8.exports}var Z7;function Jee(){if(Z7)return i5;Z7=1;var e=oL();return i5.createRoot=e.createRoot,i5.hydrateRoot=e.hydrateRoot,i5}var aL=Jee();const ete=va(aL);function js(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const i=e[n];return typeof i=="function"?i:s=>t(e,s)}const R5="2.22.1",tte=()=>`@wagmi/core@${R5}`;var cL=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},o6,uL;let md=class LS extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return tte()}constructor(t,n={}){super(),o6.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const r=n.cause instanceof LS?n.cause.details:n.cause?.message?n.cause.message:n.details,i=n.cause instanceof LS&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: ${this.docsBaseUrl}${i}.html${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(`
70`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return cL(this,o6,"m",uL).call(this,this,t)}};o6=new WeakSet,uL=function e(t,n){return n?.(t)?t:t.cause?cL(this,o6,"m",e).call(this,t.cause,n):t};class Wp extends md{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class nte extends md{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class Q9 extends md{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class rte extends md{constructor({address:t,connector:n}
70){super(`Account "${t}" not found for connector "${n.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class ite extends md{constructor({connectionChainId:t,connectorChainId:n}){super(`The current chain of the connector (id: ${n}) does not match the connection's chain (id: ${t}).`,{metaMessages:[`Current Chain ID:  ${n}`,`Expected Chain ID: ${t}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class ste extends md{constructor({connector:t}){super(`Connector "${t.name}" unavailable while reconnecting.`,{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}async function ote(e,t){let n;if(typeof t.connector=="function"?n=e._internal.connectors.setup(t.connector):n=t.connector,n.uid===e.state.current)throw new nte;try{e.setState(o=>({...o,status:"connecting"})),n.emitter.emit("message",{type:"connecting"});const{connector:r,...i}=t,s=await n.connect(i);return n.emitter.off("connect",e._internal.events.connect),n.emitter.on("change",e._internal.events.change),n.emitter.on("disconnect",e._internal.events.disconnect),await e.storage?.setItem("recentConnectorId",n.id),e.setState(o=>({...o,connections:new Map(o.connections).set(n.uid,{accounts:i.withCapabilities?s.accounts.map(a=>typeof a=="object"?a.address:a):s.accounts,chainId:s.chainId,connector:n}),current:n.uid,status:"connected"})),{accounts:i.withCapabilities?s.accounts.map(o=>typeof o=="object"?o:{address:o,capabilities:{}}):s.accounts,chainId:s.chainId}}catch(r){throw e.setState(i=>({...i,status:i.current?"connected":"disconnected"})),r}}async function c0(e,t={}){const{assertChainId:n=!0}=t;let r;if(t.connector){const{connector:h}=t;if(e.state.status==="reconnecting"&&!h.getAccounts&&!h.getChainId)throw new ste({connector:h});const[y,g]=await Promise.all([h.getAccounts().catch(x=>
70{if(t.account===null)return[];throw x}),h.getChainId()]);r={accounts:y,chainId:g,connector:h}}else r=e.state.connections.get(e.state.current);if(!r)throw new Q9;const i=t.chainId??r.chainId,s=await r.connector.getChainId();if(n&&s!==i)throw new ite({connectionChainId:i,connectorChainId:s});const o=r.connector;if(o.getClient)return o.getClient({chainId:i});const a=co(t.account??r.accounts[0]);if(a&&(a.address=Qi(a.address)),t.account&&!r.accounts.some(h=>h.toLowerCase()===a.address.toLowerCase()))throw new rte({address:a.address,connector:o});const c=e.chains.find(h=>h.id===i),d=await r.connector.getProvider({chainId:i});return E9({account:a,chain:c,name:"Connector Client",transport:h=>oQ(d)({...h,retryCount:0})})}async function ate(e,t={}){let n;if(t.connector)n=t.connector;else{const{connections:i,current:s}=e.state;n=i.get(s)?.connector}const r=e.state.connections;n&&(await n.disconnect(),n.emitter.off("change",e._internal.events.change),n.emitter.off("disconnect",e._internal.events.disconnect),n.emitter.on("connect",e._internal.events.connect),r.delete(n.uid)),e.setState(i=>{if(r.size===0)return{...i,connections:new Map,current:null,status:"disconnected"};const s=r.values().next().value;return{...i,connections:new Map(r),current:s.connector.uid}});{const i=e.state.current;if(!i)return;const s=e.state.connections.get(i)?.connector;if(!s)return;await e.storage?.setItem("recentConnectorId",s.id)}}function lL(e){return typeof e=="number"?e:e==="wei"?0:Math.abs(dG[e])}function v3(e){const t=e.state.current,n=e.state.connections.get(t),r=n?.accounts,i=r?.[0],s=e.chains.find(a=>a.id===n?.chainId),o=e.state.status;switch(o){case"connected":return{address:i,addresses:r,chain:s,chainId:n?.chainId,connector:n?.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:o};case"reconnecting":return{address:i,addresses:r,chain:s,chainId:n?.chainId,connector:n?.connector,isConnected:!!i,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:o};case"connecting":return{address:i,addresses:r,chain:s,chainId:n?.chainId,connector:n?.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:o};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:o}}}async function cte(e,t){const{allowFailure:n=!0,chainId:r,contracts:i,...s}=t,o=e.getClient({chainId:r});return js(o,jX,"multicall")({allowFailure:n,contracts:i,...s})}function dL(e,t){const{chainId:n,...r}=t,i=e.getClient({chainId:n});return js(i,a3,"readContract")(r)}async function fL(e,t){const{allowFailure:n=!0,blockNumber:r,blockTag:i,...s}=t,o=t.contracts;try{const a={};for(const[y,g]of o.entries()){const x=g.chainId??e.state.chainId;a[x]||(a[x]=[]),a[x]?.push({contract:g,index:y})}const c=()=>Object.entries(a).map(([y,g])=>cte(e,{...s,allowFailure:n,blockNumber:r,blockTag:i,chainId:Number.parseInt(y,10),contracts:g.map(({contract:x})=>x)})),d=(await Promise.all(c())).flat(),h=Object.values(a).flatMap(y=>y.map(({index:g})=>g));return d.reduce((y,g,x)=>(y&&(y[h[x]]=g),y),[])}catch(a){if(a instanceof r9)throw a;const c=()=>o.map(d=>dL(e,{...d,blockNumber:r,blockTag:i}));return n?(await Promise.allSettled(c())).map(d=>d.status==="fulfilled"?{result:d.value,status:"success"}:{error:d.reason,result:void 0,status:"failure"}):await Promise.all(c())}}async function ute(e,t){const{address:n,blockNumber:r,blockTag:i,chainId:s,token:o,unit:a="ether"}=t;if(o)try{return await X7(e,{balanceAddress:n,chainId:s,symbolType:"string",tokenAddress:o})}catch(g){if(g.name==="ContractFunctionExecutionError"){const x=await X7(e,{balanceAddress:n,chainId:s,symbolType:"bytes32",tokenAddress:o}),_=nj(io(x.symbol,{dir:"right"}));return{...x,symbol:_}}throw g}const c=e.getClient({chainId:s}),h=await js(c,aY,"getBalance")(r?{address:n,blockNumber:r}:{address:n,blockTag:i}),y=e.chains.find(g=>g.id===s)??c.chain;return{decimals:y.nativeCurrency.decimals,formatted:Ns(h,lL(a)),symbol:y.nativeCurrency.symbol,value:h}}async function X7(e,t){const{balanceAddress:n,chainId:r,symbolType:i,tokenAddress:s,unit:o}=t,a={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:i}]}],address:s},[c,d,h]=await fL(e,{allowFailure:!1,contracts:[{...a,functionName:"balanceOf",args:[n],chainId:r},{...a,functionName:"decimals",chainId:r},{...a,functionName:"symbol",chainId:r}]}),y=Ns(c??"0",lL(o??d));return{decimals:d,formatted:y,symbol:h,value:c}}async function hL(e,t={}){const{chainId:n,...r}=t,i=e.getClient({chainId:n});return{...await js(i,Du,"getBlock")(r),chainId:i.chain.id}}function lte(e,t={}){const{chainId:n,...r}=t,i=e.getClient({chainId:n});return js(i,hP,"getBlockNumber")(r)}async function dte(e,t){const{chainId:n,...r}=t,i=e.getClient({chainId:n});return js(i,wP,"getBytecode")(r)}async function fte(e,t={}){const{account:n,chainId:r,connector:i}=t,s=await c0(e,{account:n,connector:i});return iQ(s,{account:n,chainId:r})}function BS(e){return e.state.chainId}function dg(e,t){if(e===t)return!0;
70if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)&&Array.isArray(t)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!dg(e[r],t[r]))return!1;return!0}if(typeof e.valueOf=="function"&&e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(typeof e.toString=="function"&&e.toString!==Object.prototype.toString)return e.toString()===t.toString();const i=Object.keys(e);if(n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.hasOwn(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(s&&!dg(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function hte(e,t={}){try{return e.getClient(t)}catch{return}}let s5=[];function FS(e){const t=[...e.state.connections.values()];return e.state.status==="reconnecting"||dg(s5,t)?s5:(s5=t,t)}let o5=[];function Q7(e){const t=e.connectors;return o5.length===t.length&&o5.every((n,r)=>n===t[r])?o5:(o5=t,t)}let y8=!1;async function pte(e,t={}){if(y8)return[];y8=!0,e.setState(d=>({...d,status:d.current?"reconnecting":"connecting"}));const n=[];if(t.connectors?.length)for(const d of t.connectors){let h;typeof d=="function"?h=e._internal.connectors.setup(d):h=d,n.push(h)}else n.push(...e.connectors);let r;try{r=await e.storage?.getItem("recentConnectorId")}catch{}const i={};for(const[,d]of e.state.connections)i[d.connector.id]=1;r&&(i[r]=0);const s=Object.keys(i).length>0?[...n].sort((d,h)=>(i[d.id]??10)-(i[h.id]??10)):n;let o=!1;const a=[],c=[];for(const d of s){const h=await d.getProvider().catch(()=>{});if(!h||c.some(x=>x===h)||!await d.isAuthorized())continue;const g=await d.connect({isReconnecting:!0}).catch(()=>null);g&&(d.emitter.off("connect",e._internal.events.connect),d.emitter.on("change",e._internal.events.change),d.emitter.on("disconnect",e._internal.events.disconnect),e.setState(x=>{const _=new Map(o?x.connections:new Map).set(d.uid,{accounts:g.accounts,chainId:g.chainId,connector:d});return{...x,current:o?x.current:d.uid,connections:_}}),a.push({accounts:g.accounts,chainId:g.chainId,connector:d}),c.push(h),o=!0)}return(e.state.status==="reconnecting"||e.state.status==="connecting")&&(o?e.setState(d=>({...d,status:"connected"})):e.setState(d=>({...d,connections:new Map,current:null,status:"disconnected"}))),y8=!1,a}async function mte(e,t){const{account:n,chainId:r,connector:i,calls:s,...o}=t,a=await c0(e,{account:n,assertChainId:!1,chainId:r,connector:i});return js(a,rY,"sendCalls")({...o,...typeof n<"u"?{account:n}:{},calls:s,chain:r?{id:r}:void 0})}async function yte(e,t){const{account:n,connector:r,...i}=t;let s;return typeof n=="object"&&n.type==="local"?s=e.getClient():s=await c0(e,{account:n,connector:r}),js(s,sQ,"signMessage")({...i,...n?{account:n}:{}})}async function gte(e,t){const{abi:n,chainId:r,connector:i,...s}=t;let o;t.account?o=t.account:o=(await c0(e,{assertChainId:!1,chainId:r,connector:i})).account;const a=e.getClient({chainId:r}),c=js(a,WK,"simulateContract"),{result:d,request:h}=await c({...s,abi:n,account:o});return{chainId:a.chain.id,result:d,request:{...h,chainId:r}}}class Xa extends md{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class bte extends md{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function xte(e,t){const{addEthereumChainParameter:n,chainId:r}=t,i=e.state.connections.get(t.connector?.uid??e.state.current);if(i){const o=i.connector;if(!o.switchChain)throw new bte({connector:o});return await o.switchChain({addEthereumChainParameter:n,chainId:r})}const s=e.chains.find(o=>o.id===r);if(!s)throw new Wp;return e.setState(o=>({...o,chainId:r})),s}async function vte(e,t){const{chainId:n,...r}=t,i=e.getClient({chainId:n});return js(i,tQ,"verifyMessage")(r)}async function wte(e,t){const{connector:n}=t,r=await c0(e,{connector:n});return sY(r,t)}async function Ete(e,t){const{chainId:n,timeout:r=0,...i}=t,s=e.getClient({chainId:n}),a=await js(s,nQ,"waitForTransactionReceipt")({...i,timeout:r});if(a.status==="reverted"){const c=js(s,P9,"getTransaction"),{from:
70d,...h}=await c({hash:a.transactionHash}),g=await js(s,o3,"call")({...h,account:d,data:h.input,gasPrice:h.type!=="eip1559"?h.gasPrice:void 0,maxFeePerGas:h.type==="eip1559"?h.maxFeePerGas:void 0,maxPriorityFeePerGas:h.type==="eip1559"?h.maxPriorityFeePerGas:void 0}),x=g?.data?nj(`0x${g.data.substring(138)}`):"unknown reason";throw new Error(x)}return{...a,chainId:s.chain.id}}function _te(e,t){const{onChange:n}=t;return e.subscribe(()=>v3(e),n,{equalityFn(r,i){const{connector:s,...o}=r,{connector:a,...c}=i;return dg(o,c)&&s?.id===a?.id&&s?.uid===a?.uid}})}function Ste(e,t){const{syncConnectedChain:n=e._internal.syncConnectedChain,...r}=t;let i;const s=c=>{i&&i();const d=e.getClient({chainId:c});return i=js(d,uO,"watchBlockNumber")(r),i},o=s(t.chainId);let a;return n&&!t.chainId&&(a=e.subscribe(({chainId:c})=>c,async c=>s(c))),()=>{o?.(),a?.()}}function Tte(e,t){const{syncConnectedChain:n=e._internal.syncConnectedChain,...r}=t;let i;const s=c=>{i&&i();const d=e.getClient({chainId:c});return i=js(d,rQ,"watchBlocks")(r),i},o=s(t.chainId);let a;return n&&!t.chainId&&(a=e.subscribe(({chainId:c})=>c,async c=>s(c))),()=>{o?.(),a?.()}}function Ate(e,t){const{onChange:n}=t;return e.subscribe(r=>r.chainId,n)}function kte(e,t){const{onChange:n}=t;return e.subscribe(()=>FS(e),n,{equalityFn:dg})}function Cte(e,t){const{onChange:n}=t;return e._internal.connectors.subscribe((r,i)=>{n(Object.values(r),i)})}async function Ite(e,t){const{account:n,chainId:r,connector:i,...s}=t;let o;return typeof n=="object"&&n?.type==="local"?o=e.getClient({chainId:r}):o=await c0(e,{account:n??void 0,assertChainId:!1,chainId:r,connector:i}),await js(o,Q5,"writeContract")({...s,...n?{account:n}:{},chain:r?{id:r}:null})}Mv.type="injected";function Mv(e={}){const{shimDisconnect:t=!0,unstable_shimAsyncInject:n}=e;function r(){const c=e.target;if(typeof c=="function"){const d=c();if(d)return d}return typeof c=="object"?c:typeof c=="string"?{...Rte[c]??{id:c,name:`${c[0].toUpperCase()}${c.slice(1)}`,provider:`is${c[0].toUpperCase()}${c.slice(1)}`}}:{id:"injected",name:"Injected",provider(d){return d?.ethereum}}}let i,s,o,a;return c=>({get icon(){return r().icon},get id(){return r().id},get name(){return r().name},get supportsSimulation(){return!0},type:Mv.type,async setup(){const d=await this.getProvider();d?.on&&e.target&&(o||(o=this.onConnect.bind(this),d.on("connect",o)),i||(i=this.onAccountsChanged.bind(this),d.on("accountsChanged",i)))},async connect({chainId:d,isReconnecting:h,withCapabilities:y}={}){const g=await this.getProvider();if(!g)throw new Xa;let x=[];if(h)x=await this.getAccounts().catch(()=>[]);else if(t)try{x=(await g.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0]?.caveats?.[0]?.value?.map(S=>Qi(S)),x.length>0&&(x=await this.getAccounts())}catch(_){const S=_;if(S.code===Ur.code)throw new Ur(S);if(S.code===Hf.code)throw S}try{!x?.length&&!h&&(x=(await g.request({method:"eth_requestAccounts"})).map(I=>Qi(I))),o&&(g.removeListener("connect",o),o=void 0),i||(i=this.onAccountsChanged.bind(this),g.on("accountsChanged",i)),s||(s=this.onChainChanged.bind(this),g.on("chainChanged",s)),a||(a=this.onDisconnect.bind(this),g.on("disconnect",a));let _=await this.getChainId();return d&&_!==d&&(_=(await this.switchChain({chainId:d}).catch(I=>{if(I.code===Ur.code)throw I;return{id:_}}))?.id??_),t&&await c.storage?.removeItem(`${this.id}.disconnected`),e.target||await c.storage?.setItem("injected.connected",!0),{accounts:y?x.map(S=>({address:S,capabilities:{}})):x,chainId:_}}catch(_){const S=_;throw S.code===Ur.code?new Ur(S):S.code===Hf.code?new Hf(S):S}},async disconnect(){const d=await this.getProvider();if(!d)throw new Xa;s&&(d.removeListener("chainChanged",s),s=void 0),a&&(d.removeListener("disconnect",a),a=void 0),o||(o=this.onConnect.bind(this),d.on("connect",o));try{await S9(()=>d.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}t&&await c.storage?.setItem(`${this.id}.disconnected`,!0),e.target||await c.storage?.removeItem("injected.connected")},async getAccounts(){const d=await this.getProvider();if(!d)throw new Xa;return(await d.request({method:"eth_accounts"})).map(y=>Qi(y))},async getChainId(){const d=await this.getProvider();if(!d)throw new Xa;const h=await d.request({method:"eth_chainId"});return Number(h)}
70,async getProvider(){if(typeof window>"u")return;let d;const h=r();return typeof h.provider=="function"?d=h.provider(window):typeof h.provider=="string"?d=M5(window,h.provider):d=h.provider,d&&!d.removeListener&&("off"in d&&typeof d.off=="function"?d.removeListener=d.off:d.removeListener=()=>{}),d},async isAuthorized(){try{if(t&&await c.storage?.getItem(`${this.id}.disconnected`)||!e.target&&!await c.storage?.getItem("injected.connected"))return!1;if(!await this.getProvider()){if(n!==void 0&&n!==!1){const g=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",g),!!await this.getProvider()),x=typeof n=="number"?n:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(S=>window.addEventListener("ethereum#initialized",()=>S(g()),{once:!0}))]:[],new Promise(S=>setTimeout(()=>S(g()),x))]))return!0}throw new Xa}return!!(await Rx(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:d,chainId:h}){const y=await this.getProvider();if(!y)throw new Xa;const g=c.chains.find(_=>_.id===h);if(!g)throw new rc(new Wp);const x=new Promise(_=>{const S=(I=>{"chainId"in I&&I.chainId===h&&(c.emitter.off("change",S),_())});c.emitter.on("change",S)});try{return await Promise.all([y.request({method:"wallet_switchEthereumChain",params:[{chainId:ot(h)}]}).then(async()=>{await this.getChainId()===h&&c.emitter.emit("change",{chainId:h})}),x]),g}catch(_){const S=_;if(S.code===4902||S?.data?.originalError?.code===4902)try{const{default:I,...L}=g.blockExplorers??{};let D;d?.blockExplorerUrls?D=d.blockExplorerUrls:I&&(D=[I.url,...Object.values(L).map(z=>z.url)]);let F;d?.rpcUrls?.length?F=d.rpcUrls:F=[g.rpcUrls.default?.http[0]??""];const $={blockExplorerUrls:D,chainId:ot(h),chainName:d?.chainName??g.name,iconUrls:d?.iconUrls,nativeCurrency:d?.nativeCurrency??g.nativeCurrency,rpcUrls:F};return await Promise.all([y.request({method:"wallet_addEthereumChain",params:[$]}).then(async()=>{if(await this.getChainId()===h)c.emitter.emit("change",{chainId:h});else throw new Ur(new Error("User rejected switch after adding network."))}),x]),g}catch(I){throw new Ur(I)}throw S.code===Ur.code?new Ur(S):new rc(S)}},async onAccountsChanged(d){if(d.length===0)this.onDisconnect();else if(c.emitter.listenerCount("connect")){const h=(await this.getChainId()).toString();this.onConnect({chainId:h}),t&&await c.storage?.removeItem(`${this.id}.disconnected`)}else c.emitter.emit("change",{accounts:d.map(h=>Qi(h))})},onChainChanged(d){const h=Number(d);c.emitter.emit("change",{chainId:h})},async onConnect(d){const h=await this.getAccounts();if(h.length===0)return;const y=Number(d.chainId);c.emitter.emit("connect",{accounts:h,chainId:y});const g=await this.getProvider();g&&(o&&(g.removeListener("connect",o),o=void 0),i||(i=this.onAccountsChanged.bind(this),g.on("accountsChanged",i)),s||(s=this.onChainChanged.bind(this),g.on("chainChanged",s)),a||(a=this.onDisconnect.bind(this),g.on("disconnect",a)))},async onDisconnect(d){const h=await this.getProvider();d&&d.code===1013&&h&&(await this.getAccounts()).length||(c.emitter.emit("disconnect"),h&&(s&&(h.removeListener("chainChanged",s),s=void 0),a&&(h.removeListener("disconnect",a),a=void 0),o||(o=this.onConnect.bind(this),h.on("connect",o))))}})}const Rte={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(e){return e?.coinbaseWalletExtension?e.coinbaseWalletExtension:M5(e,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(e){return M5(e,t=>{if(!t.isMetaMask||t.isBraveWallet&&!t._events&&!t._state)return!1;const n=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const r of n)if(t[r])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(e){return e?.phantom?.ethereum?e.phantom?.ethereum:M5(e,"isPhantom")}}};function M5(e,t){function n(i){return typeof t=="function"?t(i):typeof t=="string"?i[t]:!0}const r=e.ethereum;if(r?.providers)return r.providers.find(i=>n(i));if(r&&n(r))return r}function Mte(e){if(typeof window>"u")return;const t=n=>e(n.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}function Nte(){const e=new Set;let t=[];const n=()=>Mte(i=>{t.some(({info:s})=>s.uuid===i.info.uuid)||(t=[...t,i],e.forEach(s=>s(t,{added:[i]})))});let r=n();return{_listeners(){return e},clear(){e.forEach(i=>
70i([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),r?.()},findProvider({rdns:i}){return t.find(s=>s.info.rdns===i)},getProviders(){return t},reset(){this.clear(),r?.(),r=n()},subscribe(i,{emitImmediately:s}={}){return e.add(i),s&&i(t,{added:t}),()=>e.delete(i)}}}const jte=e=>(t,n,r)=>{const i=r.subscribe;return r.subscribe=(o,a,c)=>{let d=o;if(a){const h=c?.equalityFn||Object.is;let y=o(r.getState());d=g=>{const x=o(g);if(!h(y,x)){const _=y;a(y=x,_)}},c?.fireImmediately&&a(y,y)}return i(d)},e(t,n,r)},Pte=jte;function Ote(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var s;const o=c=>c===null?null:JSON.parse(c,void 0),a=(s=n.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>n.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>n.removeItem(i)}}const DS=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return DS(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return DS(r)(n)}}}},Lte=(e,t)=>(n,r,i)=>{let s={storage:Ote(()=>localStorage),partialize:S=>S,version:0,merge:(S,I)=>({...I,...S}),...t},o=!1;const a=new Set,c=new Set;let d=s.storage;if(!d)return e((...S)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...S)},r,i);const h=()=>{const S=s.partialize({...r()});return d.setItem(s.name,{state:S,version:s.version})},y=i.setState;i.setState=(S,I)=>{y(S,I),h()};const g=e((...S)=>{n(...S),h()},r,i);i.getInitialState=()=>g;let x;const _=()=>{var S,I;if(!d)return;o=!1,a.forEach(D=>{var F;return D((F=r())!=null?F:g)});const L=((I=s.onRehydrateStorage)==null?void 0:I.call(s,(S=r())!=null?S:g))||void 0;return DS(d.getItem.bind(d))(s.name).then(D=>
70{if(D)if(typeof D.version=="number"&&D.version!==s.version){if(s.migrate)return[!0,s.migrate(D.state,D.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,D.state];return[!1,void 0]}).then(D=>{var F;const[$,z]=D;if(x=s.merge(z,(F=r())!=null?F:g),n(x,!0),$)return h()}).then(()=>{L?.(x,void 0),x=r(),o=!0,c.forEach(D=>D(x))}).catch(D=>{L?.(void 0,D)})};return i.persist={setOptions:S=>{s={...s,...S},S.storage&&(d=S.storage)},clearStorage:()=>{d?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>_(),hasHydrated:()=>o,onHydrate:S=>(a.add(S),()=>{a.delete(S)}),onFinishHydration:S=>(c.add(S),()=>{c.delete(S)})},s.skipHydration||_(),x||g},Bte=Lte,J7=e=>{let t;const n=new Set,r=(d,h)=>{const y=typeof d=="function"?d(t):d;if(!Object.is(y,t)){const g=t;t=h??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(x=>x(t,g))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d))},c=t=e(r,i,a);return a},g8=e=>e?J7(e):J7;var b8={exports:{}},eI;function Fte(){return eI||(eI=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,d,h){this.fn=c,this.context=d,this.once=h||!1}function s(c,d,h,y,g){if(typeof h!="function")throw new TypeError("The listener must be a function");var x=new i(h,y||c,g),_=n?n+d:d;return c._events[_]?c._events[_].fn?c._events[_]=[c._events[_],x]:c._events[_].push(x):(c._events[_]=x,c._eventsCount++),c}function o(c,d){--c._eventsCount===0?c._events=new r:delete c._events[d]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var d=[],h,y;if(this._eventsCount===0)return d;for(y in h=this._events)t.call(h,y)&&d.push(n?y.slice(1):y);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},a.prototype.listeners=function(d){var h=n?n+d:d,y=this._events[h];if(!y)return[];if(y.fn)return[y.fn];for(var g=0,x=y.length,_=new Array(x);g<x;g++)_[g]=y[g].fn;return _},a.prototype.listenerCount=function(d){var h=n?n+d:d,y=this._events[h];return y?y.fn?1:y.length:0},a.prototype.emit=function(d,h,y,g,x,_){var S=n?n+d:d;if(!this._events[S])return!1;var I=this._events[S],L=arguments.length,D,F;if(I.fn){switch(I.once&&this.removeListener(d,I.fn,void 0,!0),L){case 1:return I.fn.call(I.context),!0;case 2:return I.fn.call(I.context,h),!0;case 3:return I.fn.call(I.context,h,y),!0;case 4:return I.fn.call(I.context,h,y,g),!0;case 5:return I.fn.call(I.context,h,y,g,x),!0;case 6:return I.fn.call(I.context,h,y,g,x,_),!0}for(F=1,D=new Array(L-1);F<L;F++)D[F-1]=arguments[F];I.fn.apply(I.context,D)}else{var $=I.length,z;for(F=0;F<$;F++)switch(I[F].once&&this.removeListener(d,I[F].fn,void 0,!0),L){case 1:I[F].fn.call(I[F].context);break;case 2:I[F].fn.call(I[F].context,h);break;case 3:I[F].fn.call(I[F].context,h,y);break;case 4:I[F].fn.call(I[F].context,h,y,g);break;default:if(!D)for(z=1,D=new Array(L-1);z<L;z++)D[z-1]=arguments[z];I[F].fn.apply(I[F].context,D)}}return!0},a.prototype.on=function(d,h,y){return s(this,d,h,y,!1)},a.prototype.once=function(d,h,y){return s(this,d,h,y,!0)},a.prototype.removeListener=function(d,h,y,g){var x=n?n+d:d;if(!this._events[x])return this;if(!h)return o(this,x),this;var _=this._events[x];if(_.fn)_.fn===h&&(!g||_.once)&&(!y||_.context===y)&&o(this,x);else{for(var S=0,I=[],L=_.length;S<L;S++)(_[S].fn!==h||g&&!_[S].once||y&&_[S].context!==y)&&I.push(_[S]);I.length?this._events[x]=I.length===1?I[0]:I:o(this,x)}return this},a.prototype.removeAllListeners=function(d){var h;return d?(h=n?n+d:d,this._events[h]&&o(this,h)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a})(b8)),b8.exports}var Dte=Fte();const Nv=va(Dte);class $te{constructor(t){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new Nv})}on(t,n){this._emitter.on(t,n)}once(t,n){this._emitter.once(t,n)}off(t,n){this._emitter.off(t,n)}emit(t,...n){const r=n[0];this._emitter.emit(t,{uid:this.uid,...r})}listenerCount(t){return this._emitter.listenerCount(t)}}function Ute(e){return new $te(e)}function zte(e,t){return JSON.parse(e,(n,r)=>{let i=r;return i?.__type==="bigint"&&(i=BigInt(i.value)),i?.__type==="Map"&&(i=new Map(i.value)),t?.(n,i)??i})}function tI(e,t){return e.slice(0,t).join(".")||"."}function nI(e,t){const{length:n}=e;for(let r=0;r<n;++r)if(e[r]===t)return r+1;return 0}function Vte(e,t){const n=typeof e=="function",r=typeof t=="function",i=[],s=[];return function(a,c){if(typeof c=="object")if(i.length){const d=nI(i,this);d===0?i[i.length]=this:(i.splice(d),s.splice(d)),s[s.length]=a;const h=nI(i,c);if(h!==0)return r?t.call(this,a,c,tI(s,h)):`[ref=${tI(s,h)}]`}else i[0]=c,s[0]=a;return n?e.call(this,a,c):c}}function Gp(e,t,n,r){return JSON.stringify(e,Vte((i,s)=>{let o=s;return typeof o=="bigint"&&(o={__type:"bigint",value:s.toString()}),o instanceof Map&&(o={__type:"Map",value:Array.from(s.entries())}),t?.(i,o)??o},r),n??void 0)}function pL(e){const{deserialize:t=zte,key:n="wagmi",serialize:r=Gp,storage:i=J9}=e;function s(o){return o instanceof Promise?o.then(a=>a).catch(()=>null):o}return{...i,key:n,async getItem(o,a){const c=i.getItem(`${n}.${o}`),d=await s(c);return d?t(d)??null:a??null},async setItem(o,a){const c=`${n}.${o}`;a===null?await s(i.removeItem(c)):await s(i.setItem(c,r(a)))},async removeItem(o){await s(i.removeItem(`${n}.${o}`))}}}const J9={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function qte(){const e=typeof window<"u"&&window.localStorage?window.localStorage:J9;return{getItem(t){return e.getItem(t)},removeItem(t){e.removeItem(t)},setItem(t,n){try{e.setItem(t,n)}catch{}}}}const $S=256;let a5=$S,c5;function Hte(e=11){if(!c5||a5+e>$S*2){c5="",a5=0;for(let t=0;t<$S;t++)c5+=(256+Math.random()*256|0).toString(16).substring(1)}return c5.substring(a5,a5+++e)}function Wte(e){const{multiInjectedProviderDiscovery:t=!0,storage:n=pL({storage:qte()}),syncConnectedChain:r=!0,ssr:i=!1,...s}=e,o=typeof window<"u"&&t?Nte():void 0,a=g8(()=>s.chains),c=g8(()=>{const z=[],V=new Set;for(const K of s.connectors??[]){const te=d(K);if(z.push(te),!i&&te.rdns){const Q=typeof te.rdns=="string"?[te.rdns]:te.rdns;for(const ee of Q)V.add(ee)}}if(!i&&o){const K=o.getProviders();for(const te of K)V.has(te.info.rdns)||z.push(d(h(te)))}return z});function d(z){const V=Ute(Hte()),K={...z({emitter:V,chains:a.getState(),storage:n,transports:s.transports}),emitter:V,uid:V.uid};return V.on("connect",F),K.setup?.(),K}function h(z){const{info:V}=z,K=z.provider;return Mv({target:{...V,id:V.rdns,provider:K}})}const y=new Map;function g(z={}){const V=z.chainId??I.getState().chainId,K=a.getState().find(Q=>Q.id===V);if(z.chainId&&!K)throw new Wp;{const Q=y.get(I.getState().chainId);if(Q&&!K)return Q;if(!K)throw new Wp}{const Q=y.get(V);if(Q)return Q}let te;if(s.client)te=s.client({chain:K});else{const Q=K.id,ee=a.getState().map(M=>M.id),ne={},J=Object.entries(s);for(const[M,m]of J)if(!(M==="chains"||M==="client"||M==="connectors"||M==="transports"))if(typeof m=="object")if(Q in m)ne[M]=m[Q];else{if(ee.some(C=>C in m))continue;ne[M]=m}else ne[M]=m;te=E9({...ne,chain:K,batch:ne.batch??{multicall:!0},transport:M=>s.transports[Q]({...M,connectors:c})})}return y.set(V,te),te}function x(){return{chainId:a.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let _;const S="0.0.0-canary-";R5.startsWith(S)?_=Number.parseInt(R5.replace(S,""),10):_=Number.parseInt(R5.split(".")[0]??"0",10);const I=g8(Pte(n?Bte(x,{migrate(z,V){if(V===_)return z;const K=x(),te=L(z,K.chainId);return{...K,chainId:te}},name:"store",partialize(z){return{connections:{__type:"Map",value:Array.from(z.connections.entries()).map(([V,K])=>{const{id:te,name:Q,type:ee,uid:ne}=K.connector;return[V,{...K,connector:{id:te,name:Q,type:ee,uid:ne}}]})},chainId:z.chainId,current:z.current}},merge(z,V){typeof z=="object"&&z&&"status"in z&&delete z.status;const K=L(z,V.chainId);return{...V,...z,chainId:K}},skipHydration:i,storage:n,version:_}):x));I.setState(x());function L(z,V){return z&&typeof z=="object"&&"chainId"in z&&typeof z.chainId=="number"&&a.getState().some(K=>K.id===z.chainId)?z.chainId:V}r&&I.subscribe(({connections:z,current:V})=>V?z.get(V)?.chainId:void 0,z=>{if(a.getState().some(K=>K.id===z))return I.setState(K=>({...K,chainId:z??K.chainId}))}),o?.subscribe(z=>{const V=new Set,K=new Set;for(const Q of c.getState())if(V.add(Q.id),Q.rdns){const ee=typeof Q.rdns=="string"?[Q.rdns]:Q.rdns;for(const ne of ee)K.add(ne)}const te=[];for(const Q of z){if(K.has(Q.info.rdns))continue;const ee=d(h(Q));V.has(ee.id)||te.push(ee)}n&&!I.persist.hasHydrated()||c.setState(Q=>[...Q,...te],!0)});function D(z){I.setState(V=>{const K=V.connections.get(z.uid);return K?{...V,connections:new Map(V.connections).set(z.uid,{accounts:z.accounts??K.accounts,chainId:z.chainId??K.chainId,connector:K.connector})}:V})}
70function F(z){I.getState().status==="connecting"||I.getState().status==="reconnecting"||I.setState(V=>{const K=c.getState().find(te=>te.uid===z.uid);return K?(K.emitter.listenerCount("connect")&&K.emitter.off("connect",D),K.emitter.listenerCount("change")||K.emitter.on("change",D),K.emitter.listenerCount("disconnect")||K.emitter.on("disconnect",$),{...V,connections:new Map(V.connections).set(z.uid,{accounts:z.accounts,chainId:z.chainId,connector:K}),current:z.uid,status:"connected"}):V})}function $(z){I.setState(V=>{const K=V.connections.get(z.uid);if(K){const Q=K.connector;Q.emitter.listenerCount("change")&&K.connector.emitter.off("change",D),Q.emitter.listenerCount("disconnect")&&K.connector.emitter.off("disconnect",$),Q.emitter.listenerCount("connect")||K.connector.emitter.on("connect",F)}if(V.connections.delete(z.uid),V.connections.size===0)return{...V,connections:new Map,current:null,status:"disconnected"};const te=V.connections.values().next().value;return{...V,connections:new Map(V.connections),current:te.connector.uid}})}return{get chains(){return a.getState()},get connectors(){return c.getState()},storage:n,getClient:g,get state(){return I.getState()},setState(z){let V;typeof z=="function"?V=z(I.getState()):V=z;const K=x();typeof V!="object"&&(V=K),Object.keys(K).some(Q=>!(Q in V))&&(V=K),I.setState(V,!0)},subscribe(z,V,K){return I.subscribe(z,V,K?{...K,fireImmediately:K.emitImmediately}:void 0)},_internal:{mipd:o,async revalidate(){const z=I.getState(),V=z.connections;let K=z.current;for(const[,te]of V){const Q=te.connector;Q.isAuthorized&&await Q.isAuthorized()||(V.delete(Q.uid),K===Q.uid&&(K=null))}I.setState(te=>({...te,connections:V,current:K}))},store:I,ssr:!!i,syncConnectedChain:r,transports:s.transports,chains:{setState(z){const V=typeof z=="function"?z(a.getState()):z;if(V.length!==0)return a.setState(V,!0)},subscribe(z){return a.subscribe(z)}},connectors:{providerDetailToConnector:h,setup:d,setState(z){return c.setState(typeof z=="function"?z(c.getState()):z,!0)},subscribe(z){return c.subscribe(z)}},events:{change:D,connect:F,disconnect:$}}}}function Gte(e,t){const{initialState:n,reconnectOnMount:r}=t;return n&&!e._internal.store.persist.hasHydrated()&&e.setState({...n,chainId:e.chains.some(i=>i.id===n.chainId)?n.chainId:e.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"}),{async onMount(){e._internal.ssr&&(await e._internal.store.persist.rehydrate(),e._internal.mipd&&e._internal.connectors.setState(i=>{const s=new Set;for(const c of i??[])if(c.rdns){const d=Array.isArray(c.rdns)?c.rdns:[c.rdns];for(const h of d)s.add(h)}const o=[],a=e._internal.mipd?.getProviders()??[];for(const c of a){if(s.has(c.info.rdns))continue;const d=e._internal.connectors.providerDetailToConnector(c),h=e._internal.connectors.setup(d);o.push(h)}return[...i,...o]})),r?pte(e):e.storage&&e.setState(i=>({...i,connections:new Map}))}}}function Kte(e){const{chain:t}=e,n=t.rpcUrls.default.http[0];if(!e.transports)return[n];const r=e.transports?.[t.id]?.({chain:t});return(r?.value?.transports||[r]).map(({value:s})=>s?.url||n)}function Yte(e){const{children:t,config:n,initialState:r,reconnectOnMount:i=!0}=e,{onMount:s}=Gte(n,{initialState:r,reconnectOnMount:i});n._internal.ssr||s();const o=A.useRef(!0);return A.useEffect(()=>{if(o.current&&n._internal.ssr)return s(),()=>{o.current=!1}},[]),t}const mL=A.createContext(void 0);function Zte(e){const{children:t,config:n}=e,r={value:n};return A.createElement(Yte,e,A.createElement(mL.Provider,r,t))}const Xte="2.19.2",Qte=()=>`wagmi@${Xte}`;let Jte=class extends md{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 Qte()}};class ene extends Jte{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function ii(e={}){const t=e.config??A.useContext(mL);if(!t)throw new ene;return t}var x8={exports:{}},v8={},w8={exports:{}},E8={};var rI;function tne(){if(rI)return E8;rI=1;var e=Tg();function t(y,g){return y===g&&(y!==0||1/y===1/g)||y!==y&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(y,g){var x=g(),_=r({inst:{value:x,getSnapshot:g}}),S=_[0].inst,I=_[1];return s(function(){S.value=x,S.getSnapshot=g,c(S)&&I({inst:S}
70)},[y,x,g]),i(function(){return c(S)&&I({inst:S}),y(function(){c(S)&&I({inst:S})})},[y]),o(x),x}function c(y){var g=y.getSnapshot;y=y.value;try{var x=g();return!n(y,x)}catch{return!0}}function d(y,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return E8.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,E8}var iI;function nne(){return iI||(iI=1,w8.exports=tne()),w8.exports}var sI;function rne(){if(sI)return v8;sI=1;var e=Tg(),t=nne();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,s=e.useRef,o=e.useEffect,a=e.useMemo,c=e.useDebugValue;return v8.useSyncExternalStoreWithSelector=function(d,h,y,g,x){var _=s(null);if(_.current===null){var S={hasValue:!1,value:null};_.current=S}else S=_.current;_=a(function(){function L(V){if(!D){if(D=!0,F=V,V=g(V),x!==void 0&&S.hasValue){var K=S.value;if(x(K,V))return $=K}return $=V}if(K=$,r(F,V))return K;var te=g(V);return x!==void 0&&x(K,te)?(F=V,K):(F=V,$=te)}var D=!1,F,$,z=y===void 0?null:y;return[function(){return L(h())},z===null?void 0:function(){return L(z())}]},[h,y,g,x]);var I=i(d,_[0],_[1]);return o(function(){S.hasValue=!0,S.value=I},[I]),c(I),I},v8}var oI;function ine(){return oI||(oI=1,x8.exports=rne()),x8.exports}var sne=ine();const _8=e=>typeof e=="object"&&!Array.isArray(e);function one(e,t,n=t,r=dg){const i=A.useRef([]),s=sne.useSyncExternalStoreWithSelector(e,t,n,o=>o,(o,a)=>{if(_8(o)&&_8(a)&&i.current.length){for(const c of i.current)if(!r(o[c],a[c]))return!1;return!0}return r(o,a)});return A.useMemo(()=>{if(_8(s)){const o={...s};let a={};for(const[c,d]of Object.entries(o))a={...a,[c]:{configurable:!1,enumerable:!0,get:()=>(i.current.includes(c)||i.current.push(c),d)}};return Object.defineProperties(o,a),o}return s},[s])}function Fo(e={}){const t=ii(e);return one(n=>_te(t,{onChange:n}),()=>v3(t))}function yL(e,t){return Z9(e,t)}function ane(e){return JSON.stringify(e,(t,n)=>cne(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):typeof n=="bigint"?n.toString():n)}function cne(e){if(!aI(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!aI(n)||!n.hasOwnProperty("isPrototypeOf"))}function aI(e){return Object.prototype.toString.call(e)==="[object Object]"}function zc(e){const{_defaulted:t,behavior:n,gcTime:r,initialData:i,initialDataUpdatedAt:s,maxPages:o,meta:a,networkMode:c,queryFn:d,queryHash:h,queryKey:y,queryKeyHashFn:g,retry:x,retryDelay:_,structuralSharing:S,getPreviousPageParam:I,getNextPageParam:L,initialPageParam:D,_optimisticResults:F,enabled:$,notifyOnChangeProps:z,placeholderData:V,refetchInterval:K,refetchIntervalInBackground:te,refetchOnMount:Q,refetchOnReconnect:ee,refetchOnWindowFocus:ne,retryOn
70Mount:J,select:M,staleTime:m,suspense:E,throwOnError:C,config:N,connector:P,query:B,...O}=e;return O}function une(e){return{mutationFn(t){return ote(e,t)},mutationKey:["connect"]}}function lne(e){return{mutationFn(t){return ate(e,t)},mutationKey:["disconnect"]}}function dne(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:i,...s}=n[1];if(!r)throw new Error("address is required");return await ute(e,{...s,address:r})??null},queryKey:fne(t)}}function fne(e={}){return["balance",zc(e)]}function hne(e,t={}){return{async queryFn({queryKey:n}){const{scopeKey:r,...i}=n[1];return await hL(e,i)??null},queryKey:pne(t)}}function pne(e={}){return["block",zc(e)]}function mne(e,t={}){return{gcTime:0,async queryFn({queryKey:n}){const{scopeKey:r,...i}=n[1];return await lte(e,i)??null},queryKey:yne(t)}}function yne(e={}){return["blockNumber",zc(e)]}function gne(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:i,...s}=n[1];if(!r)throw new Error("address is required");return await dte(e,{...s,address:r})??null},queryKey:bne(t)}}function bne(e){return["getBytecode",zc(e)]}function xne(e,t={}){return{async queryFn({queryKey:n}){const{scopeKey:r,...i}=n[1];return await fte(e,i)},queryKey:vne(t),retry(n,r){return r instanceof Q9?!1:n<3}}}function vne(e={}){return["capabilities",zc(e)]}function wne(e,t={}){return{gcTime:0,async queryFn({queryKey:n}){const{connector:r}=t,{connectorUid:i,scopeKey:s,...o}=n[1];return c0(e,{...o,connector:r})},queryKey:Ene(t)}}function Ene(e={}){const{connector:t,...n}=e;return["connectorClient",{...zc(n),connectorUid:t?.uid}]}function _ne(e,t={}){return{async queryFn({queryKey:n}){const r=t.abi;if(!r)throw new Error("abi is required");const{functionName:i,scopeKey:s,...o}=n[1],a=(()=>{const c=n[1];if(c.address)return{address:c.address};if(c.code)return{code:c.code};throw new Error("address or code is required")})();if(!i)throw new Error("functionName is required");return dL(e,{abi:r,functionName:i,args:o.args,...a,...o})},queryKey:Sne(t)}}function Sne(e={}){const{abi:t,...n}=e;return["readContract",zc(n)]}function Tne(e,t={}){return{async queryFn({queryKey:n}){const r=[],i=n[1].contracts.length;for(let a=0;a<i;a++){const c=n[1].contracts[a],d=(t.contracts?.[a]).abi;r.push({...c,abi:d})}const{scopeKey:s,...o}=n[1];return fL(e,{...o,contracts:r})},queryKey:Ane(t)}}function Ane(e={}){const t=[];for(const n of e.contracts??[]){const{abi:r,...i}=n;t.push({...i,chainId:i.chainId??e.chainId})}return["readContracts",zc({...e,contracts:t})]}function kne(e){return{mutationFn(t){return mte(e,t)},mutationKey:["sendCalls"]}}function Cne(e){return{mutationFn(t){return yte(e,t)},mutationKey:["signMessage"]}}function Ine(e,t={}){return{async queryFn({queryKey:n}){const{abi:r,connector:i}=t;if(!r)throw new Error("abi is required");const{scopeKey:s,...o}=n[1],{address:a,functionName:c}=o;if(!a)throw new Error("address is required");if(!c)throw new Error("functionName is required");return gte(e,{abi:r,connector:i,...o})},queryKey:Rne(t)}}function Rne(e={}){const{abi:t,connector:n,...r}=e;return["simulateContract",zc(r)]}function Mne(e,t){return{async queryFn({queryKey:n}){const{scopeKey:r,id:i,...s}=n[1];if(!i)throw new Error("id is required");return await wte(e,{...s,id:i})},queryKey:Nne(t),retry(n,r){return r instanceof Q9?!1:n<3}}}function Nne(e){return["callsStatus",zc(e)]}function jne(e,t={}){return{async queryFn({queryKey:n}){const{hash:r,...i}=n[1];if(!r)throw new Error("hash is required");return Ete(e,{...i,onReplaced:t.onReplaced,hash:r})},queryKey:Pne(t)}}function Pne(e={}){const{onReplaced:t,...n}=e;return["waitForTransactionReceipt",zc(n)]}function One(e){return{mutationFn(t){return Ite(e,t)},mutationKey:["writeContract"]}}function Vc(e){const t=Kr({...e,queryKeyHashFn:ane});return t.queryKey=e.queryKey,t}function oc(e={}){const t=ii(e);return A.useSyncExternalStore(n=>Ate(t,{onChange:n}),()=>BS(t),()=>BS(t))}function eA(e={}){const{address:t,query:n={}}=e,r=ii(e),i=oc({config:r}),s=dne(r,{...e,chainId:e.chainId??i}),o=!!(t&&(n.enabled??!0));return Vc({...n,...s,enabled:o})}function Lne(e={}){const{enabled:t=!0,onBlock:n,config:r,...i}=e,s=ii(e),o=oc({config:s}),a=e.chainId??o;A.useEffect(()=>{if(t&&n)return Tte(s,{...i,chainId:a,onBlock:n})},[a,s,t,n,i.blockTag,i.emitMissed,i.emitOnBegin,i.includeTransactions,i.onError,i.poll,i.pollingInterval,i.syncConnectedChain])}function Bne(e={}){const{query:t={},watch:n}=e,r=ii(e),i=lh(),s=oc({config:r}),o=e.chainId??s,a=hne(r,{...e,chainId:o}),c=!!(t.enabled??!0);return Lne({config:e.config,chainId:e.chainId,...typeof n=="object"?n:{},enabled:!!(c&&(typeof n=="object"?n.enabled:n)),onBlock(d){i.setQueryData(a.queryKey,d)}}),Vc({...t,...a,enabled:c})}function Fne(e={}){const{enabled:t=!0,onBlockNumber:n,config:r,...i}=e,s=ii(e),o=oc({config:s}),a=e.chainId??o;A.useEffect(()=>{if(t&&n)return Ste(s,{...i,chainId:a,onBlockNumber:n})},[a,s,t,n,i.onError,i.emitMissed,i.emitOnBegin,i.poll,i.pollingInterval,i.syncConnectedChain])}function Dne(e={}){const{query:t={},watch:n}=e,r=ii(e),i=lh(),s=oc({config:r}),o=e.chainId??s,a=mne(r,{...e,chainId:o});return Fne({config:e.config,chainId:e.chainId,...typeof n=="object"?n:{},enabled:!!((t.enabled??!0)&&(typeof n=="object"?n.enabled:n)),onBlockNumber(c){i.setQueryData(a.queryKey,c)}}),Vc({...t,...a})}function gL(e={}){const{address:t,query:n={}}=e,r=ii(e),i=oc({config:r}),s=gne(r,{...e,chainId:e.chainId??i}),o=!!(t&&(n.enabled??!0));return Vc({...n,...s,enabled:o})}function $ne(e={}){const{account:t,query:n={}}=e,{address:r}=Fo(),i=ii(e),s=xne(i,{...e,account:t??r});return Vc({...n,...s})}function Une(e={}){const t=ii(e);return A.useSyncExternalStore(n=>Cte(t,{onChange:n}),()=>Q7(t),()=>Q7(t))}function zne(e={}){const{mutation:t}=e,n=ii(e),r=une(n),{mutate:i,mutateAsync:s,...o}=a0({...t,...r});return A.useEffect(()=>n.subscribe(({status:a})=>a,(a,c)=>{c==="connected"&&a==="disconnected"&&o.reset()}),[n,o.reset]),{...o,connect:i,connectAsync:s,connectors:Une({config:n})}}function Vne(e={}){const t=ii(e);return A.useSyncExternalStore(n=>kte(t,{onChange:n}),()=>FS(t),()=>FS(t))}function qne(e={}){const{query:t={},...n}=e,r=ii(n),i=lh(),{address:s,connector:o,status:a}=Fo({config:r}),c=oc({config:r}),d=e.connector??o,{queryKey:h,...y}=wne(r,{...e,chainId:e.chainId??c,connector:d}),g=!!((a==="connected"||a==="reconnecting"&&d?.getProvider)&&(t.enabled??!0)),x=A.useRef(s);return A.useEffect(()=>{const _=x.current;!s&&_?(i.removeQueries({queryKey:h}),x.current=void 0):s!==_&&(i.invalidateQueries({queryKey:h}),x.current=s)},[s,i]),Vc({...t,...y,queryKey:h,enabled:g,staleTime:Number.POSITIVE_INFINITY})}function Hne(e={}){const{mutation:t}=e,n=ii(e),r=lne(n),{mutate:i,mutateAsync:s,...o}=a0({...t,...r});return{...o,connectors:Vne({config:n}).map(a=>a.connector),disconnect:i,disconnectAsync:s}}function Wne(e={}){const{abi:t,address:n,functionName:r,query:i={}}=e,s=e.code,o=ii(e),a=oc({config:o}),c=_ne(o,{...e,chainId:e.chainId??a}),d=!!((n||s)&&t&&r&&(i.enabled??!0));return Vc({...i,...c,enabled:d,structuralSharing:i.structuralSharing??yL})}function Gne(e={}){const{contracts:t=[],query:n={}}=e,r=ii(e),i=oc({config:r}),s=Tne(r,{...e,chainId:i}),o=A.useMemo(()=>{let a=!1;for(const c of t){const{abi:d,address:h,functionName:y}=c;if(!d||!h||!y){a=!1;break}a=!0}return!!(a&&(n.enabled??!0))},[t,n.enabled]);return Vc({...s,...n,enabled:o,structuralSharing:n.structuralSharing??yL})}function Kne(e={}){const{mutation:t}=e,n=ii(e),r=kne(n),{mutate:i,mutateAsync:s,...o}=a0({...t,...r});return{...o,sendCalls:i,sendCallsAsync:s}}function Yne(e={}){const{mutation:t}=e,n=ii(e),r=Cne(n),{mutate:i,mutateAsync:s,...o}=a0({...t,...r});return{...o,signMessage:i,signMessageAsync:s}}function Zne(e={}){const{abi:t,address:n,connector:r,functionName:i,query:s={}}=e,o=ii(e),{data:a}=qne({config:o,connector:r,query:{enabled:e.account===void 0}}),c=oc({config:o}),d=Ine(o,{...e,account:e.account??a?.account,chainId:e.chainId??c}),h=!!(t&&n&&i&&(s.enabled??!0));return Vc({...s,...d,enabled:h})}function Xne(e){const{id:t,query:n={}}=e,r=ii(e),i=Mne(r,e),s=!!(t&&(n.enabled??!0));return Vc({...n,...i,enabled:s})}function tA(e={}){const{hash:t,query:n={}}=e,r=ii(e),i=oc({config:r}),s=jne(r,{...e,chainId:e.chainId??i}),o=!!(t&&(n.enabled??!0));return Vc({...n,...s,enabled:o})}function Qne(e={}){const{mutation:t}=e,n=ii(e),r=One(n),{mutate:i,mutateAsync:s,...o}=a0({...t,...r});return{...o,writeContract:i,writeContractAsync:s}}w3.type="coinbaseWallet";function w3(e={}){return e.version==="3"||e.headlessMode?ere(e):Jne(e)}function Jne(e){let t,n,r,i;return s=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:w3.type,async connect({chainId:o,withCapabilities:a,...c}={}){try{const d=await this.getProvider(),h=(await d.request({method:"eth_requestAccounts",params:"instantOnboarding"in c&&c.instantOnboarding?[{onboarding:"instant"}]:[]})).map(g=>Qi(g));
70n||(n=this.onAccountsChanged.bind(this),d.on("accountsChanged",n)),r||(r=this.onChainChanged.bind(this),d.on("chainChanged",r)),i||(i=this.onDisconnect.bind(this),d.on("disconnect",i));let y=await this.getChainId();return o&&y!==o&&(y=(await this.switchChain({chainId:o}).catch(x=>{if(x.code===Ur.code)throw x;return{id:y}}))?.id??y),{accounts:a?h.map(g=>({address:g,capabilities:{}})):h,chainId:y}}catch(d){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(d.message)?new Ur(d):d}},async disconnect(){const o=await this.getProvider();n&&(o.removeListener("accountsChanged",n),n=void 0),r&&(o.removeListener("chainChanged",r),r=void 0),i&&(o.removeListener("disconnect",i),i=void 0),o.disconnect(),o.close?.()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(a=>Qi(a))},async getChainId(){const a=await(await this.getProvider()).request({method:"eth_chainId"});return Number(a)},async getProvider(){if(!t){const o=typeof e.preference=="string"?{options:e.preference}:{...e.preference,options:e.preference?.options??"all"},{createCoinbaseWalletSDK:a}=await hr(async()=>{const{createCoinbaseWalletSDK:d}=await import("./index-DYaoI2BG.js").then(h=>h.h);return{createCoinbaseWalletSDK:d}},__vite__mapDeps([0,1,2,3]));t=a({...e,appChainIds:s.chains.map(d=>d.id),preference:o}).getProvider()}return t},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:o,chainId:a}){const c=s.chains.find(h=>h.id===a);if(!c)throw new rc(new Wp);const d=await this.getProvider();try{return await d.request({method:"wallet_switchEthereumChain",params:[{chainId:ot(c.id)}]}),c}catch(h){if(h.code===4902)try{let y;o?.blockExplorerUrls?y=o.blockExplorerUrls:y=c.blockExplorers?.default.url?[c.blockExplorers?.default.url]:[];let g;o?.rpcUrls?.length?g=o.rpcUrls:g=[c.rpcUrls.default?.http[0]??""];const x={blockExplorerUrls:y,chainId:ot(a),chainName:o?.chainName??c.name,iconUrls:o?.iconUrls,nativeCurrency:o?.nativeCurrency??c.nativeCurrency,rpcUrls:g};return await d.request({method:"wallet_addEthereumChain",params:[x]}),c}catch(y){throw new Ur(y)}throw new rc(h)}},onAccountsChanged(o){o.length===0?this.onDisconnect():s.emitter.emit("change",{accounts:o.map(a=>Qi(a))})},onChainChanged(o){const a=Number(o);s.emitter.emit("change",{chainId:a})}
70,async onDisconnect(o){s.emitter.emit("disconnect");const a=await this.getProvider();n&&(a.removeListener("accountsChanged",n),n=void 0),r&&(a.removeListener("chainChanged",r),r=void 0),i&&(a.removeListener("disconnect",i),i=void 0)}})}function ere(e){let n,r,i,s,o;return a=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:w3.type,async connect({chainId:c,withCapabilities:d}={}){try{const h=await this.getProvider(),y=(await h.request({method:"eth_requestAccounts"})).map(x=>Qi(x));i||(i=this.onAccountsChanged.bind(this),h.on("accountsChanged",i)),s||(s=this.onChainChanged.bind(this),h.on("chainChanged",s)),o||(o=this.onDisconnect.bind(this),h.on("disconnect",o));let g=await this.getChainId();return c&&g!==c&&(g=(await this.switchChain({chainId:c}).catch(_=>{if(_.code===Ur.code)throw _;return{id:g}}))?.id??g),{accounts:d?y.map(x=>({address:x,capabilities:{}})):y,chainId:g}}catch(h){throw/(user closed modal|accounts received is empty|user denied account)/i.test(h.message)?new Ur(h):h}},async disconnect(){const c=await this.getProvider();i&&(c.removeListener("accountsChanged",i),i=void 0),s&&(c.removeListener("chainChanged",s),s=void 0),o&&(c.removeListener("disconnect",o),o=void 0),c.disconnect(),c.close()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(d=>Qi(d))},async getChainId(){const d=await(await this.getProvider()).request({method:"eth_chainId"});return Number(d)}
70,async getProvider(){if(!r){const c=await(async()=>{const{default:x}=await hr(async()=>{const{default:_}=await import("./index-Bjw-DqL_.js").then(S=>S.i);return{default:_}},__vite__mapDeps([4,1]));return typeof x!="function"&&typeof x.default=="function"?x.default:x})();n=new c({...e,reloadOnDisconnect:!1});const d=n.walletExtension?.getChainId(),h=a.chains.find(x=>e.chainId?x.id===e.chainId:x.id===d)||a.chains[0],y=e.chainId||h?.id,g=e.jsonRpcUrl||h?.rpcUrls.default.http[0];r=n.makeWeb3Provider(g,y)}return r},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:c,chainId:d}){const h=a.chains.find(g=>g.id===d);if(!h)throw new rc(new Wp);const y=await this.getProvider();try{return await y.request({method:"wallet_switchEthereumChain",params:[{chainId:ot(h.id)}]}),h}catch(g){if(g.code===4902)try{let x;c?.blockExplorerUrls?x=c.blockExplorerUrls:x=h.blockExplorers?.default.url?[h.blockExplorers?.default.url]:[];let _;c?.rpcUrls?.length?_=c.rpcUrls:_=[h.rpcUrls.default?.http[0]??""];const S={blockExplorerUrls:x,chainId:ot(d),chainName:c?.chainName??h.name,iconUrls:c?.iconUrls,nativeCurrency:c?.nativeCurrency??h.nativeCurrency,rpcUrls:_};return await y.request({method:"wallet_addEthereumChain",params:[S]}),h}catch(x){throw new Ur(x)}throw new rc(g)}},onAccountsChanged(c){c.length===0?this.onDisconnect():a.emitter.emit("change",{accounts:c.map(d=>Qi(d))})},onChainChanged(c){const d=Number(c);a.emitter.emit("change",{chainId:d})},async onDisconnect(c){a.emitter.emit("disconnect");const d=await this.getProvider();i&&(d.removeListener("accountsChanged",i),i=void 0),s&&(d.removeListener("chainChanged",s),s=void 0),o&&(d.removeListener("disconnect",o),o=void 0)}})}function tre(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bL={exports:{}},vi=bL.exports={},Iu,Ru;function US(){throw new Error("setTimeout has not been defined")}function zS(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Iu=setTimeout:Iu=US}catch{Iu=US}try{typeof clearTimeout=="function"?Ru=clearTimeout:Ru=zS}catch{Ru=zS}})();function xL(e){if(Iu===setTimeout)return setTimeout(e,0);if((Iu===US||!Iu)&&setTimeout)return Iu=setTimeout,setTimeout(e,0);try{return Iu(e,0)}catch{try{return Iu.call(null,e,0)}catch{return Iu.call(this,e,0)}}}function nre(e){if(Ru===clearTimeout)return clearTimeout(e);if((Ru===zS||!Ru)&&clearTimeout)return Ru=clearTimeout,clearTimeout(e);try{return Ru(e)}catch{try{return Ru.call(null,e)}catch{return Ru.call(this,e)}}}var Wl=[],_y=!1,mp,N5=-1;function rre(){!_y||!mp||(_y=!1,mp.length?Wl=mp.concat(Wl):N5=-1,Wl.length&&vL())}function vL(){if(!_y){var e=xL(rre);_y=!0;for(var t=Wl.length;t;){for(mp=Wl,Wl=[];++N5<t;)mp&&mp[N5].run();N5=-1,t=Wl.length}mp=null,_y=!1,nre(e)}}vi.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Wl.push(new wL(e,t)),Wl.length===1&&!_y&&xL(vL)};function wL(e,t){this.fun=e,this.array=t}wL.prototype.run=function(){this.fun.apply(null,this.array)};vi.title="browser";vi.browser=!0;vi.env={};vi.argv=[];vi.version="";vi.versions={};function yd(){}vi.on=yd;vi.addListener=yd;vi.once=yd;vi.off=yd;vi.removeListener=yd;vi.removeAllListeners=yd;vi.emit=yd;vi.prependListener=yd;vi.prependOnceListener=yd;vi.listeners=function(e){return[]};vi.binding=function(e){throw new Error("process.binding is not supported")};vi.cwd=function(){return"/"};vi.chdir=function(e){throw new Error("process.chdir is not supported")};vi.umask=function(){return 0};var ire=bL.exports;const sre=tre(ire);var nA={},E3={};E3.byteLength=cre;E3.toByteArray=lre;E3.fromByteArray=hre;var Lu=[],Ka=[],ore=typeof Uint8Array<"u"?Uint8Array:Array,S8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Xm=0,are=S8.length;Xm<are;++Xm)Lu[Xm]=S8[Xm],Ka[S8.charCodeAt(Xm)]=Xm;Ka[45]=62;Ka[95]=63;function EL(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function cre(e){var t=EL(e),n=t[0],r=t[1];return(n+r)*3/4-r}
vendor: 4,192 bytes, line 70
70function ure(e,t,n){return(t+n)*3/4-n}function lre(e){var t,n=EL(e),r=n[0],i=n[1],s=new ore(ure(e,r,i)),o=0,a=i>0?r-4:r,c;for(c=0;c<a;c+=4)t=Ka[e.charCodeAt(c)]<<18|Ka[e.charCodeAt(c+1)]<<12|Ka[e.charCodeAt(c+2)]<<6|Ka[e.charCodeAt(c+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return i===2&&(t=Ka[e.charCodeAt(c)]<<2|Ka[e.charCodeAt(c+1)]>>4,s[o++]=t&255),i===1&&(t=Ka[e.charCodeAt(c)]<<10|Ka[e.charCodeAt(c+1)]<<4|Ka[e.charCodeAt(c+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function dre(e){return Lu[e>>18&63]+Lu[e>>12&63]+Lu[e>>6&63]+Lu[e&63]}function fre(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(dre(r));return i.join("")}function hre(e){for(var t,n=e.length,r=n%3,i=[],s=16383,o=0,a=n-r;o<a;o+=s)i.push(fre(e,o,o+s>a?a:o+s));return r===1?(t=e[n-1],i.push(Lu[t>>2]+Lu[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(Lu[t>>10]+Lu[t>>4&63]+Lu[t<<2&63]+"=")),i.join("")}var rA={};rA.read=function(e,t,n,r,i){var s,o,a=i*8-r-1,c=(1<<a)-1,d=c>>1,h=-7,y=n?i-1:0,g=n?-1:1,x=e[t+y];for(y+=g,s=x&(1<<-h)-1,x>>=-h,h+=a;h>0;s=s*256+e[t+y],y+=g,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=r;h>0;o=o*256+e[t+y],y+=g,h-=8);if(s===0)s=1-d;else{if(s===c)return o?NaN:(x?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-d}return(x?-1:1)*o*Math.pow(2,s-r)};rA.write=function(e,t,n,r,i,s){var o,a,c,d=s*8-i-1,h=(1<<d)-1,y=h>>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=r?0:s-1,_=r?1:-1,S=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+y>=1?t+=g/c:t+=g*Math.pow(2,1-y),t*c>=2&&(o++,c/=2),o+y>=h?(a=0,o=h):o+y>=1?(a=(t*c-1)*Math.pow(2,i),o=o+y):(a=t*Math.pow(2,y-1)*Math.pow(2,i),o=0));i>=8;e[n+x]=a&255,x+=_,a/=256,i-=8);for(o=o<<i|a,d+=i;d>0;e[n+x]=o&255,x+=_,o/=256,d-=8);e[n+x-_]|=S*128};(function(e){const t=E3,n=rA,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=h,e.SlowBuffer=z,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:o,SharedArrayBuffer:a}=globalThis;h.TYPED_ARRAY_SUPPORT=c(),!h.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 se=new s(1),H={foo:function(){return 42}};return Object.setPrototypeOf(H,s.prototype),Object.setPrototypeOf(se,H),se.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function d(se){if(se>i)throw new RangeError('The value "'+se+'" is invalid for option "size"');const H=new s(se);return Object.setPrototypeOf(H,h.prototype),H}function h(se,H,Y){if(typeof se=="number"){if(typeof H=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(se)}return y(se,H,Y)}h.poolSize=8192;function y(se,H,Y){if(typeof se=="string")return S(se,H);if(o.isView(se))return L(se);if(se==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof se);if(xr(se,o)||se&&xr(se.buffer,o)||typeof a<"u"&&(xr(se,a)||se&&xr(se.buffer,a)))return D(se,H,Y);if(typeof se=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const le=se.valueOf&&se.valueOf();if(le!=null&&le!==se)return h.from(le,H,Y);const xe=F(se);if(xe)return xe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof se[Symbol.toPrimitive]=="function")return h.from(se[Symbol.toPrimitive]("string"),H,Y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof se)}h.from=function(se,H,Y){return y(se,H,Y)},Object.setPrototypeOf(h.prototype,s.prototype),Object.setPrototypeOf(h,s);function g(se){if(typeof se!="number")throw new TypeError('"size" argument must be of type number');
vendor: 4,769 bytes, line 70
70if(se<0)throw new RangeError('The value "'+se+'" is invalid for option "size"')}function x(se,H,Y){return g(se),se<=0?d(se):H!==void 0?typeof Y=="string"?d(se).fill(H,Y):d(se).fill(H):d(se)}h.alloc=function(se,H,Y){return x(se,H,Y)};function _(se){return g(se),d(se<0?0:$(se)|0)}h.allocUnsafe=function(se){return _(se)},h.allocUnsafeSlow=function(se){return _(se)};function S(se,H){if((typeof H!="string"||H==="")&&(H="utf8"),!h.isEncoding(H))throw new TypeError("Unknown encoding: "+H);const Y=V(se,H)|0;let le=d(Y);const xe=le.write(se,H);return xe!==Y&&(le=le.slice(0,xe)),le}function I(se){const H=se.length<0?0:$(se.length)|0,Y=d(H);for(let le=0;le<H;le+=1)Y[le]=se[le]&255;return Y}function L(se){if(xr(se,s)){const H=new s(se);return D(H.buffer,H.byteOffset,H.byteLength)}return I(se)}function D(se,H,Y){if(H<0||se.byteLength<H)throw new RangeError('"offset" is outside of buffer bounds');if(se.byteLength<H+(Y||0))throw new RangeError('"length" is outside of buffer bounds');let le;return H===void 0&&Y===void 0?le=new s(se):Y===void 0?le=new s(se,H):le=new s(se,H,Y),Object.setPrototypeOf(le,h.prototype),le}function F(se){if(h.isBuffer(se)){const H=$(se.length)|0,Y=d(H);return Y.length===0||se.copy(Y,0,0,H),Y}if(se.length!==void 0)return typeof se.length!="number"||Yt(se.length)?d(0):I(se);if(se.type==="Buffer"&&Array.isArray(se.data))return I(se.data)}function $(se){if(se>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return se|0}function z(se){return+se!=se&&(se=0),h.alloc(+se)}h.isBuffer=function(H){return H!=null&&H._isBuffer===!0&&H!==h.prototype},h.compare=function(H,Y){if(xr(H,s)&&(H=h.from(H,H.offset,H.byteLength)),xr(Y,s)&&(Y=h.from(Y,Y.offset,Y.byteLength)),!h.isBuffer(H)||!h.isBuffer(Y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(H===Y)return 0;let le=H.length,xe=Y.length;for(let Se=0,Re=Math.min(le,xe);Se<Re;++Se)if(H[Se]!==Y[Se]){le=H[Se],xe=Y[Se];break}return le<xe?-1:xe<le?1:0},h.isEncoding=function(H){switch(String(H).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(H,Y){if(!Array.isArray(H))throw new TypeError('"list" argument must be an Array of Buffers');if(H.length===0)return h.alloc(0);let le;if(Y===void 0)for(Y=0,le=0;le<H.length;++le)Y+=H[le].length;const xe=h.allocUnsafe(Y);let Se=0;for(le=0;le<H.length;++le){let Re=H[le];if(xr(Re,s))Se+Re.length>xe.length?(h.isBuffer(Re)||(Re=h.from(Re)),Re.copy(xe,Se)):s.prototype.set.call(xe,Re,Se);else if(h.isBuffer(Re))Re.copy(xe,Se);else throw new TypeError('"list" argument must be an Array of Buffers');Se+=Re.length}return xe};function V(se,H){if(h.isBuffer(se))return se.length;if(o.isView(se)||xr(se,o))return se.byteLength;if(typeof se!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof se);const Y=se.length,le=arguments.length>2&&arguments[2]===!0;if(!le&&Y===0)return 0;let xe=!1;for(;;)switch(H){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":return Ft(se).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return At(se).length;default:if(xe)return le?-1:Ft(se).length;H=(""+H).toLowerCase(),xe=!0}}h.byteLength=V;function K(se,H,Y){let le=!1;if((H===void 0||H<0)&&(H=0),H>this.length||((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)||(Y>>>=0,H>>>=0,Y<=H))return"";for(se||(se="utf8");;)switch(se){case"hex":return v(this,H,Y);case"utf8":case"utf-8":return N(this,H,Y);case"ascii":return O(this,H,Y);case"latin1":case"binary":return j(this,H,Y);case"base64":return C(this,H,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,H,Y);default:if(le)throw new TypeError("Unknown encoding: "+se);se=(se+"").toLowerCase(),le=!0}}h.prototype._isBuffer=!0;function te(se,H,Y){const le=se[H];se[H]=se[Y],se[Y]=le}h.prototype.swap16=function(){const H=this.length;if(H%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Y=0;Y<H;Y+=2)te(this,Y,Y+1);return this},h.prototype.swap32=function(){const H=this.length;if(H%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Y=0;Y<H;Y+=4)te(this,Y,Y+3),te(this,Y+1,Y+2);return this},h.prototype.swap64=function(){const H=this.length;if(H%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Y=0;Y<H;Y+=8)te(this,Y,Y+7),te(this,Y+1,Y+6),te(this,Y+2,Y+5),te(this,Y+3,Y+4);return this},h.prototype.toString=function(){const H=this.length;return H===0?"":arguments.length===0?N(this,0,H):K.apply(this,arguments)}
vendor: 17,923 bytes, line 70
70,h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(H){if(!h.isBuffer(H))throw new TypeError("Argument must be a Buffer");return this===H?!0:h.compare(this,H)===0},h.prototype.inspect=function(){let H="";const Y=e.INSPECT_MAX_BYTES;return H=this.toString("hex",0,Y).replace(/(.{2})/g,"$1 ").trim(),this.length>Y&&(H+=" ... "),"<Buffer "+H+">"},r&&(h.prototype[r]=h.prototype.inspect),h.prototype.compare=function(H,Y,le,xe,Se){if(xr(H,s)&&(H=h.from(H,H.offset,H.byteLength)),!h.isBuffer(H))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof H);if(Y===void 0&&(Y=0),le===void 0&&(le=H?H.length:0),xe===void 0&&(xe=0),Se===void 0&&(Se=this.length),Y<0||le>H.length||xe<0||Se>this.length)throw new RangeError("out of range index");if(xe>=Se&&Y>=le)return 0;if(xe>=Se)return-1;if(Y>=le)return 1;if(Y>>>=0,le>>>=0,xe>>>=0,Se>>>=0,this===H)return 0;let Re=Se-xe,Zt=le-Y;const ht=Math.min(Re,Zt),pt=this.slice(xe,Se),$n=H.slice(Y,le);for(let at=0;at<ht;++at)if(pt[at]!==$n[at]){Re=pt[at],Zt=$n[at];break}return Re<Zt?-1:Zt<Re?1:0};function Q(se,H,Y,le,xe){if(se.length===0)return-1;if(typeof Y=="string"?(le=Y,Y=0):Y>2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,Yt(Y)&&(Y=xe?0:se.length-1),Y<0&&(Y=se.length+Y),Y>=se.length){if(xe)return-1;Y=se.length-1}else if(Y<0)if(xe)Y=0;else return-1;if(typeof H=="string"&&(H=h.from(H,le)),h.isBuffer(H))return H.length===0?-1:ee(se,H,Y,le,xe);if(typeof H=="number")return H=H&255,typeof s.prototype.indexOf=="function"?xe?s.prototype.indexOf.call(se,H,Y):s.prototype.lastIndexOf.call(se,H,Y):ee(se,[H],Y,le,xe);throw new TypeError("val must be string, number or Buffer")}function ee(se,H,Y,le,xe){let Se=1,Re=se.length,Zt=H.length;if(le!==void 0&&(le=String(le).toLowerCase(),le==="ucs2"||le==="ucs-2"||le==="utf16le"||le==="utf-16le")){if(se.length<2||H.length<2)return-1;Se=2,Re/=2,Zt/=2,Y/=2}function ht($n,at){return Se===1?$n[at]:$n.readUInt16BE(at*Se)}let pt;if(xe){let $n=-1;for(pt=Y;pt<Re;pt++)if(ht(se,pt)===ht(H,$n===-1?0:pt-$n)){if($n===-1&&($n=pt),pt-$n+1===Zt)return $n*Se}else $n!==-1&&(pt-=pt-$n),$n=-1}else for(Y+Zt>Re&&(Y=Re-Zt),pt=Y;pt>=0;pt--){let $n=!0;for(let at=0;at<Zt;at++)if(ht(se,pt+at)!==ht(H,at)){$n=!1;break}if($n)return pt}return-1}h.prototype.includes=function(H,Y,le){return this.indexOf(H,Y,le)!==-1},h.prototype.indexOf=function(H,Y,le){return Q(this,H,Y,le,!0)},h.prototype.lastIndexOf=function(H,Y,le){return Q(this,H,Y,le,!1)};function ne(se,H,Y,le){Y=Number(Y)||0;const xe=se.length-Y;le?(le=Number(le),le>xe&&(le=xe)):le=xe;const Se=H.length;le>Se/2&&(le=Se/2);let Re;for(Re=0;Re<le;++Re){const Zt=parseInt(H.substr(Re*2,2),16);if(Yt(Zt))return Re;se[Y+Re]=Zt}return Re}function J(se,H,Y,le){return Wt(Ft(H,se.length-Y),se,Y,le)}function M(se,H,Y,le){return Wt(Mt(H),se,Y,le)}function m(se,H,Y,le){return Wt(At(H),se,Y,le)}function E(se,H,Y,le){return Wt(Dn(H,se.length-Y),se,Y,le)}h.prototype.write=function(H,Y,le,xe){if(Y===void 0)xe="utf8",le=this.length,Y=0;else if(le===void 0&&typeof Y=="string")xe=Y,le=this.length,Y=0;else if(isFinite(Y))Y=Y>>>0,isFinite(le)?(le=le>>>0,xe===void 0&&(xe="utf8")):(xe=le,le=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Se=this.length-Y;if((le===void 0||le>Se)&&(le=Se),H.length>0&&(le<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");xe||(xe="utf8");let Re=!1;for(;;)switch(xe){case"hex":return ne(this,H,Y,le);case"utf8":case"utf-8":return J(this,H,Y,le);case"ascii":case"latin1":case"binary":return M(this,H,Y,le);case"base64":return m(this,H,Y,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,H,Y,le);default:if(Re)throw new TypeError("Unknown encoding: "+xe);xe=(""+xe).toLowerCase(),Re=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(se,H,Y){return H===0&&Y===se.length?t.fromByteArray(se):t.fromByteArray(se.slice(H,Y))}function N(se,H,Y){Y=Math.min(se.length,Y);const le=[];let xe=H;for(;xe<Y;){const Se=se[xe];let Re=null,Zt=Se>239?4:Se>223?3:Se>191?2:1;if(xe+Zt<=Y){let ht,pt,$n,at;switch(Zt){case 1:Se<128&&(Re=Se);break;case 2:ht=se[xe+1],(ht&192)===128&&(at=(Se&31)<<6|ht&63,at>127&&(Re=at));break;case 3:ht=se[xe+1],pt=se[xe+2],(ht&192)===128&&(pt&192)===128&&(at=(Se&15)<<12|(ht&63)<<6|pt&63,at>2047&&(at<55296||at>57343)&&(Re=at));break;case 4:ht=se[xe+1],pt=se[xe+2],$n=se[xe+3],(ht&192)===128&&(pt&192)===128&&($n&192)===128&&(at=(Se&15)<<18|(ht&63)<<12|(pt&63)<<6|$n&63,at>65535&&at<1114112&&(Re=at))}}Re===null?(Re=65533,Zt=1):Re>65535&&(Re-=65536,le.push(Re>>>10&1023|55296),Re=56320|Re&1023),le.push(Re),xe+=Zt}return B(le)}const P=4096;function B(se){const H=se.length;if(H<=P)return String.fromCharCode.apply(String,se);let Y="",le=0;for(;le<H;)Y+=String.fromCharCode.apply(String,se.slice(le,le+=P));return Y}function O(se,H,Y){let le="";Y=Math.min(se.length,Y);for(let xe=H;xe<Y;++xe)le+=String.fromCharCode(se[xe]&127);return le}function j(se,H,Y){let le="";Y=Math.min(se.length,Y);for(let xe=H;xe<Y;++xe)le+=String.fromCharCode(se[xe]);return le}function v(se,H,Y){const le=se.length;(!H||H<0)&&(H=0),(!Y||Y<0||Y>le)&&(Y=le);let xe="";for(let Se=H;Se<Y;++Se)xe+=Ut[se[Se]];return xe}function k(se,H,Y){const le=se.slice(H,Y);let xe="";for(let Se=0;Se<le.length-1;Se+=2)xe+=String.fromCharCode(le[Se]+le[Se+1]*256);return xe}h.prototype.slice=function(H,Y){const le=this.length;H=~~H,Y=Y===void 0?le:~~Y,H<0?(H+=le,H<0&&(H=0)):H>le&&(H=le),Y<0?(Y+=le,Y<0&&(Y=0)):Y>le&&(Y=le),Y<H&&(Y=H);const xe=this.subarray(H,Y);return Object.setPrototypeOf(xe,h.prototype),xe};function X(se,H,Y){if(se%1!==0||se<0)throw new RangeError("offset is not uint");if(se+H>Y)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(H,Y,le){H=H>>>0,Y=Y>>>0,le||X(H,Y,this.length);let xe=this[H],Se=1,Re=0;for(;++Re<Y&&(Se*=256);)xe+=this[H+Re]*Se;return xe},h.prototype.readUintBE=h.prototype.readUIntBE=function(H,Y,le){H=H>>>0,Y=Y>>>0,le||X(H,Y,this.length);let xe=this[H+--Y],Se=1;for(;Y>0&&(Se*=256);)xe+=this[H+--Y]*Se;return xe},h.prototype.readUint8=h.prototype.readUInt8=function(H,Y){return H=H>>>0,Y||X(H,1,this.length),this[H]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(H,Y){return H=H>>>0,Y||X(H,2,this.length),this[H]|this[H+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(H,Y){return H=H>>>0,Y||X(H,2,this.length),this[H]<<8|this[H+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(H,Y){return H=H>>>0,Y||X(H,4,this.length),(this[H]|this[H+1]<<8|this[H+2]<<16)+this[H+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(H,Y){return H=H>>>0,Y||X(H,4,this.length),this[H]*16777216+(this[H+1]<<16|this[H+2]<<8|this[H+3])},h.prototype.readBigUInt64LE=pr(function(H){H=H>>>0,nr(H,"offset");const Y=this[H],le=this[H+7];(Y===void 0||le===void 0)&&Rt(H,this.length-8);const xe=Y+this[++H]*2**8+this[++H]*2**16+this[++H]*2**24,Se=this[++H]+this[++H]*2**8+this[++H]*2**16+le*2**24;return BigInt(xe)+(BigInt(Se)<<BigInt(32))}),h.prototype.readBigUInt64BE=pr(function(H){H=H>>>0,nr(H,"offset");const Y=this[H],le=this[H+7];(Y===void 0||le===void 0)&&Rt(H,this.length-8);const xe=Y*2**24+this[++H]*2**16+this[++H]*2**8+this[++H],Se=this[++H]*2**24+this[++H]*2**16+this[++H]*2**8+le;return(BigInt(xe)<<BigInt(32))+BigInt(Se)}),h.prototype.readIntLE=function(H,Y,le){H=H>>>0,Y=Y>>>0,le||X(H,Y,this.length);let xe=this[H],Se=1,Re=0;for(;++Re<Y&&(Se*=256);)xe+=this[H+Re]*Se;return Se*=128,xe>=Se&&(xe-=Math.pow(2,8*Y)),xe},h.prototype.readIntBE=function(H,Y,le){H=H>>>0,Y=Y>>>0,le||X(H,Y,this.length);let xe=Y,Se=1,Re=this[H+--xe];for(;xe>0&&(Se*=256);)Re+=this[H+--xe]*Se;return Se*=128,Re>=Se&&(Re-=Math.pow(2,8*Y)),Re},h.prototype.readInt8=function(H,Y){return H=H>>>0,Y||X(H,1,this.length),this[H]&128?(255-this[H]+1)*-1:this[H]},h.prototype.readInt16LE=function(H,Y){H=H>>>0,Y||X(H,2,this.length);const le=this[H]|this[H+1]<<8;return le&32768?le|4294901760:le},h.prototype.readInt16BE=function(H,Y){H=H>>>0,Y||X(H,2,this.length);const le=this[H+1]|this[H]<<8;return le&32768?le|4294901760:le},h.prototype.readInt32LE=function(H,Y){return H=H>>>0,Y||X(H,4,this.length),this[H]|this[H+1]<<8|this[H+2]<<16|this[H+3]<<24},h.prototype.readInt32BE=function(H,Y){return H=H>>>0,Y||X(H,4,this.length),this[H]<<24|this[H+1]<<16|this[H+2]<<8|this[H+3]},h.prototype.readBigInt64LE=pr(function(H){H=H>>>0,nr(H,"offset");const Y=this[H],le=this[H+7];(Y===void 0||le===void 0)&&Rt(H,this.length-8);const xe=this[H+4]+this[H+5]*2**8+this[H+6]*2**16+(le<<24);return(BigInt(xe)<<BigInt(32))+BigInt(Y+this[++H]*2**8+this[++H]*2**16+this[++H]*2**24)}),h.prototype.readBigInt64BE=pr(function(H){H=H>>>0,nr(H,"offset");const Y=this[H],le=this[H+7];(Y===void 0||le===void 0)&&Rt(H,this.length-8);const xe=(Y<<24)+this[++H]*2**16+this[++H]*2**8+this[++H];return(BigInt(xe)<<BigInt(32))+BigInt(this[++H]*2**24+this[++H]*2**16+this[++H]*2**8+le)}),h.prototype.readFloatLE=function(H,Y){return H=H>>>0,Y||X(H,4,this.length),n.read(this,H,!0,23,4)},h.prototype.readFloatBE=function(H,Y){return H=H>>>0,Y||X(H,4,this.length),n.read(this,H,!1,23,4)},h.prototype.readDoubleLE=function(H,Y){return H=H>>>0,Y||X(H,8,this.length),n.read(this,H,!0,52,8)},h.prototype.readDoubleBE=function(H,Y){return H=H>>>0,Y||X(H,8,this.length),n.read(this,H,!1,52,8)};function re(se,H,Y,le,xe,Se){if(!h.isBuffer(se))throw new TypeError('"buffer" argument must be a Buffer instance');if(H>xe||H<Se)throw new RangeError('"value" argument is out of bounds');if(Y+le>se.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(H,Y,le,xe){if(H=+H,Y=Y>>>0,le=le>>>0,!xe){const Zt=Math.pow(2,8*le)-1;re(this,H,Y,le,Zt,0)}let Se=1,Re=0;for(this[Y]=H&255;++Re<le&&(Se*=256);)this[Y+Re]=H/Se&255;return Y+le},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(H,Y,le,xe){if(H=+H,Y=Y>>>0,le=le>>>0,!xe){const Zt=Math.pow(2,8*le)-1;re(this,H,Y,le,Zt,0)}let Se=le-1,Re=1;for(this[Y+Se]=H&255;--Se>=0&&(Re*=256);)this[Y+Se]=H/Re&255;return Y+le},h.prototype.writeUint8=h.prototype.writeUInt8=function(H,Y,le){return H=+H,Y=Y>>>0,le||re(this,H,Y,1,255,0),this[Y]=H&255,Y+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(H,Y,le){return H=+H,Y=Y>>>0,le||re(this,H,Y,2,65535,0),this[Y]=H&255,this[Y+1]=H>>>8,Y+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(H,Y,le){return H=+H,Y=Y>>>0,le||re(this,H,Y,2,65535,0),this[Y]=H>>>8,this[Y+1]=H&255,Y+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(H,Y,le){return H=+H,Y=Y>>>0,le||re(this,H,Y,4,4294967295,0),this[Y+3]=H>>>24,this[Y+2]=H>>>16,this[Y+1]=H>>>8,this[Y]=H&255,Y+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(H,Y,le){return H=+H,Y=Y>>>0,le||re(this,H,Y,4,4294967295,0),this[Y]=H>>>24,this[Y+1]=H>>>16,this[Y+2]=H>>>8,this[Y+3]=H&255,Y+4};function ue(se,H,Y,le,xe){ut(H,le,xe,se,Y,7);let Se=Number(H&BigInt(4294967295));se[Y++]=Se,Se=Se>>8,se[Y++]=Se,Se=Se>>8,se[Y++]=Se,Se=Se>>8,se[Y++]=Se;let Re=Number(H>>BigInt(32)&BigInt(4294967295));return se[Y++]=Re,Re=Re>>8,se[Y++]=Re,Re=Re>>8,se[Y++]=Re,Re=Re>>8,se[Y++]=Re,Y}function pe(se,H,Y,le,xe){ut(H,le,xe,se,Y,7);let Se=Number(H&BigInt(4294967295));se[Y+7]=Se,Se=Se>>8,se[Y+6]=Se,Se=Se>>8,se[Y+5]=Se,Se=Se>>8,se[Y+4]=Se;let Re=Number(H>>BigInt(32)&BigInt(4294967295));return se[Y+3]=Re,Re=Re>>8,se[Y+2]=Re,Re=Re>>8,se[Y+1]=Re,Re=Re>>8,se[Y]=Re,Y+8}h.prototype.writeBigUInt64LE=pr(function(H,Y=0){return ue(this,H,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=pr(function(H,Y=0){return pe(this,H,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(H,Y,le,xe){if(H=+H,Y=Y>>>0,!xe){const ht=Math.pow(2,8*le-1);re(this,H,Y,le,ht-1,-ht)}let Se=0,Re=1,Zt=0;for(this[Y]=H&255;++Se<le&&(Re*=256);)H<0&&Zt===0&&this[Y+Se-1]!==0&&(Zt=1),this[Y+Se]=(H/Re>>0)-Zt&255;return Y+le},h.prototype.writeIntBE=function(H,Y,le,xe){if(H=+H,Y=Y>>>0,!xe){const ht=Math.pow(2,8*le-1);re(this,H,Y,le,ht-1,-ht)}let Se=le-1,Re=1,Zt=0;for(this[Y+Se]=H&255;--Se>=0&&(Re*=256);)H<0&&Zt===0&&this[Y+Se+1]!==0&&(Zt=1),this[Y+Se]=(H/Re>>0)-Zt&255;return Y+le},h.prototype.writeInt8=function(H,Y,le){return H=+H,Y=Y>>>0,le||re(this,H,Y,1,127,-128),H<0&&(H=255+H+1),this[Y]=H&255,Y+1},h.prototype.writeInt16LE=function(H,Y,le){return H=+H,Y=Y>>>0,le||re(this,H,Y,2,32767,-32768),this[Y]=H&255,this[Y+1]=H>>>8,Y+2},h.prototype.writeInt16BE=function(H,Y,le){return H=+H,Y=Y>>>0,le||re(this,H,Y,2,32767,-32768),this[Y]=H>>>8,this[Y+1]=H&255,Y+2},h.prototype.writeInt32LE=function(H,Y,le){return H=+H,Y=Y>>>0,le||re(this,H,Y,4,2147483647,-2147483648),this[Y]=H&255,this[Y+1]=H>>>8,this[Y+2]=H>>>16,this[Y+3]=H>>>24,Y+4},h.prototype.writeInt32BE=function(H,Y,le){return H=+H,Y=Y>>>0,le||re(this,H,Y,4,2147483647,-2147483648),H<0&&(H=4294967295+H+1),this[Y]=H>>>24,this[Y+1]=H>>>16,this[Y+2]=H>>>8,this[Y+3]=H&255,Y+4},h.prototype.writeBigInt64LE=pr(function(H,Y=0){return ue(this,H,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=pr(function(H,Y=0){return pe(this,H,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function we(se,H,Y,le,xe,Se){if(Y+le>se.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function Ce(se,H,Y,le,xe){return H=+H,Y=Y>>>0,xe||we(se,H,Y,4),n.write(se,H,Y,le,23,4),Y+4}h.prototype.writeFloatLE=function(H,Y,le){return Ce(this,H,Y,!0,le)},h.prototype.writeFloatBE=function(H,Y,le){return Ce(this,H,Y,!1,le)};function St(se,H,Y,le,xe){return H=+H,Y=Y>>>0,xe||we(se,H,Y,8),n.write(se,H,Y,le,52,8),Y+8}h.prototype.writeDoubleLE=function(H,Y,le){return St(this,H,Y,!0,le)},h.prototype.writeDoubleBE=function(H,Y,le){return St(this,H,Y,!1,le)},h.prototype.copy=function(H,Y,le,xe){if(!h.isBuffer(H))throw new TypeError("argument should be a Buffer");if(le||(le=0),!xe&&xe!==0&&(xe=this.length),Y>=H.length&&(Y=H.length),Y||(Y=0),xe>0&&xe<le&&(xe=le),xe===le||H.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(le<0||le>=this.length)throw new RangeError("Index out of range");if(xe<0)throw new RangeError("sourceEnd out of bounds");xe>this.length&&(xe=this.length),H.length-Y<xe-le&&(xe=H.length-Y+le);const Se=xe-le;return this===H&&typeof s.prototype.copyWithin=="function"?this.copyWithin(Y,le,xe):s.prototype.set.call(H,this.subarray(le,xe),Y),Se},h.prototype.fill=function(H,Y,le,xe){if(typeof H=="string"){if(typeof Y=="string"?(xe=Y,Y=0,le=this.length):typeof le=="string"&&(xe=le,le=this.length),xe!==void 0&&typeof xe!="string")throw new TypeError("encoding must be a string");if(typeof xe=="string"&&!h.isEncoding(xe))throw new TypeError("Unknown encoding: "+xe);if(H.length===1){const Re=H.charCodeAt(0);(xe==="utf8"&&Re<128||xe==="latin1")&&(H=Re)}}else typeof H=="number"?H=H&255:typeof H=="boolean"&&(H=Number(H));if(Y<0||this.length<Y||this.length<le)throw new RangeError("Out of range index");if(le<=Y)return this;Y=Y>>>0,le=le===void 0?this.length:le>>>0,H||(H=0);let Se;if(typeof H=="number")for(Se=Y;Se<le;++Se)this[Se]=H;else{const Re=h.isBuffer(H)?H:h.from(H,xe),Zt=Re.length;if(Zt===0)throw new TypeError('The value "'+H+'" is invalid for argument "value"');for(Se=0;Se<le-Y;++Se)this[Se+Y]=Re[Se%Zt]}return this};const Ve={};function et(se,H,Y){Ve[se]=class extends Y{constructor(){super(),Object.defineProperty(this,"message",{value:H.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${se}]`,this.stack,delete this.name}get code(){return se}set code(xe){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:xe,writable:!0})}toString(){return`${this.name} [${se}]: ${this.message}`}}}et("ERR_BUFFER_OUT_OF_BOUNDS",function(se){return se?`${se} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),et("ERR_INVALID_ARG_TYPE",function(se,H){return`The "${se}" argument must be of type number. Received type ${typeof H}`},TypeError),et("ERR_OUT_OF_RANGE",function(se,H,Y){let le=`The value of "${se}" is out of range.`,xe=Y;return Number.isInteger(Y)&&Math.abs(Y)>2**32?xe=lt(String(Y)):typeof Y=="bigint"&&(xe=String(Y),(Y>BigInt(2)**BigInt(32)||Y<-(BigInt(2)**BigInt(32)))&&(xe=lt(xe)),xe+="n"),le+=` It must be ${H}. Received ${xe}`,le},RangeError);function lt(se){let H="",Y=se.length;const le=se[0]==="-"?1:0;for(;Y>=le+4;Y-=3)H=`_${se.slice(Y-3,Y)}${H}`;return`${se.slice(0,Y)}${H}`}function tt(se,H,Y){nr(H,"offset"),(se[H]===void 0||se[H+Y]===void 0)&&Rt(H,se.length-(Y+1))}function ut(se,H,Y,le,xe,Se){if(se>Y||se<H){const Re=typeof H=="bigint"?"n":"";let Zt;throw H===0||H===BigInt(0)?Zt=`>= 0${Re} and < 2${Re} ** ${(Se+1)*8}${Re}`:Zt=`>= -(2${Re} ** ${(Se+1)*8-1}${Re}) and < 2 ** ${(Se+1)*8-1}${Re}`,new Ve.ERR_OUT_OF_RANGE("value",Zt,se)}tt(le,xe,Se)}function nr(se,H){if(typeof se!="number")throw new Ve.ERR_INVALID_ARG_TYPE(H,"number",se)}function Rt(se,H,Y){throw Math.floor(se)!==se?(nr(se,Y),new Ve.ERR_OUT_OF_RANGE("offset","an integer",se)):H<0?new Ve.ERR_BUFFER_OUT_OF_BOUNDS:new Ve.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${H}`,se)}const Qt=/[^+/0-9A-Za-z-_]/g;function Ls(se){if(se=se.split("=")[0],se=se.trim().replace(Qt,""),se.length<2)return"";for(;se.length%4!==0;)se=se+"=";return se}function Ft(se,H){H=H||1/0;let Y;const le=se.length;let xe=null;const Se=[];for(let Re=0;Re<le;++Re){if(Y=se.charCodeAt(Re),Y>55295&&Y<57344){if(!xe){if(Y>56319){(H-=3)>-1&&Se.push(239,191,189);continue}else if(Re+1===le){(H-=3)>-1&&Se.push(239,191,189);continue}xe=Y;continue}if(Y<56320){(H-=3)>-1&&Se.push(239,191,189),xe=Y;continue}Y=(xe-55296<<10|Y-56320)+65536}else xe&&(H-=3)>-1&&Se.push(239,191,189);if(xe=null,Y<128){if((H-=1)<0)break;Se.push(Y)}else if(Y<2048){if((H-=2)<0)break;Se.push(Y>>6|192,Y&63|128)}
70else if(Y<65536){if((H-=3)<0)break;Se.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((H-=4)<0)break;Se.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return Se}function Mt(se){const H=[];for(let Y=0;Y<se.length;++Y)H.push(se.charCodeAt(Y)&255);return H}function Dn(se,H){let Y,le,xe;const Se=[];for(let Re=0;Re<se.length&&!((H-=2)<0);++Re)Y=se.charCodeAt(Re),le=Y>>8,xe=Y%256,Se.push(xe),Se.push(le);return Se}function At(se){return t.toByteArray(Ls(se))}function Wt(se,H,Y,le){let xe;for(xe=0;xe<le&&!(xe+Y>=H.length||xe>=se.length);++xe)H[xe+Y]=se[xe];return xe}function xr(se,H){return se instanceof H||se!=null&&se.constructor!=null&&se.constructor.name!=null&&se.constructor.name===H.name}function Yt(se){return se!==se}const Ut=(function(){const se="0123456789abcdef",H=new Array(256);for(let Y=0;Y<16;++Y){const le=Y*16;for(let xe=0;xe<16;++xe)H[le+xe]=se[Y]+se[xe]}return H})();function pr(se){return typeof BigInt>"u"?$t:se}function $t(){throw new Error("BigInt not supported")}})(nA);const cs=nA.Buffer,Nn=nA.Buffer;function i3e(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function pre(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function iA(e,...t){if(!pre(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function cI(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function mre(e,t){iA(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const s3e=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),T8=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Su=(e,t)=>e<<32-t|e>>>t,o3e=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,yre=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function a3e(e){for(let t=0;t<e.length;t++)e[t]=yre(e[t])}const gre=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function c3e(e){iA(e);let t="";for(let n=0;n<e.length;n++)t+=gre[e[n]];return t}function bre(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function _L(e){return typeof e=="string"&&(e=bre(e)),iA(e),e}let xre=class{clone(){return this._cloneInto()}};function vre(e){const t=r=>e().update(_L(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}sA.type="safe";function sA(e={}){const{shimDisconnect:t=!1}=e;let n,r;return i=>({id:"safe",name:"Safe",type:sA.type,async connect({withCapabilities:s}={}){const o=await this.getProvider();if(!o)throw new Xa;const a=await this.getAccounts(),c=await this.getChainId();return r||(r=this.onDisconnect.bind(this),o.on("disconnect",r)),t&&await i.storage?.removeItem("safe.disconnected"),{accounts:s?a.map(d=>({address:d,capabilities:{}})):a,chainId:c}},async disconnect(){const s=await this.getProvider();if(!s)throw new Xa;r&&(s.removeListener("disconnect",r),r=void 0),t&&await i.storage?.setItem("safe.disconnected",!0)},async getAccounts(){const s=await this.getProvider();if(!s)throw new Xa;return(await s.request({method:"eth_accounts"})).map(Qi)}
70,async getProvider(){if(typeof window<"u"&&window?.parent!==window){if(!n){const{default:o}=await hr(async()=>{const{default:h}=await import("./index-El-zygeg.js");return{default:h}},__vite__mapDeps([5,6,7])),a=new o(e),c=await S9(()=>a.safe.getInfo(),{timeout:e.unstable_getInfoTimeout??10});if(!c)throw new Error("Could not load Safe information");const d=await(async()=>{const h=await hr(()=>import("./index-pH2snnd-.js").then(y=>y.i),__vite__mapDeps([8,6,7,3,9]));return typeof h.SafeAppProvider!="function"&&typeof h.default.SafeAppProvider=="function"?h.default.SafeAppProvider:h.SafeAppProvider})();n=new d(c,a)}return n}},async getChainId(){const s=await this.getProvider();if(!s)throw new Xa;return Number(s.chainId)},async isAuthorized(){try{return t&&await i.storage?.getItem("safe.disconnected")?!1:!!(await this.getAccounts()).length}catch{return!1}},onAccountsChanged(){},onChainChanged(){},onDisconnect(){i.emitter.emit("disconnect")}})}_3.type="walletConnect";function _3(e){const t=e.isNewChainsStale??!0;let n,r;const i="eip155";let s,o,a,c,d,h;return y=>({id:"walletConnect",name:"WalletConnect",type:_3.type,async setup(){const g=await this.getProvider().catch(()=>null);g&&(a||(a=this.onConnect.bind(this),g.on("connect",a)),d||(d=this.onSessionDelete.bind(this),g.on("session_delete",d)))},async connect({chainId:g,withCapabilities:x,..._}={}){try{const S=await this.getProvider();if(!S)throw new Xa;c||(c=this.onDisplayUri,S.on("display_uri",c));let I=g;if(!I){const $=await y.storage?.getItem("state")??{};y.chains.some(V=>V.id===$.chainId)?I=$.chainId:I=y.chains[0]?.id}if(!I)throw new Error("No chains found on connector.");const L=await this.isChainsStale();if(S.session&&L&&await S.disconnect(),!S.session||L){const $=y.chains.filter(z=>z.id!==I).map(z=>z.id);await S.connect({optionalChains:[I,...$],..."pairingTopic"in _?{pairingTopic:_.pairingTopic}:{}}),this.setRequestedChainsIds(y.chains.map(z=>z.id))}const D=(await S.enable()).map($=>Qi($));let F=await this.getChainId();return g&&F!==g&&(F=(await this.switchChain({chainId:g}).catch(z=>{if(z.code===Ur.code&&z.cause?.message!=="Missing or invalid. request() method: wallet_addEthereumChain")throw z;return{id:F}}))?.id??F),c&&(S.removeListener("display_uri",c),c=void 0),a&&(S.removeListener("connect",a),a=void 0),s||(s=this.onAccountsChanged.bind(this),S.on("accountsChanged",s)),o||(o=this.onChainChanged.bind(this),S.on("chainChanged",o)),h||(h=this.onDisconnect.bind(this),S.on("disconnect",h)),d||(d=this.onSessionDelete.bind(this),S.on("session_delete",d)),{accounts:x?D.map($=>({address:$,capabilities:{}})):D,chainId:F}}catch(S){throw/(user rejected|connection request reset)/i.test(S?.message)?new Ur(S):S}},async disconnect(){const g=await this.getProvider();try{await g?.disconnect()}catch(x){if(!/No matching key/i.test(x.message))throw x}finally{o&&(g?.removeListener("chainChanged",o),o=void 0),h&&(g?.removeListener("disconnect",h),h=void 0),a||(a=this.onConnect.bind(this),g?.on("connect",a)),s&&(g?.removeListener("accountsChanged",s),s=void 0),d&&(g?.removeListener("session_delete",d),d=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(x=>Qi(x))},async getProvider({chainId:g}={}){async function x(){const _=y.chains.map(I=>I.id);if(!_.length)return;const{EthereumProvider:S}=await hr(async()=>{const{EthereumProvider:I}=await import("./index.es-dyL7u-i3.js").then(L=>L.F);return{EthereumProvider:I}},__vite__mapDeps([10,9,2,7]));return await S.init({...e,disableProviderPing:!0,optionalChains:_,projectId:e.projectId,rpcMap:Object.fromEntries(y.chains.map(I=>{const[L]=Kte({chain:I,transports:y.transports});return[I.id,L]})),showQrModal:e.showQrModal??!0})}return n||(r||(r=x()),n=await r,n?.events.setMaxListeners(Number.POSITIVE_INFINITY)),g&&await this.switchChain?.({chainId:g}),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[g,x]=await Promise.all([this.getAccounts(),this.getProvider()]);return g.length?await this.isChainsStale()&&x.session?(await x.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:g,chainId:x}){const _=await this.getProvider();if(!_)throw new Xa;const S=y.chains.find(I=>I.id===x);if(!S)throw new rc(new Wp);try{await Promise.all([new Promise(L=>{const D=({chainId:F})=>{F===x&&(y.emitter.off("change",D),L())};
70y.emitter.on("change",D)}),_.request({method:"wallet_switchEthereumChain",params:[{chainId:ot(x)}]})]);const I=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...I,x]),S}catch(I){const L=I;if(/(user rejected)/i.test(L.message))throw new Ur(L);try{let D;g?.blockExplorerUrls?D=g.blockExplorerUrls:D=S.blockExplorers?.default.url?[S.blockExplorers?.default.url]:[];let F;g?.rpcUrls?.length?F=g.rpcUrls:F=[...S.rpcUrls.default.http];const $={blockExplorerUrls:D,chainId:ot(x),chainName:g?.chainName??S.name,iconUrls:g?.iconUrls,nativeCurrency:g?.nativeCurrency??S.nativeCurrency,rpcUrls:F};await _.request({method:"wallet_addEthereumChain",params:[$]});const z=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...z,x]),S}catch(D){throw new Ur(D)}}},onAccountsChanged(g){g.length===0?this.onDisconnect():y.emitter.emit("change",{accounts:g.map(x=>Qi(x))})},onChainChanged(g){const x=Number(g);y.emitter.emit("change",{chainId:x})},async onConnect(g){const x=Number(g.chainId),_=await this.getAccounts();y.emitter.emit("connect",{accounts:_,chainId:x})},async onDisconnect(g){this.setRequestedChainsIds([]),y.emitter.emit("disconnect");const x=await this.getProvider();s&&(x.removeListener("accountsChanged",s),s=void 0),o&&(x.removeListener("chainChanged",o),o=void 0),h&&(x.removeListener("disconnect",h),h=void 0),d&&(x.removeListener("session_delete",d),d=void 0),a||(a=this.onConnect.bind(this),x.on("connect",a))},onDisplayUri(g){y.emitter.emit("message",{type:"display_uri",data:g})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){return n?n.session?.namespaces[i]?.accounts?.map(x=>Number.parseInt(x.split(":")[1]||"",10))??[]:[]},async getRequestedChainsIds(){return await y.storage?.getItem(this.requestedChainsStorageKey)??[]},async isChainsStale(){if(!t)return!1;const g=y.chains.map(S=>S.id),x=this.getNamespaceChainsIds();if(x.length&&!x.some(S=>g.includes(S)))return!1;const _=await this.getRequestedChainsIds();return!g.every(S=>_.includes(S))},async setRequestedChainsIds(g){await y.storage?.setItem(this.requestedChainsStorageKey,g)},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}function wre(e,t,n){const r=n==="swap"&&t.some(o=>Ox.basic(o.type)),i=[...[...Array(t.length)].map(()=>["address","int24"]).reduce((o,a)=>[...o,...a],[]),"address"],s=t.reduce((o,a)=>{let c=Number(a.type)===0?y7:g7;const d=e.superchainConfig.oldSlipstreamFactory&&K5(a.factory,e.superchainConfig.oldSlipstreamFactory)&&(a.type|1048576)>>>0,h=K5(a.factory,e.superchainConfig.slipstreamFactory)&&(a.type|524288)>>>0;return Number(a.type)>0&&(c=h||d||a.type),o.length===0?[a.from,c,a.to]:[...o,c,a.to]},[]);return r?{types:i.map(o=>o==="int24"?"bool":o),values:s.map(o=>o===y7?!0:o===g7?!1:o)}:{types:i,values:s}}function Qb(e,t,n="swap"){const{types:r,values:i}=wre(e,t,n);return Of(r,i)}function SL(e,t,n,r,i=Pn,s){const o=String(t).toLowerCase(),a=String(n).toLowerCase(),c=e.filter(d=>String(d.token0).toLowerCase()==o&&String(d.token1).toLowerCase()==a&&Number(d.type)===r&&d.chainId==s||String(d.token1).toLowerCase()==o&&String(d.token0).toLowerCase()==a&&Number(d.type)===r&&d.chainId==s);return i===Pn?c[0]:c.find(d=>d.factory.toLowerCase()===i.toLowerCase())}const Ere=e=>e===0n;function TL(e){return[e.staked,e.amount0,e.amount1].every(Ere)}function l3e(e,t){if(!t)return[];const n=t.map(r=>({...r,tvl:0n}));return e.forEach(r=>{const i=r.reserve0,s=r.reserve1,o=r.token0.toLowerCase(),a=r.token1.toLowerCase(),c=n.find(y=>y.address===o&&y.chainId===r.chainId),d=n.find(y=>y.address===a&&y.chainId===r.chainId);let h=1/0;if(c&&d){const y=Number(Ns(Is(i,c.price,c.decimals),c.decimals)),g=Number(Ns(Is(s,d.price,d.decimals),d.decimals));h=Math.max(y,g)/Math.min(y,g)}if(c&&h<x7){const y=Is(i,c.price,c.decimals);c.tvl=c.tvl+y}if(d&&h<x7){const y=Is(s,d.price,d.decimals);d.tvl=d.tvl+y}}),n}const Ox={basic:e=>e===0||e===-1,concentrated:e=>e>50||e>0&&e<=50,volatile:e=>e===-1||e>50,stable:e=>e===0||e>0&&e<=50},fy=e=>!!MO[e.chainId]?.some(t=>t.toLowerCase()===e.address.toLowerCase()),VS=(e,t)=>`${e.address.toLowerCase()}:${e.chainId}`==`${t.address.toLowerCase()}:${t.chainId}`,d3e=({tick:e,tickLow:t,tickHigh:n})=>{const r=e<t&&e<n,i=e>t&&e>=n;return!r&&!i?{inRange:!0}:r?{inRange:!1,direction:"below"}:{inRange:!1,direction:"above"}};function _re(e,t,n){const{feeAddrsByRoot:r,bribeAddrsByRoot:i,roots:s}=e,o=t.filter(_=>_.pair.fee!==Pn),a=t.filter(_=>_.pair.bribe!==Pn),c=en.groupBy(o,_=>_?.pair.root),d=en.groupBy(a,_=>_?.pair.root),h=[],y=[],g=[],x=[];for(const _ of s){const S=en.chunk(c[_],n),I=en.chunk(d[_],n),L=S[0]?.map(F=>F.token.toLowerCase()),D=I[0]?.map(F=>F.token.toLowerCase());L?.length&&(g.push(L),h.push(r[_])),D?.length&&(x.push(D),y.push(i[_])),S.length>
701&&S.forEach(F=>{const $=F.map(z=>z.token.toLowerCase());g.push($),h.push(r[_])}),I.length>1&&I.forEach(F=>{const $=F.map(z=>z.token.toLowerCase());x.push($),y.push(i[_])})}return{nonCanonFeeTokens:g,nonCanonBribeTokens:x,nonCanonFeeContracts:h,nonCanonBribeContracts:y}}const uI=new Wu(navigator.userAgent).getDevice();function Sre(){if(uI.type)return uI.type==="desktop"?"desktop":"mobile";if(!(typeof window>"u")&&window.innerWidth)return window.innerWidth>=640?"desktop":"mobile"}const Tre=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),AL=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");var Are={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const kre=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},c)=>A.createElement("svg",{ref:c,...Are,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:AL("lucide",i),...a},[...o.map(([d,h])=>A.createElement(d,h)),...Array.isArray(s)?s:[s]]));const dn=(e,t)=>{const n=A.forwardRef(({className:r,...i},s)=>A.createElement(kre,{ref:s,iconNode:t,className:AL(`lucide-${Tre(e)}`,r),...i}));return n.displayName=`${e}`,n};const a6=dn("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);const oA=dn("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const kL=dn("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const qS=dn("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const u0=dn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Ju=dn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const CL=dn("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const IL=dn("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Cre=dn("ChevronsDownUp",[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]]);const Ire=dn("ChevronsLeftRightEllipsis",[["path",{d:"m18 8 4 4-4 4",key:"1ak13k"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]]);const Rre=dn("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);const Mre=dn("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);const aA=dn("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Nre=dn("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const lI=dn("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const S3=dn("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const jre=dn("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const RL=dn("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const Pre=dn("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);const ML=dn("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const T3=dn("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const NL=dn("FoldHorizontal",[["path",{d:"M2 12h6",key:"1wqiqv"}],["path",{d:"M22 12h-6",key:"1eg9hc"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 8v2",key:"1woqiv"}],["path",{d:"M12 14v2",key:"8jcxud"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m19 9-3 3 3 3",key:"12ol22"}],["path",{d:"m5 15 3-3-3-3",key:"1kdhjc"}]]);const Ore=dn("Fuel",[["line",{x1:"3",x2:"15",y1:"22",y2:"22",key:"xegly4"}],["line",{x1:"4",x2:"14",y1:"9",y2:"9",key:"xcnuvu"}],["path",{d:"M14 22V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v18",key:"16j0yd"}],["path",{d:"M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 2 2a2 2 0 0 0 2-2V9.83a2 2 0 0 0-.59-1.42L18 5",key:"7cu91f"}]]);const cA=dn("IdCard",[["path",{d:"M16 10h2",key:"8sgtl7"}],["path",{d:"M16 14h2",key:"epxaof"}],["path",{d:"M6.17 15a3 3 0 0 1 5.66 0",key:"n6f512"}],["circle",{cx:"9",cy:"11",r:"2",key:"yxgjnd"}],["rect",{x:"2",y:"5",width:"20",height:"14",rx:"2",key:"qneu4z"}]]);const jL=dn("Infinity",[["path",{d:"M12 12c-2-2.67-4-4-6-4a4 4 0 1 0 0 8c2 0 4-1.33 6-4Zm0 0c2 2.67 4 4 6 4a4 4 0 0 0 0-8c-2 0-4 1.33-6 4Z",key:"1z0uae"}]]);const dh=dn("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const uA=dn("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);const A3=dn("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);
70const k3=dn("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const Lre=dn("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);const Bre=dn("Logs",[["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M3 18h1",key:"1eiwyy"}],["path",{d:"M3 6h1",key:"rgxa97"}],["path",{d:"M8 12h1",key:"1con00"}],["path",{d:"M8 18h1",key:"13wk12"}],["path",{d:"M8 6h1",key:"tn6mkg"}]]);const Fre=dn("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);const Dre=dn("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);const PL=dn("Orbit",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}],["path",{d:"M10.4 21.9a10 10 0 0 0 9.941-15.416",key:"eohfx2"}],["path",{d:"M13.5 2.1a10 10 0 0 0-9.841 15.416",key:"19pvbm"}]]);const $re=dn("Percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]);const Ure=dn("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]);const zre=dn("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const OL=dn("Ratio",[["rect",{width:"12",height:"20",x:"6",y:"2",rx:"2",key:"1oxtiu"}],["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}]]);const Lx=dn("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Vre=dn("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const jv=dn("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);const LL=dn("ShieldX",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);const qre=dn("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);const Hre=dn("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Wre=dn("Unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]);const BL=dn("WalletMinimal",[["path",{d:"M17 14h.01",key:"7oqj8z"}],["path",{d:"M7 7h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14",key:"u1rqew"}]]);const Sy=dn("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);const jg=dn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,932 bytes, line 70
70],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lA="-",Gre=e=>{const t=Yre(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(lA);return a[0]===""&&a.length!==1&&a.shift(),FL(a,t)||Kre(o)},getConflictingClassGroupIds:(o,a)=>{const c=n[o]||[];return a&&r[o]?[...c,...r[o]]:c}}},FL=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?FL(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(lA);return t.validators.find(({validator:o})=>o(s))?.classGroupId},dI=/^\[(.+)\]$/,Kre=e=>{if(dI.test(e)){const t=dI.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Yre=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Xre(Object.entries(e.classGroups),n).forEach(([s,o])=>{HS(o,r,s,t)}),r},HS=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:fI(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(Zre(i)){HS(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{HS(o,fI(t,s),n,r)})})},fI=(e,t)=>{let n=e;return t.split(lA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Zre=e=>e.isThemeGetter,Xre=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,Qre=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},DL="!",Jre=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const c=[];let d=0,h=0,y;for(let I=0;I<a.length;I++){let L=a[I];if(d===0){if(L===i&&(r||a.slice(I,I+s)===t)){c.push(a.slice(h,I)),h=I+s;continue}if(L==="/"){y=I;continue}}L==="["?d++:L==="]"&&d--}const g=c.length===0?a:a.substring(h),x=g.startsWith(DL),_=x?g.substring(1):g,S=y&&y>h?y-h:void 0;return{modifiers:c,hasImportantModifier:x,baseClassName:_,maybePostfixModifierPosition:S}};return n?a=>n({className:a,parseClassName:o}):o},eie=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},tie=e=>({cache:Qre(e.cacheSize),parseClassName:Jre(e),...Gre(e)}),nie=/\s+/,rie=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(nie);let a="";for(let c=o.length-1;c>=0;c-=1){const d=o[c],{modifiers:h,hasImportantModifier:y,baseClassName:g,maybePostfixModifierPosition:x}=n(d);let _=!!x,S=r(_?g.substring(0,x):g);if(!S){if(!_){a=d+(a.length>0?" "+a:a);continue}if(S=r(g),!S){a=d+(a.length>0?" "+a:a);continue}_=!1}const I=eie(h).join(":"),L=y?I+DL:I,D=L+S;if(s.includes(D))continue;s.push(D);const F=i(S,_);for(let $=0;$<F.length;++$){const z=F[$];s.push(L+z)}a=d+(a.length>0?" "+a:a)}return a};function xi(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=$L(t))&&(r&&(r+=" "),r+=n);return r}const $L=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=$L(e[r]))&&(n&&(n+=" "),n+=t);return n};function iie(e,...t){let n,r,i,s=o;function o(c){const d=t.reduce((h,y)=>y(h),e());return n=tie(d),r=n.cache.get,i=n.cache.set,s=a,a(c)}function a(c){const d=r(c);if(d)return d;const h=rie(c,n);return i(c,h),h}return function(){return s(xi.apply(null,arguments))}}const Lr=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},UL=/^\[(?:([a-z-]+):)?(.+)\]$/i,sie=/^\d+\/\d+$/,oie=new Set(["px","full","screen"]),aie=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cie=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uie=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,lie=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,die=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ml=e=>Ty(e)||oie.has(e)||sie.test(e),lf=e=>Pg(e,"length",xie),Ty=e=>!!e&&!Number.isNaN(Number(e)),A8=e=>Pg(e,"number",Ty),Ob=e=>!!e&&Number.isInteger(Number(e)),fie=e=>e.endsWith("%")&&Ty(e.slice(0,-1)),kn=e=>UL.test(e),df=e=>aie.test(e),hie=new Set(["length","size","percentage"]),pie=e=>Pg(e,hie,zL),mie=e=>Pg(e,"position",zL),yie=new Set(["image","url"]),gie=e=>Pg(e,yie,wie),bie=e=>Pg(e,"",vie),Lb=()=>!0,Pg=(e,t,n)=>{const r=UL.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},xie=e=>cie.test(e)&&!uie.test(e),zL=()=>!1,vie=e=>lie.test(e),wie=e=>die.test(e),Eie=()=>{const e=Lr("colors"),t=Lr("spacing"),n=Lr("blur"),r=Lr("brightness"),i=Lr("borderColor"),s=Lr("borderRadius"),o=Lr("borderSpacing"),a=Lr("borderWidth"),c=Lr("contrast"),d=Lr("grayscale"),h=Lr("hueRotate"),y=Lr("invert"),g=Lr("gap"),x=Lr("gradientColorStops"),_=Lr("gradientColorStopPositions"),S=Lr("inset"),I=Lr("margin"),L=Lr("opacity"),D=Lr("padding"),F=Lr("saturate"),$=Lr("scale"),z=Lr("sepia"),V=Lr("skew"),K=Lr("space"),te=Lr("translate"),Q=()=>["auto","contain","none"],ee=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto",kn,t],J=()=>[kn,t],M=()=>["",Ml,lf],m=()=>["auto",Ty,kn],E=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["solid","dashed","dotted","double","none"],N=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",kn],O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[Ty,kn];return{cacheSize:500,separator:":",theme:{colors:[Lb],spacing:[Ml,lf],blur:["none","",df,kn],brightness:j(),borderColor:[e],borderRadius:["n
70one","","full",df,kn],borderSpacing:J(),borderWidth:M(),contrast:j(),grayscale:B(),hueRotate:j(),invert:B(),gap:J(),gradientColorStops:[e],gradientColorStopPositions:[fie,lf],inset:ne(),margin:ne(),opacity:j(),padding:J(),saturate:j(),scale:j(),sepia:B(),skew:j(),space:J(),translate:J()},classGroups:{aspect:[{aspect:["auto","square","video",kn]}],container:["container"],columns:[{columns:[df]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...E(),kn]}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ob,kn]}],basis:[{basis:ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",kn]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",Ob,kn]}],"grid-cols":[{"grid-cols":[Lb]}],"col-start-end":[{col:["auto",{span:["full",Ob,kn]},kn]}],"col-start":[{"col-start":m()}],"col-end":[{"col-end":m()}],"grid-rows":[{"grid-rows":[Lb]}],"row-start-end":[{row:["auto",{span:[Ob,kn]},kn]}],"row-start":[{"row-start":m()}],"row-end":[{"row-end":m()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",kn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",kn]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[D]}],px:[{px:[D]}],py:[{py:[D]}],ps:[{ps:[D]}],pe:[{pe:[D]}],pt:[{pt:[D]}],pr:[{pr:[D]}],pb:[{pb:[D]}],pl:[{pl:[D]}],m:[{m:[I]}],mx:[{mx:[I]}],my:[{my:[I]}],ms:[{ms:[I]}],me:[{me:[I]}],mt:[{mt:[I]}],mr:[{mr:[I]}],mb:[{mb:[I]}],ml:[{ml:[I]}],"space-x":[{"space-x":[K]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[K]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",kn,t]}],"min-w":[{"min-w":[kn,t,"min","max","fit"]}],"max-w":[{"max-w":[kn,t,"none","full","min","max","fit","prose",{screen:[df]},df]}],h:[{h:[kn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[kn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[kn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[kn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",df,lf]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",A8]}],"font-family":[{font:[Lb]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",kn]}],"line-clamp":[{"line-clamp":["none",Ty,A8]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ml,kn]}],"list-image":[{"list-image":["none",kn]}],"list-style-type":[{list:["none","disc","decimal",kn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[L]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[L]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...C(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ml,lf]}],"underline-offset":[{"underline-offset":["auto",Ml,kn]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:J()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",kn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",kn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[L]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...E(),mie]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",pie]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gie]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}
vendor: 5,183 bytes, line 70
70],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[L]}],"border-style":[{border:[...C(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[L]}],"divide-style":[{divide:C()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...C()]}],"outline-offset":[{"outline-offset":[Ml,kn]}],"outline-w":[{outline:[Ml,lf]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[L]}],"ring-offset-w":[{"ring-offset":[Ml,lf]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",df,bie]}],"shadow-color":[{shadow:[Lb]}],opacity:[{opacity:[L]}],"mix-blend":[{"mix-blend":[...N(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",df,kn]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[y]}],saturate:[{saturate:[F]}],sepia:[{sepia:[z]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[L]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"backdrop-sepia":[{"backdrop-sepia":[z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",kn]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",kn]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",kn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[$]}],"scale-x":[{"scale-x":[$]}],"scale-y":[{"scale-y":[$]}],rotate:[{rotate:[Ob,kn]}],"translate-x":[{"translate-x":[te]}],"translate-y":[{"translate-y":[te]}],"skew-x":[{"skew-x":[V]}],"skew-y":[{"skew-y":[V]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",kn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",kn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":J()}],"scroll-mx":[{"scroll-mx":J()}],"scroll-my":[{"scroll-my":J()}],"scroll-ms":[{"scroll-ms":J()}],"scroll-me":[{"scroll-me":J()}],"scroll-mt":[{"scroll-mt":J()}],"scroll-mr":[{"scroll-mr":J()}],"scroll-mb":[{"scroll-mb":J()}],"scroll-ml":[{"scroll-ml":J()}],"scroll-p":[{"scroll-p":J()}],"scroll-px":[{"scroll-px":J()}],"scroll-py":[{"scroll-py":J()}],"scroll-ps":[{"scroll-ps":J()}],"scroll-pe":[{"scroll-pe":J()}],"scroll-pt":[{"scroll-pt":J()}],"scroll-pr":[{"scroll-pr":J()}],"scroll-pb":[{"scroll-pb":J()}],"scroll-pl":[{"scroll-pl":J()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
70],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",kn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ml,lf,A8]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},It=iie(Eie),_ie={xs:"size-3",sm:"size-4",md:"size-5",lg:"size-6",xl:"size-7"};function Pv({className:e,size:t="sm"}){return u.jsxs("div",{className:"relative flex",children:[u.jsx("div",{className:It("inset-0 inline-flex rounded-full border border-current opacity-30",_ie[t],e)}),u.jsx("div",{className:"absolute inset-0 animate-spin rounded-full border border-transparent border-t-current"})]})}function Sie(){try{return window?.ethereum?.isBinance===!0}catch{return!1}}function Tie(){const e=Mv();return t=>({...e(t),id:"binance",name:"Binance Wallet"})}function Aie(e){const t=_3({projectId:e,showQrModal:!1});return n=>{const r=Ja,i=t({...n,chains:[r]});i.id="binance",i.name="Binance Wallet";const s=i.connect.bind(i);return i.connect=function(o){return o?.isReconnecting?s(o):new Promise((a,c)=>{let d;const h=()=>{const x=document.createElement("div");x.style="position: absolute; height: 100vh; width: 100vw; display: grid; place-items: center; background: rgba(0,0,0,0.2); z-index: 9999; top: 0; left: 0;",document.body.appendChild(x);const _=aL.createRoot(x),S=({qrCode:D})=>D?u.jsxs("div",{className:"relative rounded-2xl border bg-white p-4",children:[u.jsx("div",{style:{width:"282px",height:"282px",shapeRendering:"optimizeSpeed"},dangerouslySetInnerHTML:{__html:D}}),u.jsx("div",{className:"absolute inset-0 grid place-items-center",children:u.jsx("div",{className:"rounded bg-white p-1.5",children:u.jsx("img",{className:"size-14",src:"/svg/binance.svg"})})})]}):u.jsx("div",{className:"rounded-2xl border bg-white p-4",children:u.jsx("div",{style:{width:"282px",height:"282px"},className:"grid place-items-center",children:u.jsx(Pv,{size:"xl"})})}),I=()=>{const D=()=>{const F="bnc://app.binance.com/mp/app",$="yFK5FCqYprrXDiVFbhyRx7",z=window.btoa("pages/browser/index"),V=window.btoa(`url=${encodeURIComponent(location.href)}&defaultChainId=${r.id}`);return`${F}?appId=${$}&startPagePath=${z}&startPageQuery=${V}`};return u.jsx("button",{className:"rounded bg-[#f5ba2e] px-3 py-1 font-semibold text-black",onClick:()=>window.open(D()),children:"Open in App"})},L=()=>{const[D,F]=A.useState();A.useEffect(()=>{d=z=>F(z)});const $=async()=>{location.reload()};return u.jsxs("div",{className:"rounded-3xl bg-white p-4 shadow-lg dark:bg-black",children:[u.jsxs("div",{className:"mb-4 mt-1 flex items-center text-lg font-bold",children:["Binance WalletConnect",u.
70jsx("button",{className:"ml-auto grid size-7 place-items-center rounded-full bg-black dark:bg-white",onClick:$,children:u.jsx(jg,{size:18,className:"text-white dark:text-black"})})]}),u.jsx(S,{qrCode:D}),u.jsx("div",{className:"mb-2 mt-4 grid",children:u.jsx(I,{})})]})};return _.render(u.jsx(L,{})),[_,x]},[y,g]=h();i.onDisplayUri=async function(x){const{encodeQR:_}=await hr(async()=>{const{encodeQR:S}=await import("./index-CIj6NbCv.js");return{encodeQR:S}},[]);d(_(x,"svg",{border:0,ecc:"medium",scale:3}))},s(o).then(a).catch(c).finally(()=>{y.unmount(),document.body.removeChild(g)})})},i}}function kie(e){const t=w3(e);return n=>{const r=t(n),i=r.connect.bind(r);return r.connect=async function(s){return i(s)},r}}function Cie(e,t={}){const{key:n="fallback",name:r="Fallback",retryCount:i,retryDelay:s}=t;return(({chain:o,timeout:a,...c})=>{const d=e;let h=()=>{};function y(x,_,S){return"code"in x&&typeof x.code=="number"&&(x.code===Xy.code||x.code===Ur.code||x.code===5e3||x.code===3&&![S.superchainConfig.sugar].includes(_[0].to))}return l3({key:n,name:r,async request({method:x,params:_}){const S=async(I=0)=>{const L=d[I]({...c,chain:o,retryCount:0,timeout:a});try{const D=await L.request({method:x,params:_});return h({method:x,params:_,response:D,transport:L,status:"success"}),D}catch(D){if(h({error:D,method:x,params:_,transport:L,status:"error"}),y(D,_,o)||I===d.length-1)throw D;return S(I+1)}};return S()},retryCount:i,retryDelay:s,type:"fallback"},{onResponse:x=>h=x,transports:d.map(x=>x({chain:o,retryCount:0}))})})}const Iie=(e,t)=>({chain:n,retryCount:r,timeout:i})=>{const s=e.filter(([c,d])=>d!==0).map(([c])=>Cie([vS(c,t),...e.filter(([d])=>d!==c).map(([d])=>vS(d,t))])).map(c=>c(n===void 0?{retryCount:0,timeout:i}:{chain:n,retryCount:0,timeout:i}));let o=0,a=0;return l3({key:"loadBalance",name:"Load Balance",request:c=>(a++,a>e[o][1]&&(o++,o===s.length&&(o=0),a=0),s[o].request(c)),retryCount:r,timeout:i,type:"loadBalance"})};function Rie({chain:e,chainId:t,customRpc:n}){const r={retryCount:0,timeout:6e4,batch:hd.includes("no-batch-rpc-calls")?!1:{wait:10,batchSize:300}},i=e||d3([t])[0][0],{superchainConfig:s}=i,o=n?vS(n,r):Iie(s.rpcs,r);return E9({chain:i,transport:o})}function VL(){if(Sie())return[Tie()];const e=window?.parent!==window;return[Mv(),_3({projectId:v7}),kie({appName:"Aerodrome Finance",preference:{options:"all",telemetry:!1}}),Aie(v7),e&&sA()].filter(t=>!!t)}function Mie(){const e=typeof window<"u"&&window.localStorage?window.localStorage:J9;return pL({key:aJ,storage:e})}const Fc=Wte({chains:[...Xi,...Up],connectors:VL(),client:Rie,storage:Mie()}),qL="62635f7239717a66386f700b0080218021802180218021802180218021";if(qL.length%2!==0)throw"builder code must be even";function HL(e,t){if(!hd.includes("tx-suffix")||["transferFrom","approve"].includes(t))return"";let n="0";const r=Sre();r==="desktop"?n="2":r==="mobile"&&(n="1");const i=e===Ja.id?qL:"",s=`0x${cJ}c43409${n}${i}`;return s.length%2!==0?(console.warn("Uneven suffix length",s),`0x${i}`):s}async function WL(e){const t=await zp({chainId:e.id,address:e.superchainConfig.sugar,abi:EO,functionName:"count"},{cache:!0}).then(n=>Number(n)+10);return{limit:Math.max(10,Math.min(Math.floor(t/90),300)),upperBound:t}}function Nie(e){e.forEach(WL)}var k8={exports:{}},C8={};var hI;function jie(){if(hI)return C8;hI=1;var e=Tg();function t(y,g){return y===g&&(y!==0||1/y===1/g)||y!==y&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(y,g){var x=g(),_=r({inst:{value:x,getSnapshot:g}}),S=_[0].inst,I=_[1];return s(function(){S.value=x,S.getSnapshot=g,c(S)&&I({inst:S})},[y,x,g]),i(function(){return c(S)&&I({inst:S}),y(function(){c(S)&&I({inst:S})})},[y]),o(x),x}function c(y){var g=y.getSnapshot;y=y.value;try{var x=g();return!n(y,x)}catch{return!0}}function d(y,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return C8.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,C8}var pI;
70function Pie(){return pI||(pI=1,k8.exports=jie()),k8.exports}var Oie=Pie();const{useEffect:Lie,useLayoutEffect:Bie,useRef:Fie,useInsertionEffect:Die}=lg,$ie=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Uie=$ie?Bie:Lie,zie=Die||Uie,GL=e=>{const t=Fie([e,(...n)=>t[0](...n)]).current;return zie(()=>{t[0]=e}),t[1]},Vie=(e="",t=location.pathname)=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/",qie=(e,t="")=>e[0]==="~"?e.slice(1):t+e,Hie="popstate",dA="pushState",fA="replaceState",Wie="hashchange",mI=[Hie,dA,fA,Wie],Gie=e=>{for(const t of mI)addEventListener(t,e);return()=>{for(const t of mI)removeEventListener(t,e)}},KL=(e,t)=>Oie.useSyncExternalStore(Gie,e,t),Kie=()=>location.search,YL=()=>KL(Kie),yI=()=>location.pathname,C3=({ssrPath:e}={})=>KL(yI,e?()=>e:yI),ZL=(e,{replace:t=!1}={})=>history[t?fA:dA](null,"",e),Yie=(e={})=>[Vie(e.base,C3(e)),GL((t,n)=>ZL(qie(t,e.base),n))];if(typeof history<"u")for(const e of[dA,fA]){const t=history[e];history[e]=function(){const n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}function Zie(e=Qie){let t={};const n=r=>t[r]||(t[r]=e(r));return(r,i)=>{const{regexp:s,keys:o}=n(r||""),a=s.exec(i);return a?[!0,o.reduce((d,h,y)=>(d[h.name]=a[y+1],d),{})]:[!1,null]}}const gI=e=>e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),Xie=(e,t,n)=>{let r=e?"((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*)":"([^\\/]+?)";return t&&n&&(r="(?:\\/"+r+")"),r+(t?"?":"")},Qie=e=>{const t=/:([A-Za-z0-9_]+)([?+*]?)/g;let n=null,r=0,i=[],s="";for(;(n=t.exec(e))!==null;){const[o,a,c]=n,d=c==="+"||c==="*",h=c==="?"||c==="*",y=h&&e[n.index-1]==="/"?1:0,g=e.substring(r,n.index-y);i.push({name:a}),r=t.lastIndex,s+=gI(g)+Xie(d,h,y)}return s+=gI(e.substring(r)),{keys:i,regexp:new RegExp("^"+s+"(?:\\/)?$","i")}},Jie={hook:Yie,matcher:Zie(),base:""},ese=A.createContext(Jie),I3=()=>A.useContext(ese),R3=e=>e.hook(e),Jf=()=>R3(I3()),tse=e=>{const t=I3(),[n]=R3(t);return t.matcher(e,n)},nse=A.createContext({params:{}}),bI=(e,t)=>A.createElement(nse.Provider,{value:{params:e},children:t}),WS=({path:e,match:t,component:n,children:r})=>{const i=tse(e),[s,o]=t||i;return s?n?bI(o,A.createElement(n,{params:o})):bI(o,typeof r=="function"?r(o):r):null},Bx=A.forwardRef((e,t)=>{const n=I3(),[,r]=R3(n),{to:i,href:s=i,children:o,onClick:a}=e,c=GL(y=>{y.ctrlKey||y.metaKey||y.altKey||y.shiftKey||y.button!==0||(a&&a(y),y.defaultPrevented||(y.preventDefault(),r(i||s,e)))}),d={href:s[0]==="~"?s.slice(1):n.base+s,onClick:c,to:null,ref:t},h=A.isValidElement(o)?o:A.createElement("a",e);return A.cloneElement(h,d)}),GS=e=>Array.isArray(e)?[].concat(...e.map(t=>t&&t.type===A.Fragment?GS(t.props.children):GS(t))):[e],rse=({children:e,location:t})=>{const n=I3(),r=n.matcher,[i]=R3(n);for(const s of GS(e)){let o=0;if(A.isValidElement(s)&&(o=s.props.path?r(s.props.path,t||i):[!0,{}])[0])return A.cloneElement(s,{match:o})}return null},ise={TEXT:{appName:"Aerodrome",appToken:"AERO",landingLongDescrip:"Aerodrome Finance is a next-generation AMM designed to serve as Base's central liquidity hub, combining a powerful liquidity incentive engine, vote-lock governance model, and friendly user experience. Aerodrome inherits the latest features from Velodrome V2. Aerodrome NFTs vote to distribute token emissions and receive incentives and fees generated by the protocol.",home:{swapHeadline:"take to the skies",foundation:{title:"A durable foundation",description:"Aerodrome is a MetaDEX, combining elegant design, intelligent incentives and battle-tested technology to deliver the next generation of liquidity infrastructure."},features:[{title:"Optimized for flight",imgSrc:"/svg/AERO/landing-feature-1.svg",list:["100% of fees and incentives go to users","The top liquidity pools all in one platform","Incentives aligned for performance"]},{title:"Built decentralized",imgSrc:"/svg/AERO/landing-feature-2.svg",list:["Immutable and permissionless code","Onchain governance and operations","No centralized APIs or indexers"]},{title:"Launched clean",imgSrc:"/svg/AERO/landing-feature-3.svg",list:["$0 VC funding","Zero token sales","Founded as public good"]}],audiences:[{title:"Traders",description:"Swap tokens with predictable exchange rates and low fees"},{title:"Liquidity Providers",description:"Stake deposits to earn token emissions"},{title:"Voters",description:"Lock and vote for pools to earn weekly fees and incentives"}],essential:{heading:"The essential trading and liquidity marketplace of Base",subheading:"Grow beyond the horizon"}},launcher:{hero:{heading:"Built to launch",subheading:"Get day-one visibility on the largest liquidity marketplace on the world's leading L2. Build on Base. Launch on Aerodrome. We make launching liquidity quick and simple."}
70,flywheel:{description:"Aerodrome's MetaDEX model aligns incentives across LPs, traders, and tokenholders to attract and maintain deep liquidity. Listing on Aerodrome unlocks DeFi's most durable bootstrapping mechanisms."}}},LINKS:{dune:"https://dune.com/0xkhmer/aerodrome",discord:"https://discord.gg/aerodrome",twitter:"https://twitter.com/aeroxyz",warpcast:"https://warpcast.com/aerodrome",debank:"https://debank.com/official-account/113905",github:"https://github.com/aerodrome-finance",medium:"https://medium.com/@AerodromeFi",MIRRORS:{centralized:["aerodrome.finance"],decentralized:["aero.drome.eth","aero.drome.eth.limo","aero.drome.eth.link"]}}},XL=ise,ls=XL.TEXT,ku=XL.LINKS;function sse(e){const[t,n]=A.useState(()=>window.matchMedia?window.matchMedia(e).matches:!1);return A.useEffect(()=>{if(!window.matchMedia)return;const r=window.matchMedia(e),i=()=>{n(r.matches)};return i(),r.addEventListener("change",i),()=>{r.removeEventListener("change",i)}},[e]),t}const ose={dark:"#0a0f22",light:"#ebe9e7"},ase=['meta[name="theme-color"]','meta[name="background_color"]'],cse=e=>{ase.forEach(t=>{const n=document.querySelector(t);n&&n.setAttribute("content",e)})},QL=A.createContext({mode:"light",toggle:()=>{},isSm:!1,isMobile:!1});function use({children:e}){const[t,n]=A.useState(!1),[r,i]=A.useState(!1),s=sse("(min-width: 640px)"),o=!s,a=t?"dark":"light";A.useEffect(()=>{if(!r)return;const d=ose[a];document.documentElement.classList.toggle("dark",t),cse(d)},[t,r]),A.useEffect(()=>{const d=window.localStorage.getItem("darkMode"),h=window.matchMedia?.("(prefers-color-scheme: dark)")?.matches;n(d!==null?d==="true":h),i(!0)},[]);const c=A.useCallback(()=>{window.localStorage.setItem("darkMode",String(!t)),n(!t)},[t]);return u.jsx(QL.Provider,{value:{mode:a,toggle:c,isSm:s,isMobile:o},children:e})}function M3(){const e=A.useContext(QL);if(e===void 0)throw new Error("useThemeContext must be used within a ThemeProvider");return e}const Zl=[],dr=(e,t)=>{Zl.push([e,t]),Zl.length>100&&Zl.shift()},lse=()=>Zl.map(([e,t])=>`${e}=${t}`).join(`
71`),dse=(e,t=!1)=>{for(let n=Zl.length-1;n>=0;n--){const[r]=Zl[n];if(t&&r==="NAV")return!1;if(r===e)return!0}return!1},fse=(e,t)=>{const[n,r]=Zl.at(-1)||[];n===e?Zl.at(-1)[1]=t(r):dr(e,t())};function l0(){const e=A.useId();return{logs:Zl,pushLog:dr,formatLogs:lse,utils:{getId:(t,n)=>(t?t+"-":"")+(n??e.replace(/:/g,"")),topicPresent:dse,pushOrMutate:fse}}}function hse(){const{mode:e,toggle:t}=M3(),n=e==="dark";return u.jsx("button",{type:"button",className:"flex h-9 w-14 cursor-pointer items-center justify-center rounded-full bg-accent-10 transition hover:opacity-80",onClick:t,"aria-label":n?"Switch to light mode":"Switch to dark mode",children:n?u.jsx(qre,{size:16}):u.jsx(Dre,{size:16})})}function N3(){return typeof window<"u"}function Og(e){return hA(e)?(e.nodeName||"").toLowerCase():"#document"}function da(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gd(e){var t;return(t=(hA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hA(e){return N3()?e instanceof Node||e instanceof da(e).Node:!1}function Ji(e){return N3()?e instanceof Element||e instanceof da(e).Element:!1}function Gu(e){return N3()?e instanceof HTMLElement||e instanceof da(e).HTMLElement:!1}function c6(e){return!N3()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof da(e).ShadowRoot}const pse=new Set(["inline","contents"]);function Ov(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Dc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!pse.has(i)}const mse=new Set(["table","td","th"]);function yse(e){return mse.has(Og(e))}const gse=[":popover-open",":modal"];function j3(e){return gse.some(t=>{try{return e.matches(t)}catch{return!1}})}const bse=["transform","translate","scale","rotate","perspective"],xse=["transform","translate","scale","rotate","perspective","filter"],vse=["paint","layout","strict","content"];function pA(e){const t=mA(),n=Ji(e)?Dc(e):e;return bse.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||xse.some(r=>(n.willChange||"").includes(r))||vse.some(r=>(n.contain||"").includes(r))}function wse(e){let t=eh(e);for(;Gu(t)&&!fg(t);){if(pA(t))return t;if(j3(t))return null;t=eh(t)}return null}function mA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ese=new Set(["html","body","#document"]);function fg(e){return Ese.has(Og(e))}function Dc(e){return da(e).getComputedStyle(e)}function P3(e){return Ji(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eh(e){if(Og(e)==="html")return e;const t=e.assignedSlot||e.parentNode||c6(e)&&e.host||gd(e);return c6(t)?t.host:t}function JL(e){const t=eh(e);return fg(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gu(t)&&Ov(t)?t:JL(t)}function eB(e,t,n){var r;t===void 0&&(t=[]);const i=JL(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=da(i);
vendor: 4,630 bytes, line 71
71return s?(KS(o),t.concat(o,o.visualViewport||[],Ov(i)?i:[],[])):t.concat(i,eB(i,[]))}function KS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const YS=Math.min,Ay=Math.max,u6=Math.round,Uu=e=>({x:e,y:e});function xI(e,t,n){return Ay(e,YS(t,n))}function yA(e,t){return typeof e=="function"?e(t):e}function O3(e){return e.split("-")[0]}function tB(e){return e.split("-")[1]}function nB(e){return e==="x"?"y":"x"}function _se(e){return e==="y"?"height":"width"}const Sse=new Set(["top","bottom"]);function L3(e){return Sse.has(O3(e))?"y":"x"}function Tse(e){return nB(L3(e))}function Ase(e){return{top:0,right:0,bottom:0,left:0,...e}}function kse(e){return typeof e!="number"?Ase(e):{top:e,right:e,bottom:e,left:e}}function l6(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var Cse=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ZS=Cse.join(","),rB=typeof Element>"u",Fx=rB?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,d6=!rB&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},f6=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=i===""||i==="true",o=s||n&&t&&e(t.parentNode);return o},Ise=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Rse=function(t,n,r){if(f6(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ZS));return n&&Fx.call(t,ZS)&&i.unshift(t),i=i.filter(r),i},Mse=function e(t,n,r){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!f6(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),c=a.length?a:o.children,d=e(c,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:o,candidates:d})}else{var h=Fx.call(o,ZS);h&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var y=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),g=!f6(y,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(y&&g){var x=e(y===!0?o.children:y.children,!0,r);r.flatten?i.push.apply(i,x):i.push({scopeParent:o,candidates:x})}else s.unshift.apply(s,o.children)}}return i},iB=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},sB=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Ise(t))&&!iB(t)?0:t.tabIndex},Nse=function(t,n){var r=sB(t);return r<0&&n&&!iB(t)?0:r},jse=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},oB=function(t){return t.tagName==="INPUT"},Pse=function(t){return oB(t)&&t.type==="hidden"},Ose=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Lse=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Bse=function(t){if(!t.name)return!0;var n=t.form||d6(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=Lse(i,t.form);return!s||s===t},Fse=function(t){return oB(t)&&t.type==="radio"},Dse=function(t){return Fse(t)&&!Bse(t)},$se=function(t){var n,r=t&&d6(t),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var o,a,c;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!s&&i;){var d,h,y;r=d6(i),i=(d=r)===null||d===void 0?void 0:d.host,s=!!((h=i)!==null&&h!==void 0&&(y=h.ownerDocument)!==null&&y!==void 0&&y.contains(i))}}return s},vI=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Use=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Fx.call(t,"details>summary:first-of-type"),o=s?t.parentElement:t;if(Fx.call(o,"details:not([open]) *"))return!0;
71if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var c=t.parentElement,d=d6(t);if(c&&!c.shadowRoot&&i(c)===!0)return vI(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=a}if($se(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return vI(t);return!1},zse=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Fx.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Vse=function(t,n){return!(n.disabled||f6(n)||Pse(n)||Use(n,t)||Ose(n)||zse(n))},wI=function(t,n){return!(Dse(n)||sB(n)<0||!Vse(t,n))},qse=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Hse=function e(t){var n=[],r=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,c=Nse(a,o),d=o?e(i.candidates):a;c===0?o?n.push.apply(n,d):n.push(a):r.push({documentOrder:s,tabIndex:c,item:i,isScope:o,content:d})}),r.sort(jse).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},aB=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mse([t],n.includeContainer,{filter:wI.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:qse}):r=Rse(t,n.includeContainer,wI.bind(null,n)),Hse(r)};function Wse(){return/apple/i.test(navigator.vendor)}function Gse(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function cB(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&c6(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function yp(e){return e?.ownerDocument||document}function XS(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}var Kse=typeof document<"u",Yse=function(){},tc=Kse?A.useLayoutEffect:Yse;const Zse={...lg};function Ff(e){const t=A.useRef(e);return tc(()=>{t.current=e}),t}const Xse=Zse.useInsertionEffect,Qse=Xse||(e=>e());function Jb(e){const t=A.useRef(()=>{});return Qse(()=>{t.current=e}),A.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const uB=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function lB(e,t){const n=aB(e,uB()),r=n.length;if(r===0)return;const i=Gse(yp(e)),s=n.indexOf(i),o=s===-1?t===1?0:r-1:s+t;return n[o]}function Jse(e){return lB(yp(e).body,1)||e}function eoe(e){return lB(yp(e).body,-1)||e}function I8(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!cB(n,r)}function toe(e){aB(e,uB()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function EI(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var gr=oL();function _I(e,t,n){let{reference:r,floating:i}=e;const s=L3(t),o=Tse(t),a=_se(o),c=O3(t),d=s==="y",h=r.x+r.width/2-i.width/2,y=r.y+r.height/2-i.height/2,g=r[a]/2-i[a]/2;let x;switch(c){case"top":x={x:h,y:r.y-i.height};break;case"bottom":x={x:h,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y};break;case"left":x={x:r.x-i.width,y};break;default:x={x:r.x,y:r.y}}switch(tB(t)){case"start":x[o]-=g*(n&&d?-1:1);break;case"end":x[o]+=g*(n&&d?-1:1);break}return x}const noe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y}=_I(d,r,c),g=r,x={},_=0;for(let S=0;S<a.length;S++){const{name:I,fn:L}=a[S],{x:D,y:F,data:$,reset:z}=await L({x:h,y,initialPlacement:r,placement:g,strategy:i,middlewareData:x,rects:d,platform:o,elements:{reference:e,floating:t}});h=D??h,y=F??y,x={...x,[I]:{...x[I],...$}},z&&_<=50&&(_++,typeof z=="object"&&(z.placement&&(g=z.placement),z.rects&&(d=z.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}
71):z.rects),{x:h,y}=_I(d,g,c)),S=-1)}return{x:h,y,placement:g,strategy:i,middlewareData:x}};async function roe(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:y="floating",altBoundary:g=!1,padding:x=0}=yA(t,e),_=kse(x),I=a[g?y==="floating"?"reference":"floating":y],L=l6(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(I)))==null||n?I:I.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:d,rootBoundary:h,strategy:c})),D=y==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,F=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),$=await(s.isElement==null?void 0:s.isElement(F))?await(s.getScale==null?void 0:s.getScale(F))||{x:1,y:1}:{x:1,y:1},z=l6(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:D,offsetParent:F,strategy:c}):D);return{top:(L.top-z.top+_.top)/$.y,bottom:(z.bottom-L.bottom+_.bottom)/$.y,left:(L.left-z.left+_.left)/$.x,right:(z.right-L.right+_.right)/$.x}}const ioe=new Set(["left","top"]);async function soe(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=O3(n),a=tB(n),c=L3(n)==="y",d=ioe.has(o)?-1:1,h=s&&c?-1:1,y=yA(t,e);let{mainAxis:g,crossAxis:x,alignmentAxis:_}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return a&&typeof _=="number"&&(x=a==="end"?_*-1:_),c?{x:x*h,y:g*d}:{x:g*d,y:x*h}}const ooe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,c=await soe(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:o}}}}},aoe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:I=>{let{x:L,y:D}=I;return{x:L,y:D}}},...c}=yA(e,t),d={x:n,y:r},h=await roe(t,c),y=L3(O3(i)),g=nB(y);let x=d[g],_=d[y];if(s){const I=g==="y"?"top":"left",L=g==="y"?"bottom":"right",D=x+h[I],F=x-h[L];x=xI(D,x,F)}if(o){const I=y==="y"?"top":"left",L=y==="y"?"bottom":"right",D=_+h[I],F=_-h[L];_=xI(D,_,F)}const S=a.fn({...t,[g]:x,[y]:_});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[g]:s,[y]:o}}}}}};function dB(e){const t=Dc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Gu(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=u6(n)!==s||u6(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function fB(e){return Ji(e)?e:e.contextElement}function ky(e){const t=fB(e);if(!Gu(t))return Uu(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=dB(t);let o=(s?u6(n.width):n.width)/r,a=(s?u6(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const coe=Uu(0);function hB(e){const t=da(e);return!mA()||!t.visualViewport?coe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uoe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==da(e)?!1:t}function Dx(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=fB(e);let o=Uu(1);t&&(r?Ji(r)&&(o=ky(r)):o=ky(e));const a=uoe(s,n,r)?hB(s):Uu(0);let c=(i.left+a.x)/o.x,d=(i.top+a.y)/o.y,h=i.width/o.x,y=i.height/o.y;if(s){const g=da(s),x=r&&Ji(r)?da(r):r;let _=g,S=KS(_);for(;S&&r&&x!==_;){const I=ky(S),L=S.getBoundingClientRect(),D=Dc(S),F=L.left+(S.clientLeft+parseFloat(D.paddingLeft))*I.x,$=L.top+(S.clientTop+parseFloat(D.paddingTop))*I.y;c*=I.x,d*=I.y,h*=I.x,y*=I.y,c+=F,d+=$,_=da(S),S=KS(_)}}return l6({width:h,height:y,x:c,y:d})}function gA(e,t){const n=P3(e).scrollLeft;return t?t.left+n:Dx(gd(e)).left+n}function pB(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:gA(e,r)),s=r.top+t.scrollTop;return{x:i,y:s}}function loe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=gd(r),a=t?j3(t.floating):!1;if(r===o||a&&s)return n;let c={scrollLeft:0,scrollTop:0},d=Uu(1);const h=Uu(0),y=Gu(r);if((y||!y&&!s)&&((Og(r)!=="body"||Ov(o))&&(c=P3(r)),Gu(r))){const x=Dx(r);d=ky(r),h.x=x.x+r.clientLeft,h.y=x.y+r.clientTop}const g=o&&!y&&!s?pB(o,c,!0):Uu(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+h.x+g.x,y:n.y*d.y-c.scrollTop*d.y+h.y+g.y}}function doe(e){return Array.from(e.getClientRects())}function foe(e){const t=gd(e),n=P3(e),r=e.ownerDocument.body,i=Ay(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ay(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+gA(e);const a=-n.scrollTop;return Dc(r).direction==="rtl"&&(o+=Ay(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}
71function hoe(e,t){const n=da(e),r=gd(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const d=mA();(!d||d&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:a,y:c}}const poe=new Set(["absolute","fixed"]);function moe(e,t){const n=Dx(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Gu(e)?ky(e):Uu(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,c=i*s.x,d=r*s.y;return{width:o,height:a,x:c,y:d}}function SI(e,t,n){let r;if(t==="viewport")r=hoe(e,n);else if(t==="document")r=foe(gd(e));else if(Ji(t))r=moe(t,n);else{const i=hB(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return l6(r)}function mB(e,t){const n=eh(e);return n===t||!Ji(n)||fg(n)?!1:Dc(n).position==="fixed"||mB(n,t)}function yoe(e,t){const n=t.get(e);if(n)return n;let r=eB(e,[]).filter(a=>Ji(a)&&Og(a)!=="body"),i=null;const s=Dc(e).position==="fixed";let o=s?eh(e):e;for(;Ji(o)&&!fg(o);){const a=Dc(o),c=pA(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&poe.has(i.position)||Ov(o)&&!c&&mB(e,o))?r=r.filter(h=>h!==o):i=a,o=eh(o)}return t.set(e,r),r}function goe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?j3(t)?[]:yoe(t,this._c):[].concat(n),r],a=o[0],c=o.reduce((d,h)=>{const y=SI(t,h,i);return d.top=Ay(y.top,d.top),d.right=YS(y.right,d.right),d.bottom=YS(y.bottom,d.bottom),d.left=Ay(y.left,d.left),d},SI(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function boe(e){const{width:t,height:n}=dB(e);return{width:t,height:n}}function xoe(e,t,n){const r=Gu(t),i=gd(t),s=n==="fixed",o=Dx(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Uu(0);function d(){c.x=gA(i)}if(r||!r&&!s)if((Og(t)!=="body"||Ov(i))&&(a=P3(t)),r){const x=Dx(t,!0,s,t);c.x=x.x+t.clientLeft,c.y=x.y+t.clientTop}else i&&d();s&&!r&&i&&d();const h=i&&!r&&!s?pB(i,a):Uu(0),y=o.left+a.scrollLeft-c.x-h.x,g=o.top+a.scrollTop-c.y-h.y;return{x:y,y:g,width:o.width,height:o.height}}function R8(e){return Dc(e).position==="static"}function TI(e,t){if(!Gu(e)||Dc(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return gd(e)===n&&(n=n.ownerDocument.body),n}function yB(e,t){const n=da(e);if(j3(e))return n;if(!Gu(e)){let i=eh(e);for(;i&&!fg(i);){if(Ji(i)&&!R8(i))return i;i=eh(i)}return n}let r=TI(e,t);for(;r&&yse(r)&&R8(r);)r=TI(r,t);return r&&fg(r)&&R8(r)&&!pA(r)?n:r||wse(e)||n}const voe=async function(e){const t=this.getOffsetParent||yB,n=this.getDimensions,r=await n(e.floating);return{reference:xoe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function woe(e){return Dc(e).direction==="rtl"}const Eoe={convertOffsetParentRelativeRectToViewportRelativeRect:loe,getDocumentElement:gd,getClippingRect:goe,getOffsetParent:yB,getElementRects:voe,getClientRects:doe,getDimensions:boe,getScale:ky,isElement:Ji,isRTL:woe},_oe=ooe,Soe=aoe,Toe=(e,t,n)=>{const r=new Map,i={platform:Eoe,...n},s={...i.platform,_c:r};return noe(e,t,{...i,platform:s})};var Aoe=typeof document<"u",koe=function(){},j5=Aoe?A.useLayoutEffect:koe;function h6(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!h6(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!h6(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function gB(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function AI(e,t){const n=gB(e);return Math.round(t*n)/n}function M8(e){const t=A.useRef(e);return j5(()=>{t.current=e}),t}function Coe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:c,open:d}=e,[h,y]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,x]=A.useState(r);h6(g,r)||x(r);const[_,S]=A.useState(null),[I,L]=A.useState(null),D=A.useCallback(P=>{P!==V.current&&(V.current=P,S(P))},[]),F=A.useCallback(P=>{P!==K.current&&(K.current=P,L(P))},[]),$=s||_,z=o||I,V=A.useRef(null),K=A.useRef(null),te=A.useRef(h),Q=c!=null,ee=M8(c),ne=M8(i),J=M8(d),M=A.useCallback(()=>
71{if(!V.current||!K.current)return;const P={placement:t,strategy:n,middleware:g};ne.current&&(P.platform=ne.current),Toe(V.current,K.current,P).then(B=>{const O={...B,isPositioned:J.current!==!1};m.current&&!h6(te.current,O)&&(te.current=O,gr.flushSync(()=>{y(O)}))})},[g,t,n,ne,J]);j5(()=>{d===!1&&te.current.isPositioned&&(te.current.isPositioned=!1,y(P=>({...P,isPositioned:!1})))},[d]);const m=A.useRef(!1);j5(()=>(m.current=!0,()=>{m.current=!1}),[]),j5(()=>{if($&&(V.current=$),z&&(K.current=z),$&&z){if(ee.current)return ee.current($,z,M);M()}},[$,z,M,ee,Q]);const E=A.useMemo(()=>({reference:V,floating:K,setReference:D,setFloating:F}),[D,F]),C=A.useMemo(()=>({reference:$,floating:z}),[$,z]),N=A.useMemo(()=>{const P={position:n,left:0,top:0};if(!C.floating)return P;const B=AI(C.floating,h.x),O=AI(C.floating,h.y);return a?{...P,transform:"translate("+B+"px, "+O+"px)",...gB(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:O}},[n,a,C.floating,h.x,h.y]);return A.useMemo(()=>({...h,update:M,refs:E,elements:C,floatingStyles:N}),[h,M,E,C,N])}const Ioe=(e,t)=>({..._oe(e),options:[e,t]}),Roe=(e,t)=>({...Soe(e),options:[e,t]}),Moe="data-floating-ui-focusable",kI="active",CI="selected",Noe={...lg};let II=!1,joe=0;const RI=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+joe++;function Poe(){const[e,t]=A.useState(()=>II?RI():void 0);return tc(()=>{e==null&&t(RI())},[]),A.useEffect(()=>{II=!0},[]),e}const Ooe=Noe.useId,bB=Ooe||Poe;function Loe(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Boe=A.createContext(null),Foe=A.createContext(null),xB=()=>{var e;return((e=A.useContext(Boe))==null?void 0:e.id)||null},vB=()=>A.useContext(Foe);function bA(e){return"data-floating-ui-"+e}function ea(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const MI=bA("safe-polygon");function N8(e,t,n){if(n&&!XS(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function j8(e){return typeof e=="function"?e():e}function Doe(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:s,elements:o}=e,{enabled:a=!0,delay:c=0,handleClose:d=null,mouseOnly:h=!1,restMs:y=0,move:g=!0}=t,x=vB(),_=xB(),S=Ff(d),I=Ff(c),L=Ff(n),D=Ff(y),F=A.useRef(),$=A.useRef(-1),z=A.useRef(),V=A.useRef(-1),K=A.useRef(!0),te=A.useRef(!1),Q=A.useRef(()=>{}),ee=A.useRef(!1),ne=Jb(()=>{var N;const P=(N=i.current.openEvent)==null?void 0:N.type;return P?.includes("mouse")&&P!=="mousedown"});A.useEffect(()=>{if(!a)return;function N(P){let{open:B}=P;B||(ea($),ea(V),K.current=!0,ee.current=!1)}return s.on("openchange",N),()=>{s.off("openchange",N)}},[a,s]),A.useEffect(()=>{if(!a||!S.current||!n)return;function N(B){ne()&&r(!1,B,"hover")}const P=yp(o.floating).documentElement;return P.addEventListener("mouseleave",N),()=>{P.removeEventListener("mouseleave",N)}},[o.floating,n,r,a,S,ne]);const J=A.useCallback(function(N,P,B){P===void 0&&(P=!0),B===void 0&&(B="hover");const O=N8(I.current,"close",F.current);O&&!z.current?(ea($),$.current=window.setTimeout(()=>r(!1,N,B),O)):P&&(ea($),r(!1,N,B))},[I,r]),M=Jb(()=>{Q.current(),z.current=void 0}),m=Jb(()=>{if(te.current){const N=yp(o.floating).body;N.style.pointerEvents="",N.removeAttribute(MI),te.current=!1}}),E=Jb(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);A.useEffect(()=>{if(!a)return;function N(v){if(ea($),K.current=!1,h&&!XS(F.current)||j8(D.current)>0&&!N8(I.current,"open"))return;const k=N8(I.current,"open",F.current);k?$.current=window.setTimeout(()=>{L.current||r(!0,v,"hover")},k):n||r(!0,v,"hover")}function P(v){if(E()){m();return}Q.current();const k=yp(o.floating);if(ea(V),ee.current=!1,S.current&&i.current.floatingContext){n||ea($),z.current=S.current({...i.current.floatingContext,tree:x,x:v.clientX,y:v.clientY,onClose(){m(),M(),E()||J(v,!0,"safe-polygon")}});const re=z.current;k.addEventListener("mousemove",re),Q.current=()=>{k.removeEventListener("mousemove",re)};return}(F.current==="touch"?!cB(o.floating,v.relatedTarget):!0)&&J(v)}function B(v){E()||i.current.floatingContext&&(S.current==null||S.current({...i.current.floatingContext,tree:x,x:v.clientX,y:v.clientY,onClose(){m(),M(),E()||J(v)}})(v))}function O(){ea($)}function j(v){E()||J(v,!1)}if(Ji(o.domReference)){const v=o.domReference,k=o.floating;return n&&v.addEventListener("mouseleave",B),g&&v.addEventListener("mousemove",N,{once:!0}),v.addEventListener("mouseenter",N),v.addEventListener("mouseleave",P),k&&(k.addEventListener("mouseleave",B),k.addEventListener("mouseenter",O),k.addEventListener("mouseleave",j)),()=>{n&&v.removeEventListener("mouseleave",B),g&&v.removeEventListener("mousemove",N),v.removeEventListener("mouseenter",N),v.removeEventListener("mouseleave",P),k&&(k.removeEventListener("mouseleave",B),k.removeEventListener("mouseenter",O),k.removeEventListener("mouseleave",j))}}},[o,a,e,h,g,J,M,m,r,n,L,x,I,S,i,E,D]),tc(()=>{var N;if(a&&n&&(N=S.current)!=null&&(N=N.__options)!=null&&N.blockPointerEvents&&ne()){te.current=!0;const B=o.floating;if(Ji(o.domReference)&&B){var P;const O=yp(o.floating).body;O.setAttribute(MI,"");const j=o.domReference,v=x==null||(P=x.nodesRef.current.find(k=>k.id===_))==null||(P=P.context)==null?void 0:P.elements.floating;return v&&(v.style.pointerEvents=""),O.style.pointerEvents="none",j.style.pointerEvents="auto",B.style.pointerEvents="auto",()=>{O.style.pointerEvents="",j.style.pointerEvents="",B.style.pointerEvents=""}}}},[a,n,_,o,x,S,ne]),tc(()=>{n||(F.current=void 0,ee.current=!1,M(),m())},[n,M,m]),A.useEffect(()=>()=>{M(),ea($),ea(V),m()},[a,o.domReference,M,m]);const C=A.useMemo(()=>{function N(P){F.current=P.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(P){const{nativeEvent:B}=P;function O(){!K.current&&!L.current&&r(!0,B,"hover")}
71h&&!XS(F.current)||n||j8(D.current)===0||ee.current&&P.movementX**2+P.movementY**2<2||(ea(V),F.current==="touch"?O():(ee.current=!0,V.current=window.setTimeout(O,j8(D.current))))}}},[h,r,n,L,D]);return A.useMemo(()=>a?{reference:C}:{},[a,C])}function P8(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&c6(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function $oe(e){return"composedPath"in e?e.composedPath()[0]:e.target}const wB={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},NI=A.forwardRef(function(t,n){const[r,i]=A.useState();tc(()=>{Wse()&&i("button")},[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[bA("focus-guard")]:"",style:wB};return u.jsx("span",{...t,...s})}),EB=A.createContext(null),jI=bA("portal");function Uoe(e){e===void 0&&(e={});const{id:t,root:n}=e,r=bB(),i=Voe(),[s,o]=A.useState(null),a=A.useRef(null);return tc(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),tc(()=>{if(!r||a.current)return;const c=t?document.getElementById(t):null;if(!c)return;const d=document.createElement("div");d.id=r,d.setAttribute(jI,""),c.appendChild(d),a.current=d,o(d)},[t,r]),tc(()=>{if(n===null||!r||a.current)return;let c=n||i?.portalNode;c&&!hA(c)&&(c=c.current),c=c||document.body;let d=null;t&&(d=document.createElement("div"),d.id=t,c.appendChild(d));const h=document.createElement("div");h.id=r,h.setAttribute(jI,""),c=d||c,c.appendChild(h),a.current=h,o(h)},[t,n,r,i]),s}function zoe(e){const{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,s=Uoe({id:n,root:r}),[o,a]=A.useState(null),c=A.useRef(null),d=A.useRef(null),h=A.useRef(null),y=A.useRef(null),g=o?.modal,x=o?.open,_=!!o&&!o.modal&&o.open&&i&&!!(r||s);return A.useEffect(()=>{if(!s||!i||g)return;function S(I){s&&I8(I)&&(I.type==="focusin"?EI:toe)(s)}return s.addEventListener("focusin",S,!0),s.addEventListener("focusout",S,!0),()=>{s.removeEventListener("focusin",S,!0),s.removeEventListener("focusout",S,!0)}},[s,i,g]),A.useEffect(()=>{s&&(x||EI(s))},[x,s]),u.jsxs(EB.Provider,{value:A.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:d,beforeInsideRef:h,afterInsideRef:y,portalNode:s,setFocusManagerState:a}),[i,s]),children:[_&&s&&u.jsx(NI,{"data-type":"outside",ref:c,onFocus:S=>{if(I8(S,s)){var I;(I=h.current)==null||I.focus()}else{const L=o?o.domReference:null,D=eoe(L);D?.focus()}}}),_&&s&&u.jsx("span",{"aria-owns":s.id,style:wB}),s&&gr.createPortal(t,s),_&&s&&u.jsx(NI,{"data-type":"outside",ref:d,onFocus:S=>
71{if(I8(S,s)){var I;(I=y.current)==null||I.focus()}else{const L=o?o.domReference:null,D=Jse(L);D?.focus(),o?.closeOnFocusOut&&o?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const Voe=()=>A.useContext(EB);function qoe(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=bB(),s=A.useRef({}),[o]=A.useState(()=>Loe()),a=xB()!=null,[c,d]=A.useState(r.reference),h=Jb((x,_,S)=>{s.current.openEvent=x?_:void 0,o.emit("openchange",{open:x,event:_,reason:S,nested:a}),n?.(x,_,S)}),y=A.useMemo(()=>({setPositionReference:d}),[]),g=A.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return A.useMemo(()=>({dataRef:s,open:t,onOpenChange:h,elements:g,events:o,floatingId:i,refs:y}),[t,h,g,o,i,y])}function Hoe(e){e===void 0&&(e={});const{nodeId:t}=e,n=qoe({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[s,o]=A.useState(null),[a,c]=A.useState(null),h=i?.domReference||s,y=A.useRef(null),g=vB();tc(()=>{h&&(y.current=h)},[h]);const x=Coe({...e,elements:{...i,...a&&{reference:a}}}),_=A.useCallback(F=>{const $=Ji(F)?{getBoundingClientRect:()=>F.getBoundingClientRect(),getClientRects:()=>F.getClientRects(),contextElement:F}:F;c($),x.refs.setReference($)},[x.refs]),S=A.useCallback(F=>{(Ji(F)||F===null)&&(y.current=F,o(F)),(Ji(x.refs.reference.current)||x.refs.reference.current===null||F!==null&&!Ji(F))&&x.refs.setReference(F)},[x.refs]),I=A.useMemo(()=>({...x.refs,setReference:S,setPositionReference:_,domReference:y}),[x.refs,S,_]),L=A.useMemo(()=>({...x.elements,domReference:h}),[x.elements,h]),D=A.useMemo(()=>({...x,...r,refs:I,elements:L,nodeId:t}),[x,I,L,t,r]);return tc(()=>{r.dataRef.current.floatingContext=D;const F=g?.nodesRef.current.find($=>$.id===t);F&&(F.context=D)}),A.useMemo(()=>({...x,context:D,refs:I,elements:L}),[x,I,L,D])}function O8(e,t,n){const r=new Map,i=n==="item";let s=e;if(i&&e){const{[kI]:o,[CI]:a,...c}=e;s=c}return{...n==="floating"&&{tabIndex:-1,[Moe]:""},...s,...t.map(o=>{const a=o?o[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((o,a)=>(a&&Object.entries(a).forEach(c=>{let[d,h]=c;if(!(i&&[kI,CI].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof h=="function"){var y;(y=r.get(d))==null||y.push(h),o[d]=function(){for(var g,x=arguments.length,_=new Array(x),S=0;S<x;S++)_[S]=arguments[S];return(g=r.get(d))==null?void 0:g.map(I=>I(..._)).find(I=>I!==void 0)}}}else o[d]=h}),o),{})}}function Woe(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),i=A.useCallback(a=>O8(a,e,"reference"),t),s=A.useCallback(a=>O8(a,e,"floating"),n),o=A.useCallback(a=>O8(a,e,"item"),r);return A.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:o}),[i,s,o])}const PI=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Qm(e,t){return typeof e=="function"?e(t):e}function Goe(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function Koe(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,o=(typeof i=="number"?i:i.close)||0,[a,c]=A.useState("unmounted"),d=Goe(n,o);return!d&&a==="close"&&c("unmounted"),tc(()=>{if(r){if(n){c("initial");const h=requestAnimationFrame(()=>{gr.flushSync(()=>{c("open")})});return()=>{cancelAnimationFrame(h)}}c("close")}},[n,r]),{isMounted:d,status:a}}function Yoe(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:s,duration:o=250}=t,a=e.placement,c=a.split("-")[0],d=A.useMemo(()=>({side:c,placement:a}),[c,a]),h=typeof o=="number",y=(h?o:o.open)||0,g=(h?o:o.close)||0,[x,_]=A.useState(()=>({...Qm(s,d),...Qm(n,d)})),{isMounted:S,status:I}=Koe(e,{duration:o}),L=Ff(n),D=Ff(r),F=Ff(i),$=Ff(s);return tc(()=>{const z=Qm(L.current,d),V=Qm(F.current,d),K=Qm($.current,d),te=Qm(D.current,d)||Object.keys(z).reduce((Q,ee)=>(Q[ee]="",Q),{});if(I==="initial"&&_(Q=>({transitionProperty:Q.transitionProperty,...K,...z})),I==="open"&&_({transitionProperty:Object.keys(te).map(PI).join(","),transitionDuration:y+"ms",...K,...te}),I==="close"){const Q=V||z;_({transitionProperty:Object.keys(Q).map(PI).join(","),transitionDuration:g+"ms",...K,...Q})}},[g,F,L,D,$,y,I,d]),{isMounted:S,styles:x}}function _B(e,t,n){return n===void 0&&(n=!0),e.filter(i=>{var s;return i.parentId===t&&(!n||((s=i.context)==null?void 0:s.open))}).flatMap(i=>[i,..._B(e,i.id,n)])}function OI(e,t){const[n,r]=e;let i=!1;const s=t.length;for(let o=0,a=s-1;o<s;
71a=o++){const[c,d]=t[o]||[0,0],[h,y]=t[a]||[0,0];d>=r!=y>=r&&n<=(h-c)*(r-d)/(y-d)+c&&(i=!i)}return i}function Zoe(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Xoe(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1};let s=!1,o=null,a=null,c=typeof performance<"u"?performance.now():0;function d(y,g){const x=performance.now(),_=x-c;if(o===null||a===null||_===0)return o=y,a=g,c=x,null;const S=y-o,I=g-a,D=Math.sqrt(S*S+I*I)/_;return o=y,a=g,c=x,D}const h=y=>{let{x:g,y:x,placement:_,elements:S,onClose:I,nodeId:L,tree:D}=y;return function($){function z(){ea(i),I()}if(ea(i),!S.domReference||!S.floating||_==null||g==null||x==null)return;const{clientX:V,clientY:K}=$,te=[V,K],Q=$oe($),ee=$.type==="mouseleave",ne=P8(S.floating,Q),J=P8(S.domReference,Q),M=S.domReference.getBoundingClientRect(),m=S.floating.getBoundingClientRect(),E=_.split("-")[0],C=g>m.right-m.width/2,N=x>m.bottom-m.height/2,P=Zoe(te,M),B=m.width>M.width,O=m.height>M.height,j=(B?M:m).left,v=(B?M:m).right,k=(O?M:m).top,X=(O?M:m).bottom;if(ne&&(s=!0,!ee))return;if(J&&(s=!1),J&&!ee){s=!0;return}if(ee&&Ji($.relatedTarget)&&P8(S.floating,$.relatedTarget)||D&&_B(D.nodesRef.current,L).length)return;if(E==="top"&&x>=M.bottom-1||E==="bottom"&&x<=M.top+1||E==="left"&&g>=M.right-1||E==="right"&&g<=M.left+1)return z();let re=[];switch(E){case"top":re=[[j,M.top+1],[j,m.bottom-1],[v,m.bottom-1],[v,M.top+1]];break;case"bottom":re=[[j,m.top+1],[j,M.bottom-1],[v,M.bottom-1],[v,m.top+1]];break;case"left":re=[[m.right-1,X],[m.right-1,k],[M.left+1,k],[M.left+1,X]];break;case"right":re=[[M.right-1,X],[M.right-1,k],[m.left+1,k],[m.left+1,X]];break}function ue(pe){let[we,Ce]=pe;switch(E){case"top":{const St=[B?we+t/2:C?we+t*4:we-t*4,Ce+t+1],Ve=[B?we-t/2:C?we+t*4:we-t*4,Ce+t+1],et=[[m.left,C||B?m.bottom-t:m.top],[m.right,C?B?m.bottom-t:m.top:m.bottom-t]];return[St,Ve,...et]}case"bottom":{const St=[B?we+t/2:C?we+t*4:we-t*4,Ce-t],Ve=[B?we-t/2:C?we+t*4:we-t*4,Ce-t],et=[[m.left,C||B?m.top+t:m.bottom],[m.right,C?B?m.top+t:m.bottom:m.top+t]];return[St,Ve,...et]}case"left":{const St=[we+t+1,O?Ce+t/2:N?Ce+t*4:Ce-t*4],Ve=[we+t+1,O?Ce-t/2:N?Ce+t*4:Ce-t*4];return[...[[N||O?m.right-t:m.left,m.top],[N?O?m.right-t:m.left:m.right-t,m.bottom]],St,Ve]}case"right":{const St=[we-t,O?Ce+t/2:N?Ce+t*4:Ce-t*4],Ve=[we-t,O?Ce-t/2:N?Ce+t*4:Ce-t*4],et=[[N||O?m.left+t:m.right,m.top],[N?O?m.left+t:m.right:m.left+t,m.bottom]];return[St,Ve,...et]}}}if(!OI([V,K],re)){if(s&&!P)return z();if(!ee&&r){const pe=d($.clientX,$.clientY);if(pe!==null&&pe<.1)return z()}OI([V,K],ue([g,x]))?!s&&r&&(i.current=window.setTimeout(z,40)):z()}}};return h.__options={blockPointerEvents:n},h}function jr({children:e,content:t,placement:n="top",className:r,disabled:i=!1}){const[s,o]=A.useState(!1),{refs:a,floatingStyles:c,context:d}=Hoe({placement:n,open:s&&!i,onOpenChange:o,middleware:[Ioe(8),Roe({padding:8})]}),h=Doe(d,{delay:{open:300,close:0},move:!1,handleClose:Xoe()}),{getReferenceProps:y,getFloatingProps:g}=Woe([h]),{isMounted:x,styles:_}=Yoe(d,{duration:100,initial:{opacity:0,transform:"scale(0.95)"}});return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"inline-flex",ref:a.setReference,...y(),children:e}),x&&u.jsx(zoe,{children:u.jsx("div",{ref:a.setFloating,className:"z-50",style:c,...g(),children:u.jsx("div",{style:_,className:It("rounded-xl border border-accent-10 bg-accent-0 px-4 py-3 text-xs shadow-sm",r),children:t})})})]})}const Qoe=1e3;function B3({text:e,label:t="Copy",feedbackLabel:n="Copied!",showLabel:r=!1,tooltipDisabled:i=!1}){const[s,o]=A.useState(!1);if(A.useEffect(()=>{if(s){const c=setTimeout(()=>{o(!1)},Qoe);return()=>clearTimeout(c)}},[s]),!navigator?.clipboard)return null;const a=c=>{c.stopPropagation(),c.preventDefault(),navigator.clipboard.writeText(e),o(!0)};return u.jsx(jr,{content:s?n:t,disabled:i,children:u.jsxs("button",{className:"-m-1 inline-flex items-center gap-1 rounded p-1 text-2xs text-accent-50 transition hover:bg-accent-5 hover:text-foreground",onMouseLeave:()=>o(!1),onClick:a,tabIndex:-1,onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&a(c)}
71,children:[s?u.jsx(u0,{className:"size-2.5 text-primary",strokeWidth:2}):u.jsx(RL,{className:"size-2.5",strokeWidth:2}),r&&(s?n:t)]})})}const SB=typeof document<"u"?Be.useLayoutEffect:()=>{};function Joe(e){const t=A.useRef(null);return SB(()=>{t.current=e},[e]),A.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}const Lv=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},gp=e=>e&&"window"in e&&e.window===e?e:Lv(e).defaultView||window;function eae(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function tae(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function TB(e){let t=null;return()=>(t==null&&(t=e()),t)}const nae=TB(function(){return tae(/^Mac/i)}),rae=TB(function(){return eae(/Android/i)});function iae(e){return e.mozInputSource===0&&e.isTrusted?!0:rae()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class sae{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function AB(e){let t=A.useRef({isFocused:!1,observer:null});SB(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Joe(r=>{e?.(r)});return A.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,s=o=>{t.current.isFocused=!1,i.disabled&&n(new sae("blur",o)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",s,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var o;(o=t.current.observer)===null||o===void 0||o.disconnect();let a=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function oae(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const s=A.useCallback(c=>{if(c.target===c.currentTarget)return r&&r(c),i&&i(!1),!0},[r,i]),o=AB(s),a=A.useCallback(c=>{const d=Lv(c.target);c.target===c.currentTarget&&d.activeElement===c.target&&(n&&n(c),i&&i(!0),o(c))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?a:void 0,onBlur:!t&&(r||i)?s:void 0}}}let Bv=null,QS=new Set,ax=new Map,Kp=!1,JS=!1;const aae={Tab:!0,Escape:!0};function xA(e,t){for(let n of QS)n(e,t)}function cae(e){return!(e.metaKey||!nae()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function p6(e){Kp=!0,cae(e)&&(Bv="keyboard",xA("keyboard",e))}function Qa(e){Bv="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Kp=!0,xA("pointer",e))}function kB(e){iae(e)&&(Kp=!0,Bv="virtual")}function CB(e){e.target===window||e.target===document||(!Kp&&!JS&&(Bv="virtual",xA("virtual",e)),Kp=!1,JS=!1)}function IB(){Kp=!1,JS=!0}function eT(e){if(typeof window>"u"||ax.get(gp(e)))return;const t=gp(e),n=Lv(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Kp=!0,r.apply(this,arguments)},n.addEventListener("keydown",p6,!0),n.addEventListener("keyup",p6,!0),n.addEventListener("click",kB,!0),t.addEventListener("focus",CB,!0),t.addEventListener("blur",IB,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Qa,!0),n.addEventListener("pointermove",Qa,!0),n.addEventListener("pointerup",Qa,!0)):(n.addEventListener("mousedown",Qa,!0),n.addEventListener("mousemove",Qa,!0),n.addEventListener("mouseup",Qa,!0)),t.addEventListener("beforeunload",()=>{RB(e)},{once:!0}),ax.set(t,{focus:r})}const RB=(e,t)=>{const n=gp(e),r=Lv(e);t&&r.removeEventListener("DOMContentLoaded",t),ax.has(n)&&(n.HTMLElement.prototype.focu
71s=ax.get(n).focus,r.removeEventListener("keydown",p6,!0),r.removeEventListener("keyup",p6,!0),r.removeEventListener("click",kB,!0),n.removeEventListener("focus",CB,!0),n.removeEventListener("blur",IB,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Qa,!0),r.removeEventListener("pointermove",Qa,!0),r.removeEventListener("pointerup",Qa,!0)):(r.removeEventListener("mousedown",Qa,!0),r.removeEventListener("mousemove",Qa,!0),r.removeEventListener("mouseup",Qa,!0)),ax.delete(n))};function uae(e){const t=Lv(e);let n;return t.readyState!=="loading"?eT(e):(n=()=>{eT(e)},t.addEventListener("DOMContentLoaded",n)),()=>RB(e,n)}typeof document<"u"&&uae();function MB(){return Bv!=="pointer"}const lae=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function dae(e,t,n){var r;const i=typeof window<"u"?gp(n?.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?gp(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<"u"?gp(n?.target).HTMLElement:HTMLElement,a=typeof window<"u"?gp(n?.target).KeyboardEvent:KeyboardEvent;return e=e||n?.target instanceof i&&!lae.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||n?.target instanceof s||n?.target instanceof o&&n?.target.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!aae[n.key])}function fae(e,t,n){eT(),A.useEffect(()=>{let r=(i,s)=>{dae(!!n?.isTextInput,i,s)&&e(MB())};return QS.add(r),()=>{QS.delete(r)}},t)}function hae(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,s=A.useRef({isFocusWithin:!1}),o=A.useCallback(d=>{s.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(s.current.isFocusWithin=!1,n&&n(d),i&&i(!1))},[n,i,s]),a=AB(o),c=A.useCallback(d=>{!s.current.isFocusWithin&&document.activeElement===d.target&&(r&&r(d),i&&i(!0),s.current.isFocusWithin=!0,a(d))},[r,i,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:o}}}let m6=!1,L8=0;function tT(){m6=!0,setTimeout(()=>{m6=!1},50)}function LI(e){e.pointerType==="touch"&&tT()}function pae(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",LI):document.addEventListener("touchend",tT),L8++,()=>{L8--,!(L8>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",LI):document.removeEventListener("touchend",tT))}}function qc(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[s,o]=A.useState(!1),a=A.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;A.useEffect(pae,[]);let{hoverProps:c,triggerHoverEnd:d}=A.useMemo(()=>{let h=(x,_)=>{if(a.pointerType=_,i||_==="touch"||a.isHovered||!x.currentTarget.contains(x.target))return;a.isHovered=!0;let S=x.currentTarget;a.target=S,t&&t({type:"hoverstart",target:S,pointerType:_}),n&&n(!0),o(!0)},y=(x,_)=>{if(a.pointerType="",a.target=null,_==="touch"||!a.isHovered)return;a.isHovered=!1;let S=x.currentTarget;r&&r({type:"hoverend",target:S,pointerType:_}),n&&n(!1),o(!1)},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=x=>{m6&&x.pointerType==="mouse"||h(x,x.pointerType)},g.onPointerLeave=x=>{!i&&x.currentTarget.contains(x.target)&&y(x,x.pointerType)}):(g.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=x=>{!a.ignoreEmulatedMouseEvents&&!m6&&h(x,"mouse"),a.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=x=>{!i&&x.currentTarget.contains(x.target)&&y(x,"mouse")}),{hoverProps:g,triggerHoverEnd:y}},[t,n,r,i,a]);return A.useEffect(()=>{i&&d({currentTarget:a.target},a.pointerType)},[i]),{hoverProps:c,isHovered:s}}function Hc(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=A.useRef({isFocused:!1,isFocusVisible:t||MB()}),[s,o]=A.useState(!1),[a,c]=A.useState(()=>i.current.isFocused&&i.current.isFocusVisible),d=A.useCallback(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),h=A.useCallback(x=>{i.current.isFocused=x,o(x),d()},[d]);fae(x=>{i.current.isFocusVisible=x,d()},[],{isTextInput:n});let{focusProps:y}=oae({isDisabled:r,onFocusChange:h}),{focusWithinProps:g}=hae({isDisabled:!r,onFocusWithinChange:h});return{isFocused:s,isFocusVisible:a,focusProps:r?g:y}}var mae=Object.defineProperty,yae=(e,t,n)=>t in e?mae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B8=(e,t,n)=>(yae(e,typeof t!="symbol"?t+"":t,n),n);let gae=class{constructor(){B8(this,"current",this.detect()),B8(this,"handoffState","pending"),B8(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>
vendor: 12,144 bytes, lines 71-74
71"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Rp=new gae;function Wc(e){return Rp.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function F3(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ya(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return F3(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=ya();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function ac(){let[e]=A.useState(ya);return A.useEffect(()=>()=>e.dispose(),[e]),e}let En=(e,t)=>{Rp.isServer?A.useEffect(e,t):A.useLayoutEffect(e,t)};function Oo(e){let t=A.useRef(e);return En(()=>{t.current=e},[e]),t}let Fe=function(e){let t=Oo(e);return Be.useCallback((...n)=>t.current(...n),[t])};function bae(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function xae(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function fh({disabled:e=!1}={}){let t=A.useRef(null),[n,r]=A.useState(!1),i=ac(),s=Fe(()=>{t.current=null,r(!1),i.dispose()}),o=Fe(a=>{if(i.dispose(),t.current===null){t.current=a.currentTarget,r(!0);{let c=Wc(a.currentTarget);i.addEventListener(c,"pointerup",s,!1),i.addEventListener(c,"pointermove",d=>{if(t.current){let h=bae(d);r(xae(h,t.current.getBoundingClientRect()))}},!1),i.addEventListener(c,"pointercancel",s,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:o,onPointerUp:s,onClick:s}}}let NB=A.createContext(void 0);function el(){return A.useContext(NB)}function vae({value:e,children:t}){return Be.createElement(NB.Provider,{value:e},t)}function nT(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function tr(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,tr),r}var Os=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Os||{}),Df=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Df||{});function gn({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??wae;let c=jB(t,e);if(s)return u5(c,n,r,o,a);let d=i??0;if(d&2){let{static:h=!1,...y}=c;if(h)return u5(y,n,r,o,a)}if(d&1){let{unmount:h=!0,...y}=c;return tr(h?0:1,{0(){return null},1(){return u5({...y,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return u5(c,n,r,o,a)}function u5(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...c}=F8(e,["unmount","static"]),d=e.ref!==void 0?{[a]:e.ref}:{},h=typeof o=="function"?o(t):o;"className"in c&&c.className&&typeof c.className=="function"&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let y={};if(t){let g=!1,x=[];for(let[_,S]of Object.entries(t))typeof S=="boolean"&&(g=!0),S===!0&&x.push(_.replace(/([A-Z])/g,I=>`-${I.toLowerCase()}`));if(g){y["data-headlessui-state"]=x.join(" ");for(let _ of x)y[`data-${_}`]=""}}if(s===A.Fragment&&(Object.keys(Ef(c)).length>0||Object.keys(Ef(y)).length>0))if(!A.isValidElement(h)||Array.isArray(h)&&h.length>1){if(Object.keys(Ef(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Ef(c)).concat(Object.keys(Ef(y))).map(g=>`  - ${g}`).join(`
72`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>`  - ${g}`).join(`
73`)].join(`
74`))}else{let g=h.props,x=g?.className,_=typeof x=="function"?(...L)=>nT(x(...L),c.className):nT(x,c.className),S=_?{className:_}:{},I=jB(h.props,Ef(F8(c,["ref"])));for(let L in y)L in I&&delete y[L];return A.cloneElement(h,Object.assign({},I,y,d,{ref:i(h.ref,d.ref)},S))}return A.createElement(s,Object.assign({},F8(c,["ref"]),s!==A.Fragment&&d,s!==A.Fragment&&y),h)}function vA(){let e=A.useRef([]),t=A.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function wae(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function jB(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var s;return(s=i?.preventDefault)==null?void 0:s.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if((i instanceof Event||i?.nativeEvent instanceof Event)&&i.defaultPrevented)return;a(i,...s)}}});return t}function ps(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];for(let r in n)Object.assign(t,{[r](...i){let s=n[r];for(let o of s)o?.(...i)}});return t}function fn(e){var t;return Object.assign(A.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Ef(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function F8(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let Eae="button";function _ae(e,t){var n;let r=el(),{disabled:i=r||!1,autoFocus:s=!1,...o}=e,{isFocusVisible:a,focusProps:c}=Hc({autoFocus:s}),{isHovered:d,hoverProps:h}=qc({isDisabled:i}),{pressed:y,pressProps:g}=fh({disabled:i}),x=ps({ref:t,type:(n=o.type)!=null?n:"button",disabled:i||void 0,autoFocus:s},c,h,g),_=A.useMemo(()=>({disabled:i,hover:d,focus:a,active:y,autofocus:s}),[i,d,a,y,s]);return gn({ourProps:x,theirProps:o,slot:_,defaultTag:Eae,name:"Button"})}let Sae=fn(_ae);function Fv(e,t,n){let[r,i]=A.useState(n),s=e!==void 0,o=A.useRef(s),a=A.useRef(!1),c=A.useRef(!1);return s&&!o.current&&!a.current?(a.current=!0,o.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!s&&o.current&&!c.current&&(c.current=!0,o.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[s?e:r,Fe(d=>(s||i(d),t?.(d)))]}function Dv(e){let[t]=A.useState(e);return t}function PB(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))LB(n,OB(t,r),i);return n}function OB(e,t){return e?e+"["+t+"]":t}function LB(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())LB(e,OB(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):PB(n,t,e)}function D3(e){var t,n;let r=(t=e?.form)!=null?t:e.closest("form");if(r){for(let i of r.elements)if(i!==e&&(i.tagName==="INPUT"&&i.type==="submit"||i.tagName==="BUTTON"&&i.type==="submit"||i.nodeName==="INPUT"&&i.type==="image")){i.click();return}(n=r.requestSubmit)==null||n.call(r)}}let Tae="span";var Ku=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ku||{});function Aae(e,t){var n;let{features:r=1,...i}=e,s={ref:t,"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return gn({ourProps:s,theirProps:i,slot:{},defaultTag:Tae,name:"Hidden"})}let od=fn(Aae),BB=A.createContext(null);function kae(e){let[t,n]=A.useState(null);return Be.createElement(BB.Provider,{value:{target:t}},e.children,Be.createElement(od,{features:Ku.Hidden,ref:n}))}function Cae({children:e}){let t=A.useContext(BB);if(!t)return Be.createElement(Be.Fragment,null,e);let{target:n}=t;return n?gr.createPortal(Be.createElement(Be.Fragment,null,e),n):null}function $v({data:e,form:t,disabled:n,onReset:r,overrides:i}){let[s,o]=A.useState(null),a=ac();return A.useEffect(()=>{if(r&&s)return a.addEventListener(s,"reset",r)},[s,t,r]),Be.createElement(Cae,null,Be.createElement(Iae,{setForm:o,formId:t}),PB(e).map(([c,d])=>Be.createElement(od,{features:Ku.Hidden,...Ef({key:c,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:c,value:d,...i})})))}function Iae({setForm:e,formId:t}){return A.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:Be.createElement(od,{features:Ku.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let FB=A.createContext(void 0);function Lg(){return A.useContext(FB)}function Rae({id:e,children:t}){return Be.createElement(FB.Provider,{value:e},t)}function tl(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=t?.getAttribute("disabled")==="";return r&&Mae(n)?!1:r}function Mae(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let DB=Symbol();function wA(e,t=!0){return Object.assign(e,{[DB]:t})}function Fn(...e){let t=A.useRef(e);A.useEffect(()=>{t.current=e},[e]);let n=Fe(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||r?.[DB])?void 0:n}let $3=A.createContext(null);$3.displayName="DescriptionContext";function $B(){let e=A.useContext($3);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,$B),t}return e}function Uv(){var e,t;return(t=(e=A.useContext($3))==null?void 0:e.value)!=null?t:void 0}function Bg(){let[e,t]=A.useState([]);return[e.length>0?e.join(" "):void 0,A.useMemo(()=>function(n){let r=Fe(s=>(t(o=>[...o,s]),()=>t(o=>{let a=o.slice(),c=a.indexOf(s);return c!==-1&&a.splice(c,1),a}))),i=A.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return Be.createElement($3.Provider,{value:i},n.children)},[t])]}let Nae="p";function jae(e,t){let n=A.useId(),r=el(),{id:i=`headlessui-description-${n}`,...s}=e,o=$B(),a=Fn(t);En(()=>o.register(i),[i,o.register]);let c=r||!1,d=A.useMemo(()=>({...o.slot,disabled:c}),[o.slot,c]),h={ref:a,...o.props,id:i};return gn({ourProps:h,theirProps:s,slot:d,defaultTag:Nae,name:o.name||"Description"})}let Pae=fn(jae),EA=Object.assign(Pae,{});var _t=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(_t||{});let U3=A.createContext(null);
74U3.displayName="LabelContext";function _A(){let e=A.useContext(U3);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,_A),t}return e}function hh(e){var t,n,r;let i=(n=(t=A.useContext(U3))==null?void 0:t.value)!=null?n:void 0;return((r=e?.length)!=null?r:0)>0?[i,...e].filter(Boolean).join(" "):i}function ph({inherit:e=!1}={}){let t=hh(),[n,r]=A.useState([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,A.useMemo(()=>function(s){let o=Fe(c=>(r(d=>[...d,c]),()=>r(d=>{let h=d.slice(),y=h.indexOf(c);return y!==-1&&h.splice(y,1),h}))),a=A.useMemo(()=>({register:o,slot:s.slot,name:s.name,props:s.props,value:s.value}),[o,s.slot,s.name,s.props,s.value]);return Be.createElement(U3.Provider,{value:a},s.children)},[r])]}let Oae="label";function Lae(e,t){var n;let r=A.useId(),i=_A(),s=Lg(),o=el(),{id:a=`headlessui-label-${r}`,htmlFor:c=s??((n=i.props)==null?void 0:n.htmlFor),passive:d=!1,...h}=e,y=Fn(t);En(()=>i.register(a),[a,i.register]);let g=Fe(I=>{let L=I.currentTarget;if(L instanceof HTMLLabelElement&&I.preventDefault(),i.props&&"onClick"in i.props&&typeof i.props.onClick=="function"&&i.props.onClick(I),L instanceof HTMLLabelElement){let D=document.getElementById(L.htmlFor);if(D){let F=D.getAttribute("disabled");if(F==="true"||F==="")return;let $=D.getAttribute("aria-disabled");if($==="true"||$==="")return;(D instanceof HTMLInputElement&&(D.type==="radio"||D.type==="checkbox")||D.role==="radio"||D.role==="checkbox"||D.role==="switch")&&D.click(),D.focus({preventScroll:!0})}}}
74),x=o||!1,_=A.useMemo(()=>({...i.slot,disabled:x}),[i.slot,x]),S={ref:y,...i.props,id:a,htmlFor:c,onClick:g};return d&&("onClick"in S&&(delete S.htmlFor,delete S.onClick),"onClick"in h&&delete h.onClick),gn({ourProps:S,theirProps:h,slot:_,defaultTag:c?Oae:"div",name:i.name||"Label"})}let Bae=fn(Lae),zv=Object.assign(Bae,{}),Fae="span";function Dae(e,t){let n=A.useId(),r=Lg(),i=el(),{id:s=r||`headlessui-checkbox-${n}`,disabled:o=i||!1,autoFocus:a=!1,checked:c,defaultChecked:d,onChange:h,name:y,value:g,form:x,indeterminate:_=!1,...S}=e,I=Dv(d),[L,D]=Fv(c,h,I??!1),F=hh(),$=Uv(),z=ac(),[V,K]=A.useState(!1),te=Fe(()=>{K(!0),D?.(!L),z.nextFrame(()=>{K(!1)})}),Q=Fe(j=>{if(tl(j.currentTarget))return j.preventDefault();j.preventDefault(),te()}),ee=Fe(j=>{j.key===_t.Space?(j.preventDefault(),te()):j.key===_t.Enter&&D3(j.currentTarget)}),ne=Fe(j=>j.preventDefault()),{isFocusVisible:J,focusProps:M}=Hc({autoFocus:a}),{isHovered:m,hoverProps:E}=qc({isDisabled:o}),{pressed:C,pressProps:N}=fh({disabled:o}),P=ps({ref:t,id:s,role:"checkbox","aria-checked":_?"mixed":L?"true":"false","aria-labelledby":F,"aria-describedby":$,"aria-disabled":o?!0:void 0,indeterminate:_?"true":void 0,tabIndex:o?void 0:0,onKeyUp:o?void 0:ee,onKeyPress:o?void 0:ne,onClick:o?void 0:Q},M,E,N),B=A.useMemo(()=>({checked:L,disabled:o,hover:m,focus:J,active:C,indeterminate:_,changing:V,autofocus:a}),[L,_,o,m,J,C,V,a]),O=A.useCallback(()=>{if(I!==void 0)return D?.(I)},[D,I]);return Be.createElement(Be.Fragment,null,y!=null&&Be.createElement($v,{disabled:o,data:{[y]:g||"on"},overrides:{type:"checkbox",checked:L},form:x,onReset:O}),gn({ourProps:P,theirProps:S,slot:B,defaultTag:Fae,name:"Checkbox"}))}let $ae=fn(Dae),Uae=A.createContext(()=>{});function SA({value:e,children:t}){return Be.createElement(Uae.Provider,{value:e},t)}function Jm(e,t,n){let r=n.initialDeps??[],i;return()=>{var s,o,a,c;let d;n.key&&((s=n.debug)!=null&&s.call(n))&&(d=Date.now());const h=e();if(!(h.length!==r.length||h.some((x,_)=>r[_]!==x)))return i;r=h;let g;if(n.key&&((o=n.debug)!=null&&o.call(n))&&(g=Date.now()),i=t(...h),n.key&&((a=n.debug)!=null&&a.call(n))){const x=Math.round((Date.now()-d)*100)/100,_=Math.round((Date.now()-g)*100)/100,S=_/16,I=(L,D)=>{for(L=String(L);L.length<D;)L=" "+L;return L};console.info(`%c⏱ ${I(_,5)} /${I(x,5)} ms`,`
75            font-size: .6rem;
76            font-weight: bold;
77            color: hsl(${Math.max(0,Math.min(120-120*S,120))}deg 100% 31%);`,n?.key)}return(c=n?.onChange)==null||c.call(n,i),i}}function D8(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const zae=(e,t)=>Math.abs(e-t)<1,Vae=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},qae=e=>e,Hae=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let i=t;i<=n;i++)r.push(i);return r},Wae=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const i=o=>{const{width:a,height:c}=o;t({width:Math.round(a),height:Math.round(c)})};if(i(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(o=>{const a=o[0];if(a?.borderBoxSize){const c=a.borderBoxSize[0];if(c){i({width:c.inlineSize,height:c.blockSize});return}}i(n.getBoundingClientRect())});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},BI={passive:!0},Gae=typeof window>"u"?!0:"onscrollend"in window,Kae=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let i=0;const s=Gae?()=>{}:Vae(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=d=>()=>{const{horizontal:h,isRtl:y}=e.options;i=h?n.scrollLeft*(y&&-1||1):n.scrollTop,s(),t(i,d)},a=o(!0),c=o(!1);return c(),n.addEventListener("scroll",a,BI),n.addEventListener("scrollend",c,BI),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",c)}},Yae=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Zae=(e,{adjustments:t=0,behavior:n},r)=>{var i,s;const o=e+t;(s=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[r.options.horizontal?"left"
77:"top"]:o,behavior:n})};class Xae{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(s=>{this._measureElement(s.target,s)})}));return{disconnect:()=>{var i;return(i=r())==null?void 0:i.disconnect()},observe:i=>{var s;return(s=r())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=r())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,i])=>{typeof i>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:qae,rangeExtractor:Hae,onChange:()=>{},measureElement:Yae,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,...n}},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=Jm(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=s,this.maybeNotify()}))}}
77,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const i=new Map,s=new Map;for(let o=r-1;o>=0;o--){const a=n[o];if(i.has(a.lane))continue;const c=s.get(a.lane);if(c==null||a.end>c.end?s.set(a.lane,a):a.end<c.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((o,a)=>o.end===a.end?o.index-a.index:o.end-a.end)[0]:void 0},this.getMeasurementOptions=Jm(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,i,s,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:o}),{key:!1}),this.getMeasurements=Jm(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:o},a)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const d=this.measurementsCache.slice(0,c);for(let h=c;h<n;h++){const y=s(h),g=this.options.lanes===1?d[h-1]:this.getFurthestMeasurement(d,h),x=g?g.end+this.options.gap:r+i,_=a.get(y),S=typeof _=="number"?_:this.options.estimateSize(h),I=x+S,L=g?g.lane:h%this.options.lanes;d[h]={index:h,start:x,size:S,end:I,key:y,lane:L}}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Jm(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,i)=>this.range=n.length>0&&r>0?Qae({measurements:n,outerSize:r,scrollOffset:i}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Jm(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,i,s)=>r===null?[]:n({startIndex:r.startIndex,endIndex:r.endIndex,overscan:i,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const i=this.indexFromElement(n),s=this.measurementsCache[i];if(!s)return;const o=s.key,a=this.elementsCache.get(o);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const i=this.measurementsCache[n];if(!i)return;const s=this.itemSizeCache.get(i.key)??i.size,o=r-s;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,o,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,i)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=Jm(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let s=0,o=n.length;s<o;s++){const a=n[s],c=r[a];i.push(c)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return D8(r[UB(0,r.length-1,i=>D8(r[i]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const i=this.getSize(),s=this.getScrollOffset();r==="auto"&&(n<=s?r="start":n>=s+i?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-i:r==="center"&&(n=n-i/2);const o=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-i;return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const s=this.getSize(),o=this.getScrollOffset();if(r==="auto")if(i.end>=o+s-this.options.scrollPaddingEnd)r="end";else if(i.start<=o+this.options.scrollPaddingStart)r="start";else return[o,r];const a=r==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:r="auto",behavior:i}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const s=this.getOffsetForIndex(n,r);if(!s)return;const[o,a]=s;this._scrollToOffset(o,{adjustments:void 0,behavior:i}),i!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[d]=D8(this.getOffsetForIndex(n,a));
77zae(d,this.getScrollOffset())||this.scrollToIndex(n,{align:a,behavior:i})}else this.scrollToIndex(n,{align:a,behavior:i})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;return r.length===0?i=this.options.paddingStart:i=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),i-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const UB=(e,t,n,r)=>{for(;e<=t;){const i=(e+t)/2|0,s=n(i);if(s<r)e=i+1;else if(s>r)t=i-1;else return i}return e>0?e-1:0};function Qae({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,s=UB(0,r,a=>e[a].start,n);let o=s;for(;o<r&&e[o].end<n+t;)o++;return{startIndex:s,endIndex:o}}const Jae=typeof document<"u"?A.useLayoutEffect:A.useEffect;function ece(e){const t=A.useReducer(()=>({}),{})[1],n={...e,onChange:(i,s)=>{var o;s?gr.flushSync(t):t(),(o=e.onChange)==null||o.call(e,i,s)}},[r]=A.useState(()=>new Xae(n));return r.setOptions(n),A.useEffect(()=>r._didMount(),[]),Jae(()=>r._willUpdate()),r}function tce(e){return ece({observeElementRect:Wae,observeElementOffset:Kae,scrollToFn:Zae,...e})}function nce(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function TA(e=nce){return A.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return t?.[r]===n?.[r]}return e(t,n)},[e])}function rce(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function $x(e,t=!1){let n=e===null?null:"current"in e?e.current:e,[r,i]=A.useReducer(()=>({}),{}),s=A.useMemo(()=>rce(n),[n,r]);return En(()=>{if(!n)return;let o=new ResizeObserver(i);return o.observe(n),()=>{o.disconnect()}},[n]),t?{width:`${s.width}px`,height:`${s.height}px`}:s}let ice=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};function zB(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...s){let o=t[i].call(n,...s);o&&(n=o,r.forEach(a=>a()))}}}function VB(e){return A.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}let sce=new ice(()=>zB(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let n=this.slice();return n.splice(t,1),n}}));function Fg(e,t){let n=sce.get(t),r=A.useId(),i=VB(n);if(En(()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)},[n,e]),!e)return!1;let s=i.indexOf(r),o=i.length;return s===-1&&(s=o,o+=1),s===o-1}let rT=new Map,cx=new Map;function FI(e){var t;let n=(t=cx.get(e))!=null?t:0;return cx.set(e,n+1),n!==0?()=>DI(e):(rT.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>DI(e))}function DI(e){var t;let n=(t=cx.get(e))!=null?t:1;if(n===1?cx.delete(e):cx.set(e,n-1),n!==1)return;let r=rT.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,rT.delete(e))}function z3(e,{allowed:t,disallowed:n}={}){let r=Fg(e,"inert-others");En(()=>{var i,s;if(!r)return;let o=ya();for(let c of(i=n?.())!=null?i:[])c&&o.add(FI(c));let a=(s=t?.())!=null?s:[];for(let c of a){if(!c)continue;let d=Wc(c);if(!d)continue;let h=c.parentElement;for(;h&&h!==d.body;){for(let y of h.children)a.some(g=>y.contains(g))||o.add(FI(y));h=h.parentElement}}return o.dispose},[r,t,n])}function Dg(e,t,n){let r=Oo(i=>{let s=i.getBoundingClientRect();s.x===0&&s.y===0&&s.width===0&&s.height===0&&n()});A.useEffect(()=>{if(!e)return;let i=t===null?null:t instanceof HTMLElement?t:t.current;if(!i)return;let s=ya();if(typeof ResizeObserver<"u"){let o=new ResizeObserver(()=>r.current(i));o.observe(i),s.add(()=>o.disconnect())}if(typeof IntersectionObserver<"u"){let o=new IntersectionObserver(()=>r.current(i));o.observe(i),s.add(()=>o.disconnect())}return()=>s.dispose()},[t,r,e])}let y6=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),oce=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Br=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Br||{}),th=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(th||{}),ace=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(ace||{});function Vv(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(y6)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function cce(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(
77oce)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var qv=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(qv||{});function Hv(e,t=0){var n;return e===((n=Wc(e))==null?void 0:n.body)?!1:tr(t,{0(){return e.matches(y6)},1(){let r=e;for(;r!==null;){if(r.matches(y6))return!0;r=r.parentElement}return!1}})}function qB(e){let t=Wc(e);ya().nextFrame(()=>{t&&!Hv(t.activeElement,0)&&zu(e)})}var uce=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(uce||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function zu(e){e?.focus({preventScroll:!0})}let lce=["textarea","input"].join(",");function dce(e){var t,n;return(n=(t=e?.matches)==null?void 0:t.call(e,lce))!=null?n:!1}function Wv(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),s=t(r);if(i===null||s===null)return 0;let o=i.compareDocumentPosition(s);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function HB(e,t){return no(Vv(),t,{relativeTo:e})}function no(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?n?Wv(e):e:t&64?cce(e):Vv(e);i.length>0&&o.length>1&&(o=o.filter(x=>!i.some(_=>_!=null&&"current"in _?_?.current===x:_===x))),r=r??s.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},h=0,y=o.length,g;do{if(h>=y||h+y<=0)return 0;let x=c+h;if(t&16)x=(x+y)%y;else{if(x<0)return 3;if(x>=y)return 1}g=o[x],g?.focus(d),h+=a}while(g!==s.activeElement);return t&6&&dce(g)&&g.select(),2}function WB(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function fce(){return/Android/gi.test(window.navigator.userAgent)}function GB(){return WB()||fce()}function Bb(e,t,n,r){let i=Oo(n);A.useEffect(()=>{if(!e)return;function s(o){i.current(o)}return document.addEventListener(t,s,r),()=>document.removeEventListener(t,s,r)},[e,t,r])}function KB(e,t,n,r){let i=Oo(n);A.useEffect(()=>{if(!e)return;function s(o){i.current(o)}return window.addEventListener(t,s,r),()=>window.removeEventListener(t,s,r)},[e,t,r])}const $I=30;function Gv(e,t,n){let r=Fg(e,"outside-click"),i=Oo(n),s=A.useCallback(function(c,d){if(c.defaultPrevented)return;let h=d(c);if(h===null||!h.getRootNode().contains(h)||!h.isConnected)return;let y=(function g(x){return typeof x=="function"?g(x()):Array.isArray(x)||x instanceof Set?x:[x]})(t);for(let g of y){if(g===null)continue;let x=g instanceof HTMLElement?g:g.current;if(x!=null&&x.contains(h)||c.composed&&c.composedPath().includes(x))return}return!Hv(h,qv.Loose)&&h.tabIndex!==-1&&c.preventDefault(),i.current(c,h)},[i]),o=A.useRef(null);Bb(r,"pointerdown",c=>{var d,h;o.current=((h=(d=c.composedPath)==null?void 0:d.call(c))==null?void 0:h[0])||c.target},!0),Bb(r,"mousedown",c=>{var d,h;o.current=((h=(d=c.composedPath)==null?void 0:d.call(c))==null?void 0:h[0])||c.target},!0),Bb(r,"click",c=>{GB()||o.current&&(s(c,()=>o.current),o.current=null)},!0);let a=A.useRef({x:0,y:0});Bb(r,"touchstart",c=>{a.current.x=c.touches[0].clientX,a.current.y=c.touches[0].clientY},!0),Bb(r,"touchend",c=>{let d={x:c.changedTouches[0].clientX,y:c.changedTouches[0].clientY};if(!(Math.abs(d.x-a.current.x)>=$I||Math.abs(d.y-a.current.y)>=$I))return s(c,()=>c.target instanceof HTMLElement?c.target:null)},!0),KB(r,"blur",c=>s(c,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function cc(...e){return A.useMemo(()=>Wc(...e),[...e])}function V3(e,t,n,r){let i=Oo(n);A.useEffect(()=>{e=e??window;function s(o){i.current(o)}return e.addEventListener(t,s,r),()=>e.removeEventListener(t,s,r)},[e,t,r])}function YB(e){let t=A.useRef({value:"",selectionStart:null,selectionEnd:null});return V3(e.current,"blur",n=>{let r=n.target;r instanceof HTMLInputElement&&(t.current={value:r.value,selectionStart:r.selectionStart,selectionEnd:r.selectionEnd})}),Fe(()=>{let n=e.current;if(document.activeElement!==n&&n instanceof HTMLInputElement&&n.isConnected){if(n.focus({preventScroll:!0}),n.value!==t.current.value)n.setSelectionRange(n.value.length,n.value.length);else{let{selectionStart:r,selectionEnd:i}=t.current;r!==null&&i!==null&&n.setSelectionRange(r,i)}t.current={value:"",selectionStart:null,selectionEnd:null}}})}function UI(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function $g(e,t){let[n,r]=A.useState(()=>UI(e));return En(()=>{r(UI(e))},[e.type,e.as]),En(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}function hce(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=(n=t.defaultView)!=null?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-i);n.style(r,"paddingRight",`${s}px`)}}}function pce(){return WB()?{before({doc:e,d:t,meta:n}){function r(i){return n.containers.flatMap(s=>s()).some(s=>s.contains(i))}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=ya();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let s=(i=window.scrollY)!=null?i:window.pageYOffset,o=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let c=a.target.closest("a");if(!c)return;let{hash:d}=new URL(c.href),h=e.querySelector(d);h&&!r(h)&&(o=h)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(r(a.target)){let c=a.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;t.style(c,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(r(a.target)){let c=a.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let c=(a=window.scrollY)!=null?a:window.pageYOffset;s!==c&&window.scrollTo(0,s),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})})}}:{}}function mce(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function yce(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let bp=zB(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ya(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:yce(n)},i=[pce(),hce(),mce()];
77i.forEach(({before:s})=>s?.(r)),i.forEach(({after:s})=>s?.(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});bp.subscribe(()=>{let e=bp.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&bp.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&bp.dispatch("TEARDOWN",n)}});function gce(e,t,n=()=>({containers:[]})){let r=VB(bp),i=t?r.get(t):void 0,s=i?i.count>0:!1;return En(()=>{if(!(!t||!e))return bp.dispatch("PUSH",t,n),()=>bp.dispatch("POP",t,n)},[e,t]),s}function Kv(e,t,n=()=>[document.body]){let r=Fg(e,"scroll-lock");gce(r,t,i=>{var s;return{containers:[...(s=i.containers)!=null?s:[],n]}})}function zI(e){return[e.screenX,e.screenY]}function AA(){let e=A.useRef([-1,-1]);return{wasMoved(t){let n=zI(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=zI(t)}}}function bce(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function xce(e=0){let[t,n]=A.useState(e),r=A.useCallback(c=>n(c),[t]),i=A.useCallback(c=>n(d=>d|c),[t]),s=A.useCallback(c=>(t&c)===c,[t]),o=A.useCallback(c=>n(d=>d&~c),[n]),a=A.useCallback(c=>n(d=>d^c),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var vce=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(vce||{});function d0(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function f0(e,t,n,r){let[i,s]=A.useState(n),{hasFlag:o,addFlag:a,removeFlag:c}=xce(e&&i?3:0),d=A.useRef(!1),h=A.useRef(!1),y=ac();return En(function g(){var x;if(!e)return;n&&s(!0);let _=t.current;return _?((x=r?.start)==null||x.call(r,n),wce(_,{inFlight:d,prepare(){h.current?h.current=!1:h.current=d.current,d.current=!0,!h.current&&(n?(a(3),c(4)):(a(4),c(2)))},run(){h.current?n?(c(3),a(4)):(c(4),a(3)):n?c(1):a(1)},done(){var S;h.current&&typeof _.getAnimations=="function"&&_.getAnimations().length>0||(d.current=!1,c(7),n||s(!1),(S=r?.end)==null||S.call(r,n))}})):n?(a(3),y.nextFrame(()=>g())):void 0},[e,n,t,y]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function wce(e,{prepare:t,run:n,done:r,inFlight:i}){let s=ya();return _ce(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{s.add(Ece(e,r)),n()}),s.dispose}function Ece(e,t){let n=bce(t),r=ya();if(!e)return r.dispose;let{transitionDuration:i,transitionDelay:s}=getComputedStyle(e),[o,a]=[i,s].map(d=>{let[h=0]=d.split(",").filter(Boolean).map(y=>y.includes("ms")?parseFloat(y):parseFloat(y)*1e3).sort((y,g)=>g-y);return h}),c=o+a;if(c!==0){let d=r.group(h=>{let y=h.setTimeout(()=>{n(),h.dispose()},c);h.addEventListener(e,"transitionrun",g=>{g.target===g.currentTarget&&(y(),h.addEventListener(e,"transitioncancel",x=>{x.target===x.currentTarget&&(n(),d())}))})});r.addEventListener(e,"transitionend",h=>{h.target===h.currentTarget&&(n(),r.dispose())})}else n();return r.dispose}function _ce(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function ZB(e,{container:t,accept:n,walk:r}){let i=A.useRef(n),s=A.useRef(r);A.useEffect(()=>{i.current=n,s.current=r},[n,r]),En(()=>{if(!t||!e)return;let o=Wc(t);if(!o)return;let a=i.current,c=s.current,d=Object.assign(y=>a(y),{acceptNode:a}),h=o.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,d,!1);for(;h.nextNode();)c(h.currentNode)},[t,e,i,s])}function Ux(e,t){let n=A.useRef([]),r=Fe(e);A.useEffect(()=>{let i=[...n.current];for(let[s,o]of t.entries())if(n.current[s]!==o){let a=r(t,i);return n.current=t,a}},[r,...t])}function Ug(e){return XB(e)?(e.nodeName||"").toLowerCase():"#document"}function fa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bd(e){var t;return(t=(XB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function XB(e){return e instanceof Node||e instanceof fa(e).Node}function ro(e){return e instanceof Element||e instanceof fa(e).Element}function Yu(e){return e instanceof HTMLElement||e instanceof fa(e).HTMLElement}function VI(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fa(e).ShadowRoot}function Yv(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=$c(e);
77return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Sce(e){return["table","td","th"].includes(Ug(e))}function q3(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function kA(e){const t=CA(),n=ro(e)?$c(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Tce(e){let t=nh(e);for(;Yu(t)&&!hg(t);){if(kA(t))return t;if(q3(t))return null;t=nh(t)}return null}function CA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function hg(e){return["html","body","#document"].includes(Ug(e))}function $c(e){return fa(e).getComputedStyle(e)}function H3(e){return ro(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nh(e){if(Ug(e)==="html")return e;const t=e.assignedSlot||e.parentNode||VI(e)&&e.host||bd(e);return VI(t)?t.host:t}function QB(e){const t=nh(e);return hg(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yu(t)&&Yv(t)?t:QB(t)}function zx(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=QB(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=fa(i);if(s){const a=iT(o);return t.concat(o,o.visualViewport||[],Yv(i)?i:[],a&&n?zx(a):[])}return t.concat(i,zx(i,[],n))}function iT(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ace(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const sT=Math.min,Cy=Math.max,g6=Math.round,l5=Math.floor,rh=e=>({x:e,y:e});function kce(e,t){return typeof e=="function"?e(t):e}const oT=Math.min,cp=Math.max,Cce={left:"right",right:"left",bottom:"top",top:"bottom"},Ice={start:"end",end:"start"};function qI(e,t,n){return cp(e,oT(t,n))}function Zv(e,t){return typeof e=="function"?e(t):e}function ih(e){return e.split("-")[0]}function Xv(e){return e.split("-")[1]}function JB(e){return e==="x"?"y":"x"}function eF(e){return e==="y"?"height":"width"}function Qv(e){return["top","bottom"].includes(ih(e))?"y":"x"}function tF(e){return JB(Qv(e))}function Rce(e,t,n){n===void 0&&(n=!1);const r=Xv(e),i=tF(e),s=eF(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=b6(o)),[o,b6(o)]}function Mce(e){const t=b6(e);return[aT(e),t,aT(t)]}function aT(e){return e.replace(/start|end/g,t=>Ice[t])}function Nce(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function jce(e,t,n,r){const i=Xv(e);let s=Nce(ih(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(aT)))),s}function b6(e){return e.replace(/left|right|bottom|top/g,t=>Cce[t])}function Pce(e){return{top:0,right:0,bottom:0,left:0,...e}}function Oce(e){return typeof e!="number"?Pce(e):{top:e,right:e,bottom:e,left:e}}function x6(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function HI(e,t,n){let{reference:r,floating:i}=e;const s=Qv(t),o=tF(t),a=eF(o),c=ih(t),d=s==="y",h=r.x+r.width/2-i.width/2,y=r.y+r.height/2-i.height/2,g=r[a]/2-i[a]/2;let x;switch(c){case"top":x={x:h,y:r.y-i.height};break;case"bottom":x={x:h,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y};break;case"left":x={x:r.x-i.width,y};break;default:x={x:r.x,y:r.y}}switch(Xv(t)){case"start":x[o]-=g*(n&&d?-1:1);break;case"end":x[o]+=g*(n&&d?-1:1);break}return x}const Lce=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y}=HI(d,r,c),g=r,x={},_=0;for(let S=0;S<a.length;S++){const{name:I,fn:L}=a[S],{x:D,y:F,data:$,reset:z}=await L({x:h,y,initialPlacement:r,placement:g,strategy:i,middlewareData:x,rects:d,platform:o,elements:{reference:e,floating:t}});h=D??h,y=F??y,x={...x,[I]:{...x[I],...$}},z&&_<=50&&(_++,typeof z=="object"&&(z.placement&&(g=z.placement),z.rects&&(d=z.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}
77):z.rects),{x:h,y}=HI(d,g,c)),S=-1)}return{x:h,y,placement:g,strategy:i,middlewareData:x}};async function W3(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:y="floating",altBoundary:g=!1,padding:x=0}=Zv(t,e),_=Oce(x),I=a[g?y==="floating"?"reference":"floating":y],L=x6(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(I)))==null||n?I:I.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:d,rootBoundary:h,strategy:c})),D=y==="floating"?{...o.floating,x:r,y:i}:o.reference,F=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),$=await(s.isElement==null?void 0:s.isElement(F))?await(s.getScale==null?void 0:s.getScale(F))||{x:1,y:1}:{x:1,y:1},z=x6(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:D,offsetParent:F,strategy:c}):D);return{top:(L.top-z.top+_.top)/$.y,bottom:(z.bottom-L.bottom+_.bottom)/$.y,left:(L.left-z.left+_.left)/$.x,right:(z.right-L.right+_.right)/$.x}}const Bce=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:c,elements:d}=t,{mainAxis:h=!0,crossAxis:y=!0,fallbackPlacements:g,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:S=!0,...I}=Zv(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const L=ih(i),D=ih(a)===a,F=await(c.isRTL==null?void 0:c.isRTL(d.floating)),$=g||(D||!S?[b6(a)]:Mce(a));!g&&_!=="none"&&$.push(...jce(a,S,_,F));const z=[a,...$],V=await W3(t,I),K=[];let te=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&K.push(V[L]),y){const J=Rce(i,o,F);K.push(V[J[0]],V[J[1]])}if(te=[...te,{placement:i,overflows:K}],!K.every(J=>J<=0)){var Q,ee;const J=(((Q=s.flip)==null?void 0:Q.index)||0)+1,M=z[J];if(M)return{data:{index:J,overflows:te},reset:{placement:M}};let m=(ee=te.filter(E=>E.overflows[0]<=0).sort((E,C)=>E.overflows[1]-C.overflows[1])[0])==null?void 0:ee.placement;if(!m)switch(x){case"bestFit":{var ne;const E=(ne=te.map(C=>[C.placement,C.overflows.filter(N=>N>0).reduce((N,P)=>N+P,0)]).sort((C,N)=>C[1]-N[1])[0])==null?void 0:ne[0];E&&(m=E);break}case"initialPlacement":m=a;break}if(i!==m)return{reset:{placement:m}}}return{}}}};async function Fce(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ih(n),a=Xv(n),c=Qv(n)==="y",d=["left","top"].includes(o)?-1:1,h=s&&c?-1:1,y=Zv(t,e);let{mainAxis:g,crossAxis:x,alignmentAxis:_}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return a&&typeof _=="number"&&(x=a==="end"?_*-1:_),c?{x:x*h,y:g*d}:{x:g*d,y:x*h}}const Dce=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,c=await Fce(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:o}}}}},$ce=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:I=>{let{x:L,y:D}=I;return{x:L,y:D}}},...c}=Zv(e,t),d={x:n,y:r},h=await W3(t,c),y=Qv(ih(i)),g=JB(y);let x=d[g],_=d[y];if(s){const I=g==="y"?"top":"left",L=g==="y"?"bottom":"right",D=x+h[I],F=x-h[L];x=qI(D,x,F)}if(o){const I=y==="y"?"top":"left",L=y==="y"?"bottom":"right",D=_+h[I],F=_-h[L];_=qI(D,_,F)}const S=a.fn({...t,[g]:x,[y]:_});return{...S,data:{x:S.x-n,y:S.y-r}}}}},Uce=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:s}=t,{apply:o=()=>{},...a}=Zv(e,t),c=await W3(t,a),d=ih(n),h=Xv(n),y=Qv(n)==="y",{width:g,height:x}=r.floating;let _,S;d==="top"||d==="bottom"?(_=d,S=h===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(S=d,_=h==="end"?"top":"bottom");const I=x-c[_],L=g-c[S],D=!t.middlewareData.shift;let F=I,$=L;if(y){const V=g-c.left-c.right;$=h||D?oT(L,V):V}else{const V=x-c.top-c.bottom;F=h||D?oT(I,V):V}if(D&&!h){const V=cp(c.left,0),K=cp(c.right,0),te=cp(c.top,0),Q=cp(c.bottom,0);y?$=g-2*(V!==0||K!==0?V+K:cp(c.left,c.right)):F=x-2*(te!==0||Q!==0?te+Q:cp(c.top,c.bottom))}await o({...t,availableWidth:$,availableHeight:F});const z=await i.getDimensions(s.floating);return g!==z.width||x!==z.height?{reset:{rects:!0}}:{}}}};function nF(e){const t=$c(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Yu(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=g6(n)!==s||g6(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function IA(e){return ro(e)?e:e.contextElement}function Iy(e){const t=IA(e);if(!Yu(t))return rh(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=nF(t);let o=(s?g6(n.width):n.width)/r,a=(s?g6(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const zce=rh(0);function rF(e){const t=fa(e);
77return!CA()||!t.visualViewport?zce:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vce(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fa(e)?!1:t}function Yp(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=IA(e);let o=rh(1);t&&(r?ro(r)&&(o=Iy(r)):o=Iy(e));const a=Vce(s,n,r)?rF(s):rh(0);let c=(i.left+a.x)/o.x,d=(i.top+a.y)/o.y,h=i.width/o.x,y=i.height/o.y;if(s){const g=fa(s),x=r&&ro(r)?fa(r):r;let _=g,S=iT(_);for(;S&&r&&x!==_;){const I=Iy(S),L=S.getBoundingClientRect(),D=$c(S),F=L.left+(S.clientLeft+parseFloat(D.paddingLeft))*I.x,$=L.top+(S.clientTop+parseFloat(D.paddingTop))*I.y;c*=I.x,d*=I.y,h*=I.x,y*=I.y,c+=F,d+=$,_=fa(S),S=iT(_)}}return x6({width:h,height:y,x:c,y:d})}function qce(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=bd(r),a=t?q3(t.floating):!1;if(r===o||a&&s)return n;let c={scrollLeft:0,scrollTop:0},d=rh(1);const h=rh(0),y=Yu(r);if((y||!y&&!s)&&((Ug(r)!=="body"||Yv(o))&&(c=H3(r)),Yu(r))){const g=Yp(r);d=Iy(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+h.x,y:n.y*d.y-c.scrollTop*d.y+h.y}}function Hce(e){return Array.from(e.getClientRects())}function iF(e){return Yp(bd(e)).left+H3(e).scrollLeft}function Wce(e){const t=bd(e),n=H3(e),r=e.ownerDocument.body,i=Cy(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Cy(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+iF(e);const a=-n.scrollTop;return $c(r).direction==="rtl"&&(o+=Cy(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function Gce(e,t){const n=fa(e),r=bd(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const d=CA();(!d||d&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:a,y:c}}function Kce(e,t){const n=Yp(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Yu(e)?Iy(e):rh(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,c=i*s.x,d=r*s.y;return{width:o,height:a,x:c,y:d}}function WI(e,t,n){let r;if(t==="viewport")r=Gce(e,n);else if(t==="document")r=Wce(bd(e));else if(ro(t))r=Kce(t,n);else{const i=rF(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return x6(r)}function sF(e,t){const n=nh(e);return n===t||!ro(n)||hg(n)?!1:$c(n).position==="fixed"||sF(n,t)}function Yce(e,t){const n=t.get(e);if(n)return n;let r=zx(e,[],!1).filter(a=>ro(a)&&Ug(a)!=="body"),i=null;const s=$c(e).position==="fixed";let o=s?nh(e):e;for(;ro(o)&&!hg(o);){const a=$c(o),c=kA(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Yv(o)&&!c&&sF(e,o))?r=r.filter(h=>h!==o):i=a,o=nh(o)}return t.set(e,r),r}function Zce(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?q3(t)?[]:Yce(t,this._c):[].concat(n),r],a=o[0],c=o.reduce((d,h)=>{const y=WI(t,h,i);return d.top=Cy(y.top,d.top),d.right=sT(y.right,d.right),d.bottom=sT(y.bottom,d.bottom),d.left=Cy(y.left,d.left),d},WI(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Xce(e){const{width:t,height:n}=nF(e);return{width:t,height:n}}function Qce(e,t,n){const r=Yu(t),i=bd(t),s=n==="fixed",o=Yp(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=rh(0);if(r||!r&&!s)if((Ug(t)!=="body"||Yv(i))&&(a=H3(t)),r){const y=Yp(t,!0,s,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else i&&(c.x=iF(i));const d=o.left+a.scrollLeft-c.x,h=o.top+a.scrollTop-c.y;return{x:d,y:h,width:o.width,height:o.height}}function $8(e){return $c(e).position==="static"}function GI(e,t){return!Yu(e)||$c(e).position==="fixed"?null:t?t(e):e.offsetParent}function oF(e,t){const n=fa(e);if(q3(e))return n;if(!Yu(e)){let i=nh(e);for(;i&&!hg(i);){if(ro(i)&&!$8(i))return i;i=nh(i)}return n}let r=GI(e,t);for(;r&&Sce(r)&&$8(r);)r=GI(r,t);return r&&hg(r)&&$8(r)&&!kA(r)?n:r||Tce(e)||n}const Jce=async function(e){const t=this.getOffsetParent||oF,n=this.getDimensions,r=await n(e.floating);return{reference:Qce(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function eue(e){return $c(e).direction==="rtl"}const tue={convertOffsetParentRelativeRectToViewportRelativeRect:qce,getDocumentElement:bd,getClippingRect:Zce,getOffsetParent:oF,getElementRects:Jce,getClientRects:Hce,getDimensions:Xce,getScale:Iy,isElement:ro,isRTL:eue};function nue(e,t){let n=null,r;const i=bd(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const{left:d,top:h,width:y,height:g}=e.getBoundingClientRect();if(a||t(),!y||!g)return;const x=l5(h),_=l5(i.clientWidth-(d+y)),S=l5(i.clientHeight-(h+g)),I=l5(d),D={rootMargin:-x+"px "+-_+"px "+-S+"px "+-I+"px",threshold:Cy(0,sT(1,c))||1};let F=!0;function $(z){const V=z[0].intersectionRatio;if(V!==c){if(!F)return o();V?o(!1,V):r=setTimeout(()=>{o(!1,1e-7)},1e3)}F=!1}try{n=new IntersectionObserver($,{...D,root:i.ownerDocument})}catch{n=new IntersectionObserver($,D)}n.observe(e)}return o(!0),s}function rue(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=IA(e),h=i||s?[...d?zx(d):[],...zx(t)]:[];h.forEach(L=>{i&&L.addEventListener("scroll",n,{passive:!0}),s&&L.addEventListener("resize",n)});const y=d&&a?nue(d,n):null;let g=-1,x=null;o&&(x=new ResizeObserver(L=>{let[D]=L;D&&D.target===d&&x&&(x.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var F;(F=x)==null||F.observe(t)})),n()}),d&&!c&&x.observe(d),x.observe(t));let _,S=c?Yp(e):null;c&&I();function I(){const L=Yp(e);S&&(L.x!==S.x||L.y!==S.y||L.width!==S.width||L.height!==S.height)&&n(),S=L,_=requestAnimationFrame(I)}return n(),()=>{var L;h.forEach(D=>{i&&D.removeEventListener("scroll",n),s&&D.removeEventListener("resize",n)}),y?.(),(L=x)==null||L.disconnect(),x=null,c&&cancelAnimationFrame(_)}}
vendor: 2,657 bytes, line 77
77const U8=W3,iue=Dce,sue=$ce,oue=Bce,aue=Uce,cue=(e,t,n)=>{const r=new Map,i={platform:tue,...n},s={...i.platform,_c:r};return Lce(e,t,{...i,platform:s})};var P5=typeof document<"u"?A.useLayoutEffect:A.useEffect;function v6(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!v6(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!v6(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function aF(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function KI(e,t){const n=aF(e);return Math.round(t*n)/n}function YI(e){const t=A.useRef(e);return P5(()=>{t.current=e}),t}function uue(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:c,open:d}=e,[h,y]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,x]=A.useState(r);v6(g,r)||x(r);const[_,S]=A.useState(null),[I,L]=A.useState(null),D=A.useCallback(N=>{N!==V.current&&(V.current=N,S(N))},[]),F=A.useCallback(N=>{N!==K.current&&(K.current=N,L(N))},[]),$=s||_,z=o||I,V=A.useRef(null),K=A.useRef(null),te=A.useRef(h),Q=c!=null,ee=YI(c),ne=YI(i),J=A.useCallback(()=>{if(!V.current||!K.current)return;const N={placement:t,strategy:n,middleware:g};ne.current&&(N.platform=ne.current),cue(V.current,K.current,N).then(P=>{const B={...P,isPositioned:!0};M.current&&!v6(te.current,B)&&(te.current=B,gr.flushSync(()=>{y(B)}))})},[g,t,n,ne]);P5(()=>{d===!1&&te.current.isPositioned&&(te.current.isPositioned=!1,y(N=>({...N,isPositioned:!1})))},[d]);const M=A.useRef(!1);P5(()=>(M.current=!0,()=>{M.current=!1}),[]),P5(()=>{if($&&(V.current=$),z&&(K.current=z),$&&z){if(ee.current)return ee.current($,z,J);J()}},[$,z,J,ee,Q]);const m=A.useMemo(()=>({reference:V,floating:K,setReference:D,setFloating:F}),[D,F]),E=A.useMemo(()=>({reference:$,floating:z}),[$,z]),C=A.useMemo(()=>{const N={position:n,left:0,top:0};if(!E.floating)return N;const P=KI(E.floating,h.x),B=KI(E.floating,h.y);return a?{...N,transform:"translate("+P+"px, "+B+"px)",...aF(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:B}},[n,a,E.floating,h.x,h.y]);return A.useMemo(()=>({...h,update:J,refs:m,elements:E,floatingStyles:C}),[h,J,m,E,C])}const cF=(e,t)=>({...iue(e),options:[e,t]}),lue=(e,t)=>
77({...sue(e),options:[e,t]}),due=(e,t)=>({...oue(e),options:[e,t]}),fue=(e,t)=>({...aue(e),options:[e,t]}),uF={...lg},hue=uF.useInsertionEffect,pue=hue||(e=>e());function lF(e){const t=A.useRef(()=>{});return pue(()=>{t.current=e}),A.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}var cT=typeof document<"u"?A.useLayoutEffect:A.useEffect;let ZI=!1,mue=0;const XI=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+mue++;function yue(){const[e,t]=A.useState(()=>ZI?XI():void 0);return cT(()=>{e==null&&t(XI())},[]),A.useEffect(()=>{ZI=!0},[]),e}const gue=uF.useId,bue=gue||yue;function xue(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const vue=A.createContext(null),wue=A.createContext(null),Eue=()=>{var e;return((e=A.useContext(vue))==null?void 0:e.id)||null},_ue=()=>A.useContext(wue),Sue="data-floating-ui-focusable";function Tue(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=bue(),s=A.useRef({}),[o]=A.useState(()=>xue()),a=Eue()!=null,[c,d]=A.useState(r.reference),h=lF((x,_,S)=>{s.current.openEvent=x?_:void 0,o.emit("openchange",{open:x,event:_,reason:S,nested:a}),n?.(x,_,S)}),y=A.useMemo(()=>({setPositionReference:d}),[]),g=A.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return A.useMemo(()=>({dataRef:s,open:t,onOpenChange:h,elements:g,events:o,floatingId:i,refs:y}),[t,h,g,o,i,y])}function Aue(e){e===void 0&&(e={});const{nodeId:t}=e,n=Tue({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[s,o]=A.useState(null),[a,c]=A.useState(null),h=i?.reference||s,y=A.useRef(null),g=_ue();cT(()=>{h&&(y.current=h)},[h]);const x=uue({...e,elements:{...i,...a&&{reference:a}}}),_=A.useCallback(F=>{const $=ro(F)?{getBoundingClientRect:()=>F.getBoundingClientRect(),contextElement:F}:F;c($),x.refs.setReference($)},[x.refs]),S=A.useCallback(F=>{(ro(F)||F===null)&&(y.current=F,o(F)),(ro(x.refs.reference.current)||x.refs.reference.current===null||F!==null&&!ro(F))&&x.refs.setReference(F)},[x.refs]),I=A.useMemo(()=>({...x.refs,setReference:S,setPositionReference:_,domReference:y}),[x.refs,S,_]),L=A.useMemo(()=>({...x.elements,domReference:h}),[x.elements,h]),D=A.useMemo(()=>({...x,...r,refs:I,elements:L,nodeId:t}),[x,I,L,t,r]);return cT(()=>{r.dataRef.current.floatingContext=D;const F=g?.nodesRef.current.find($=>$.id===t);F&&(F.context=D)}),A.useMemo(()=>({...x,context:D,refs:I,elements:L}),[x,I,L,D])}const QI="active",JI="selected";function z8(e,t,n){const r=new Map,i=n==="item";let s=e;if(i&&e){const{[QI]:o,[JI]:a,...c}=e;s=c}return{...n==="floating"&&{tabIndex:-1,[Sue]:""},...s,...t.map(o=>{const a=o?o[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((o,a)=>(a&&Object.entries(a).forEach(c=>{let[d,h]=c;if(!(i&&[QI,JI].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof h=="function"){var y;(y=r.get(d))==null||y.push(h),o[d]=function(){for(var g,x=arguments.length,_=new Array(x),S=0;S<x;S++)_[S]=arguments[S];return(g=r.get(d))==null?void 0:g.map(I=>I(..._)).find(I=>I!==void 0)}}}else o[d]=h}),o),{})}}function kue(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),i=A.useCallback(a=>z8(a,e,"reference"),t),s=A.useCallback(a=>z8(a,e,"floating"),n),o=A.useCallback(a=>z8(a,e,"item"),r);return A.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:o}),[i,s,o])}function eR(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Cue=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:s=0,index:o=0,minItemsVisible:a=4,referenceOverflowThreshold:c=0,scrollRef:d,...h}=kce(e,t),{rects:y,elements:{floating:g}}=t,x=n.current[o],_=d?.current||g,S=g.clientTop||_.clientTop,I=g.clientTop!==0,L=_.clientTop!==0,D=g===_;if(!x)return{};const F={...t,...await cF(-x.offsetTop-g.clientTop-y.reference.height/2-x.offsetHeight/2-s).fn(t)},$=await U8(eR(F,_.scrollHeight+S+g.clientTop),h),z=await U8(F,{...h,elementContext:"reference"}),V=Math.max(0,$.top),K=F.y+V,te=Math.max(0,_.scrollHeight+(I&&D||L?S*2:0)-V-Math.max(0,$.bottom));return _.style.maxHeight=te+"px",_.scrollTop=V,i&&(_.offsetHeight<x.offsetHeight*Math.min(a,n.current.length-1)-1||z.top>=-c||z.bottom>=-c?gr.flushSync(()=>i(!0)):gr.flushSync(()=>i(!1))),r&&(r.current=await U8(eR({...F,y:K},_.offsetHeight+S+g.clientTop),h)),{y:K}}});function Iue(e,t){const{open:n,elements:r}=e,{enabled:i=!0,overflowRef:s,scrollRef:o,onChange:a}=t,c=lF(a),d=A.useRef(!1),h=A.useRef(null),y=A.useRef(null);A.useEffect(()=>{if(!i)return;function x(S){if(S.ctrlKey||!_||s.current==null)return;const I=S.deltaY,L=s.current.top>=-.5,D=s.current.bottom>=-.5,F=_.scrollHeight-_.clientHeight,$=I<0?-1:1,z=I<0?"max":"min";_.scrollHeight<=_.clientHeight||(!L&&I>0||!D&&I<0?(S.preventDefault(),gr.flushSync(()=>{c(V=>V+Math[z](I,F*$))})):/firefox/i.test(Ace())&&(_.scrollTop+=I))}const _=o?.current||r.floating;if(n&&_)return _.addEventListener("wheel",x),requestAnimationFrame(()=>{h.current=_.scrollTop,s.current!=null&&(y.current={...s.current})}),()=>{h.current=null,y.current=null,_.removeEventListener("wheel",x)}},[i,n,r.floating,s,o,c]);const g=A.useMemo(()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const x=o?.current||r.floating;if(!(!s.current||!x||!d.current)){if(h.current!==null){const _=x.scrollTop-h.current;(s.current.bottom<-.5&&_<-1||s.current.top<-.5&&_>1)&&gr.flushSync(()=>c(S=>S+_))}requestAnimationFrame(()=>{h.current=x.scrollTop})}}}),[r.floating,c,s,o]);return A.useMemo(()=>i?{floating:g}:{},[i,g])}let zg=A.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});zg.displayName="FloatingContext";let RA=A.createContext(null);RA.displayName="PlacementContext";function G3(e){return A.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function K3(){return A.useContext(zg).setReference}function dF(){return A.useContext(zg).getReferenceProps}function Y3(){let{getFloatingProps:e,slot:t}=A.useContext(zg);return A.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Z3(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=A.useContext(RA),n=A.useMemo(()=>e,[JSON.stringify(e,typeof HTMLElement<"u"?(i,s)=>s instanceof HTMLElement?s.outerHTML:s:void 0)]);En(()=>{t?.(n??null)},[t,n]);let r=A.useContext(zg);return A.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let tR=4;function X3({children:e,enabled:t=!0}
77){let[n,r]=A.useState(null),[i,s]=A.useState(0),o=A.useRef(null),[a,c]=A.useState(null);Rue(a);let d=t&&n!==null&&a!==null,{to:h="bottom",gap:y=0,offset:g=0,padding:x=0,inner:_}=Mue(n,a),[S,I="center"]=h.split(" ");En(()=>{d&&s(0)},[d]);let{refs:L,floatingStyles:D,context:F}=Aue({open:d,placement:S==="selection"?I==="center"?"bottom":`bottom-${I}`:I==="center"?`${S}`:`${S}-${I}`,strategy:"absolute",transform:!1,middleware:[cF({mainAxis:S==="selection"?0:y,crossAxis:g}),lue({padding:x}),S!=="selection"&&due({padding:x}),S==="selection"&&_?Cue({..._,padding:x,overflowRef:o,offset:i,minItemsVisible:tR,referenceOverflowThreshold:x,onFallbackChange(ne){var J,M;if(!ne)return;let m=F.elements.floating;if(!m)return;let E=parseFloat(getComputedStyle(m).scrollPaddingBottom)||0,C=Math.min(tR,m.childElementCount),N=0,P=0;for(let B of(M=(J=F.elements.floating)==null?void 0:J.childNodes)!=null?M:[])if(B instanceof HTMLElement){let O=B.offsetTop,j=O+B.clientHeight+E,v=m.scrollTop,k=v+m.clientHeight;if(O>=v&&j<=k)C--;else{P=Math.max(0,Math.min(j,k)-Math.max(O,v)),N=B.clientHeight;break}}C>=1&&s(B=>{let O=N*C-P+E;return B>=O?B:O})}}):null,fue({padding:x,apply({availableWidth:ne,availableHeight:J,elements:M}){Object.assign(M.floating.style,{overflow:"auto",maxWidth:`${ne}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${J}px)`})}})].filter(Boolean),whileElementsMounted:rue}),[$=S,z=I]=F.placement.split("-");S==="selection"&&($="selection");let V=A.useMemo(()=>({anchor:[$,z].filter(Boolean).join(" ")}),[$,z]),K=Iue(F,{overflowRef:o,onChange:s}),{getReferenceProps:te,getFloatingProps:Q}=kue([K]),ee=Fe(ne=>{c(ne),L.setFloating(ne)});return A.createElement(RA.Provider,{value:r},A.createElement(zg.Provider,{value:{setFloating:ee,setReference:L.setReference,styles:D,getReferenceProps:te,getFloatingProps:Q,slot:V}},e))}function Rue(e){En(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let i=parseInt(n);isNaN(i)||r!==i&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Mue(e,t){var n,r,i;let s=V8((n=e?.gap)!=null?n:"var(--anchor-gap, 0)",t),o=V8((r=e?.offset)!=null?r:"var(--anchor-offset, 0)",t),a=V8((i=e?.padding)!=null?i:"var(--anchor-padding, 0)",t);return{...e,gap:s,offset:o,padding:a}}function V8(e,t,n=void 0){let r=ac(),i=Fe((c,d)=>{if(c==null)return[n,null];if(typeof c=="number")return[c,null];if(typeof c=="string"){if(!d)return[n,null];let h=nR(c,d);return[h,y=>{let g=fF(c);{let x=g.map(_=>window.getComputedStyle(d).getPropertyValue(_));r.requestAnimationFrame(function _(){r.nextFrame(_);let S=!1;for(let[L,D]of g.entries()){let F=window.getComputedStyle(d).getPropertyValue(D);if(x[L]!==F){x[L]=F,S=!0;break}}if(!S)return;let I=nR(c,d);h!==I&&(y(I),h=I)})}return r.dispose}]}return[n,null]}),s=A.useMemo(()=>i(e,t)[0],[e,t]),[o=s,a]=A.useState();return En(()=>{let[c,d]=i(e,t);if(a(c),!!d)return d(a)},[e,t]),o}function fF(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),i=t[1].slice(n+1).trim();return i?[r,...fF(i)]:[r]}return[]}function nR(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function Nue({children:e,freeze:t}){let n=w6(t,e);return Be.createElement(Be.Fragment,null,n)}function w6(e,t){let[n,r]=A.useState(t);return!e&&n!==t&&r(t),e?n:t}let Q3=A.createContext(null);Q3.displayName="OpenClosedContext";var er=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(er||{});function nl(){return A.useContext(Q3)}function Vg({value:e,children:t}){return Be.createElement(Q3.Provider,{value:e},t)}function MA({children:e}){return Be.createElement(Q3.Provider,{value:null},e)}function jue(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Bu=[];jue(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||Bu[0]===t.target)return;let n=t.target;n=n.closest(y6),Bu.unshift(n??t.target),Bu=Bu.filter(r=>r!=null&&r.isConnected),Bu.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Pue(e){throw new Error("Unexpected object: "+e)}var Xt=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Xt||{});function Gf(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:{for(let s=0;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 1:{i===-1&&(i=n.length);for(let s=i-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 2:{for(let s=i+1;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 3:{for(let s=n.length-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 4:{for(let s=0;s<n.length;++s)if(t.resolveId(n[s],s,n)===e.id)return s;return r}case 5:return null;default:Pue(e)}}var NA=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(NA||{});function hF(e){let t=Fe(e),n=A.useRef(!1);A.useEffect(()=>(n.current=!1,()=>{n.current=!0,F3(()=>{n.current&&t()})}),[t])}function Oue(){let e=typeof document>"u";return"useSyncExternalStore"in lg?(t=>t.useSyncExternalStore)(lg)(()=>()=>{},()=>!1,()=>!e):!1}function Jv(){let e=Oue(),[t,n]=A.useState(Rp.isHandoffComplete);return t&&Rp.isHandoffComplete===!1&&n(!1),A.useEffect(()=>{t!==!0&&n(!0)},[t]),A.useEffect(()=>Rp.handoff(),[]),e?!1:t}let pF=A.createContext(!1);function Lue(){return A.useContext(pF)}function rR(e){return Be.createElement(pF.Provider,{value:e.force},e.children)}function Bue(e){let t=Lue(),n=A.useContext(yF),r=cc(e),[i,s]=A.useState(()=>{var o;if(!t&&n!==null)return(o=n.current)!=null?o:null;if(Rp.isServer)return null;let a=r?.getElementById("headlessui-portal-root");
77if(a)return a;if(r===null)return null;let c=r.createElement("div");return c.setAttribute("id","headlessui-portal-root"),r.body.appendChild(c)});return A.useEffect(()=>{i!==null&&(r!=null&&r.body.contains(i)||r==null||r.body.appendChild(i))},[i,r]),A.useEffect(()=>{t||n!==null&&s(n.current)},[n,s,t]),i}let mF=A.Fragment,Fue=fn(function(e,t){let n=e,r=A.useRef(null),i=Fn(wA(h=>{r.current=h}),t),s=cc(r),o=Bue(r),[a]=A.useState(()=>{var h;return Rp.isServer?null:(h=s?.createElement("div"))!=null?h:null}),c=A.useContext(uT),d=Jv();return En(()=>{!o||!a||o.contains(a)||(a.setAttribute("data-headlessui-portal",""),o.appendChild(a))},[o,a]),En(()=>{if(a&&c)return c.register(a)},[c,a]),hF(()=>{var h;!o||!a||(a instanceof Node&&o.contains(a)&&o.removeChild(a),o.childNodes.length<=0&&((h=o.parentElement)==null||h.removeChild(o)))}),d?!o||!a?null:gr.createPortal(gn({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:mF,name:"Portal"}),a):null});function Due(e,t){let n=Fn(t),{enabled:r=!0,...i}=e;return r?Be.createElement(Fue,{...i,ref:n}):gn({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:mF,name:"Portal"})}let $ue=A.Fragment,yF=A.createContext(null);function Uue(e,t){let{target:n,...r}=e,i={ref:Fn(t)};return Be.createElement(yF.Provider,{value:n},gn({ourProps:i,theirProps:r,defaultTag:$ue,name:"Popover.Group"}))}let uT=A.createContext(null);function gF(){let e=A.useContext(uT),t=A.useRef([]),n=Fe(s=>(t.current.push(s),e&&e.register(s),()=>r(s))),r=Fe(s=>{let o=t.current.indexOf(s);o!==-1&&t.current.splice(o,1),e&&e.unregister(s)}),i=A.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,A.useMemo(()=>function({children:s}){return Be.createElement(uT.Provider,{value:i},s)},[i])]}let zue=fn(Due),bF=fn(Uue),ew=Object.assign(zue,{Group:bF});var Vue={},que=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(que||{}),Hue=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Hue||{}),Wue=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Wue||{}),Gue=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.SetTyping=3]="SetTyping",e[e.RegisterOption=4]="RegisterOption",e[e.UnregisterOption=5]="UnregisterOption",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",e))(Gue||{});function q8(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),i=r.length>0&&r[0].dataRef.current.order!==null?r.sort((o,a)=>o.dataRef.current.order-a.dataRef.current.order):Wv(r,o=>o.dataRef.current.domRef.current),s=n?i.indexOf(n):null;return s===-1&&(s=null),{options:i,activeOptionIndex:s}}let Kue={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3(e,t){return e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping}},2(e,t){var n,r,i,s,o;if((n=e.dataRef.current)!=null&&n.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((i=e.dataRef.current)!=null&&i.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let{options:h,disabled:y}=e.virtual,g=t.focus===Xt.Specific?t.idx:Gf(t,{resolveItems:()=>h,resolveActiveIndex:()=>{var _,S;return(S=(_=e.activeOptionIndex)!=null?_:h.findIndex(I=>!y(I)))!=null?S:null},resolveDisabled:y,resolveId(){throw new Error("Function not implemented.")}}),x=(s=t.trigger)!=null?s:2;return e.activeOptionIndex===g&&e.activationTrigger===x?e:{...e,activeOptionIndex:g,activationTrigger:x,isTyping:!1,__demoMode:!1}}let a=q8(e);if(a.activeOptionIndex===null){let h=a.options.findIndex(y=>!y.dataRef.current.disabled);h!==-1&&(a.activeOptionIndex=h)}let c=t.focus===Xt.Specific?t.idx:Gf(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:h=>h.id,resolveDisabled:h=>h.dataRef.current.disabled}),d=(o=t.trigger)!=null?o:2;return e.activeOptionIndex===c&&e.activationTrigger===d?e:{...e,...a,isTyping:!1,activeOptionIndex:c,activationTrigger:d,__demoMode:!1}},4:(e,t)=>{var n,r,i;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let s=t.payload,o=q8(e,c=>(c.push(s),c));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(t.payload.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(s));let a={...e,...o,activationTrigger:2};return(i=e.dataRef.current)!=null&&i.__demoMode&&e.dataRef.current.value===void 0&&(a.activeOptionIndex=0),a},5:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(i=>i.id!==t.id)};let r=q8(e,i=>{let s=i.findIndex(o=>o.id===t.id);return s!==-1&&i.splice(s,1),i});return{...e,...r,activationTrigger:2}},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n,r;if(e.virtual===null)return{...e,virtual:{options:t.options,disabled:(n=t.disabled)!=null?n:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let i=e.activeOptionIndex;if(e.activeOptionIndex!==null){let s=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);s!==-1?i=s:i=null}return{...e,activeOptionIndex:i,virtual:{options:t.options,disabled:(r=t.disabled)!=null?r:()=>!1}}}},jA=A.createContext(null);jA.displayName="ComboboxActionsContext";function tw(e){let t=A.useContext(jA);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,tw),n}return t}let xF=A.createContext(null);function Yue(e){let t=qg("VirtualProvider"),{options:n}=t.virtual,[r,i]=A.useMemo(()=>{let d=t.optionsRef.current;if(!d)return[0,0];let h=window.getComputedStyle(d);return[parseFloat(h.paddingBlockStart||h.paddingTop),parseFloat(h.paddingBlockEnd||h.paddingBottom)]},[t.optionsRef.current]),s=tce({enabled:n.length!==0,scrollPaddingStart:r,scrollPaddingEnd:i,count:n.length,estimateSize(){return 40},getScrollElement(){var d;
77return(d=t.optionsRef.current)!=null?d:null},overscan:12}),[o,a]=A.useState(0);En(()=>{a(d=>d+1)},[n]);let c=s.getVirtualItems();return c.length===0?null:Be.createElement(xF.Provider,{value:s},Be.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:d=>{if(d){if(typeof sre<"u"&&Vue.JEST_WORKER_ID!==void 0||t.activationTrigger===0)return;t.activeOptionIndex!==null&&n.length>t.activeOptionIndex&&s.scrollToIndex(t.activeOptionIndex)}}},c.map(d=>{var h;return Be.createElement(A.Fragment,{key:d.key},Be.cloneElement((h=e.children)==null?void 0:h.call(e,{...e.slot,option:n[d.index]}),{key:`${o}-${d.key}`,"data-index":d.index,"aria-setsize":n.length,"aria-posinset":d.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${d.start}px)`,overflowAnchor:"none"}}))})))}let Vx=A.createContext(null);Vx.displayName="ComboboxDataContext";function qg(e){let t=A.useContext(Vx);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,qg),n}return t}function Zue(e,t){return tr(t.type,Kue,e,t)}let Xue=A.Fragment;function Que(e,t){var n,r;let i=el(),{value:s,defaultValue:o,onChange:a,form:c,name:d,by:h,disabled:y=i||!1,onClose:g,__demoMode:x=!1,multiple:_=!1,immediate:S=!1,virtual:I=null,nullable:L,...D}=e,F=Dv(o),[$=_?[]:void 0,z]=Fv(s,a,F),[V,K]=A.useReducer(Zue,{dataRef:A.createRef(),comboboxState:x?0:1,isTyping:!1,options:[],virtual:I?{options:I.options,disabled:(n=I.disabled)!=null?n:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,__demoMode:x}),te=A.useRef(!1),Q=A.useRef({static:!1,hold:!1}),ee=A.useRef(null),ne=A.useRef(null),J=A.useRef(null),M=TA(h),m=Fe(lt=>I?h===null?I.options.indexOf(lt):I.options.findIndex(tt=>M(tt,lt)):V.options.findIndex(tt=>M(tt.dataRef.current.value,lt))),E=A.useCallback(lt=>tr(N.mode,{1:()=>$.some(tt=>M(tt,lt)),0:()=>M($,lt)}),[$]),C=Fe(lt=>V.activeOptionIndex===m(lt)),N=A.useMemo(()=>({...V,immediate:S,optionsPropsRef:Q,inputRef:ee,buttonRef:ne,optionsRef:J,value:$,defaultValue:F,disabled:y,mode:_?1:0,virtual:I?V.virtual:null,get activeOptionIndex(){if(te.current&&V.activeOptionIndex===null&&(I?I.options.length>0:V.options.length>0)){if(I){let tt=I.options.findIndex(ut=>{var nr,Rt;return!((Rt=(nr=I.disabled)==null?void 0:nr.call(I,ut))!=null&&Rt)});if(tt!==-1)return tt}let lt=V.options.findIndex(tt=>!tt.dataRef.current.disabled);if(lt!==-1)return lt}return V.activeOptionIndex},calculateIndex:m,compare:M,isSelected:E,isActive:C}),[$,F,y,_,x,V,I]);En(()=>{var lt;I&&K({type:7,options:I.options,disabled:(lt=I.disabled)!=null?lt:null})},[I,I?.options,I?.disabled]),En(()=>{V.dataRef.current=N},[N]);let P=N.comboboxState===0;Gv(P,[N.buttonRef,N.inputRef,N.optionsRef],()=>we.closeCombobox());let B=A.useMemo(()=>{var lt,tt,ut;return{open:N.comboboxState===0,disabled:y,activeIndex:N.activeOptionIndex,activeOption:N.activeOptionIndex===null?null:N.virtual?N.virtual.options[(lt=N.activeOptionIndex)!=null?lt:0]:(ut=(tt=N.options[N.activeOptionIndex])==null?void 0:tt.dataRef.current.value)!=null?ut:null,value:$}},[N,y,$]),O=Fe(()=>{if(N.activeOptionIndex!==null){if(we.setIsTyping(!1),N.virtual)ue(N.virtual.options[N.activeOptionIndex]);else{let{dataRef:lt}=N.options[N.activeOptionIndex];ue(lt.current.value)}we.goToOption(Xt.Specific,N.activeOptionIndex)}}),j=Fe(()=>{K({type:0}),te.current=!0}),v=Fe(()=>{K({type:1}),te.current=!1,g?.()}),k=Fe(lt=>{K({type:3,isTyping:lt})}),X=Fe((lt,tt,ut)=>(te.current=!1,lt===Xt.Specific?K({type:2,focus:Xt.Specific,idx:tt,trigger:ut}):K({type:2,focus:lt,trigger:ut}))),re=Fe((lt,tt)=>(K({type:4,payload:{id:lt,dataRef:tt}}),()=>{N.isActive(tt.current.value)&&(te.current=!0),K({type:5,id:lt})})),ue=Fe(lt=>tr(N.mode,{0(){return z?.(lt)},1(){let tt=N.value.slice(),ut=tt.findIndex(nr=>M(nr,lt));return ut===-1?tt.push(lt):tt.splice(ut,1),z?.(tt)}})),pe=Fe(lt=>{K({type:6,trigger:lt})}),we=A.useMemo(()=>({onChange:ue,registerOption:re,goToOption:X,setIsTyping:k,closeCombobox:v,openCombobox:j,setActivationTrigger:pe,selectActiveOption:O}),[]),[Ce,St]=ph(),Ve=t===null?{}:{ref:t},et=A.useCallback(()=>
77{if(F!==void 0)return z?.(F)},[z,F]);return Be.createElement(St,{value:Ce,props:{htmlFor:(r=N.inputRef.current)==null?void 0:r.id},slot:{open:N.comboboxState===0,disabled:y}},Be.createElement(X3,null,Be.createElement(jA.Provider,{value:we},Be.createElement(Vx.Provider,{value:N},Be.createElement(Vg,{value:tr(N.comboboxState,{0:er.Open,1:er.Closed})},d!=null&&Be.createElement($v,{disabled:y,data:$!=null?{[d]:$}:{},form:c,onReset:et}),gn({ourProps:Ve,theirProps:D,slot:B,defaultTag:Xue,name:"Combobox"}))))))}let Jue="input";function ele(e,t){var n,r,i,s,o;let a=qg("Combobox.Input"),c=tw("Combobox.Input"),d=A.useId(),h=Lg(),{id:y=h||`headlessui-combobox-input-${d}`,onChange:g,displayValue:x,disabled:_=a.disabled||!1,autoFocus:S=!1,type:I="text",...L}=e,D=Fn(a.inputRef,t,K3()),F=cc(a.inputRef),$=ac(),z=Fe(()=>{c.onChange(null),a.optionsRef.current&&(a.optionsRef.current.scrollTop=0),c.goToOption(Xt.Nothing)}),V=A.useMemo(()=>{var v;return typeof x=="function"&&a.value!==void 0?(v=x(a.value))!=null?v:"":typeof a.value=="string"?a.value:""},[a.value,x]);Ux(([v,k],[X,re])=>{if(a.isTyping)return;let ue=a.inputRef.current;ue&&((re===0&&k===1||v!==X)&&(ue.value=v),requestAnimationFrame(()=>{if(a.isTyping||!ue||F?.activeElement!==ue)return;let{selectionStart:pe,selectionEnd:we}=ue;Math.abs((we??0)-(pe??0))===0&&pe===0&&ue.setSelectionRange(ue.value.length,ue.value.length)}))},[V,a.comboboxState,F,a.isTyping]),Ux(([v],[k])=>{if(v===0&&k===1){if(a.isTyping)return;let X=a.inputRef.current;if(!X)return;let re=X.value,{selectionStart:ue,selectionEnd:pe,selectionDirection:we}=X;X.value="",X.value=re,we!==null?X.setSelectionRange(ue,pe,we):X.setSelectionRange(ue,pe)}},[a.comboboxState]);let K=A.useRef(!1),te=Fe(()=>{K.current=!0}),Q=Fe(()=>{$.nextFrame(()=>{K.current=!1})}),ee=Fe(v=>{switch(c.setIsTyping(!0),v.key){case _t.Enter:if(a.comboboxState!==0||K.current)return;if(v.preventDefault(),v.stopPropagation(),a.activeOptionIndex===null){c.closeCombobox();return}c.selectActiveOption(),a.mode===0&&c.closeCombobox();break;case _t.ArrowDown:return v.preventDefault(),v.stopPropagation(),tr(a.comboboxState,{0:()=>c.goToOption(Xt.Next),1:()=>c.openCombobox()});case _t.ArrowUp:return v.preventDefault(),v.stopPropagation(),tr(a.comboboxState,{0:()=>c.goToOption(Xt.Previous),1:()=>{gr.flushSync(()=>c.openCombobox()),a.value||c.goToOption(Xt.Last)}});case _t.Home:if(v.shiftKey)break;return v.preventDefault(),v.stopPropagation(),c.goToOption(Xt.First);case _t.PageUp:return v.preventDefault(),v.stopPropagation(),c.goToOption(Xt.First);case _t.End:if(v.shiftKey)break;return v.preventDefault(),v.stopPropagation(),c.goToOption(Xt.Last);case _t.PageDown:return v.preventDefault(),v.stopPropagation(),c.goToOption(Xt.Last);case _t.Escape:return a.comboboxState!==0?void 0:(v.preventDefault(),a.optionsRef.current&&!a.optionsPropsRef.current.static&&v.stopPropagation(),a.mode===0&&a.value===null&&z(),c.closeCombobox());case _t.Tab:if(a.comboboxState!==0)return;a.mode===0&&a.activationTrigger!==1&&c.selectActiveOption(),c.closeCombobox();break}}),ne=Fe(v=>{g?.(v),a.mode===0&&v.target.value===""&&z(),c.openCombobox()}),J=Fe(v=>{var k,X,re;let ue=(k=v.relatedTarget)!=null?k:Bu.find(pe=>pe!==v.currentTarget);if(!((X=a.optionsRef.current)!=null&&X.contains(ue))&&!((re=a.buttonRef.current)!=null&&re.contains(ue))&&a.comboboxState===0)return v.preventDefault(),a.mode===0&&a.value===null&&z(),c.closeCombobox()}),M=Fe(v=>{var k,X,re;let ue=(k=v.relatedTarget)!=null?k:Bu.find(pe=>pe!==v.currentTarget);(X=a.buttonRef.current)!=null&&X.contains(ue)||(re=a.optionsRef.current)!=null&&re.contains(ue)||a.disabled||a.immediate&&a.comboboxState!==0&&$.microTask(()=>{gr.flushSync(()=>c.openCombobox()),c.setActivationTrigger(1)})}),m=hh(),E=Uv(),{isFocused:C,focusProps:N}=Hc({autoFocus:S}),{isHovered:P,hoverProps:B}=qc({isDisabled:_}),O=A.useMemo(()=>({open:a.comboboxState===0,disabled:_,hover:P,focus:C,autofocus:S}),[a,P,C,S,_]),j=ps({ref:D,id:y,role:"combobox",type:I,"aria-controls":(n=a.optionsRef.current)==null?void 0:n.id,"aria-expanded":a.comboboxState===0,"aria-activedescendant":a.activeOptionIndex===null?void 0:a.virtual?(r=a.options.find(v=>!v.dataRef.current.disabled&&a.compare(v.dataRef.current.value,a.virtual.options[a.activeOptionIndex])))==null?void 0:r.id:(i=a.options[a.activeOptionIndex])==null?void 0:i.id,"aria-labelledby":m,"aria-describedby":E,"aria-autocomplete":"list",defaultValue:(o=(s=e.defaultValue)!=null?s:a.defaultValue!==void 0?x?.(a.defaultValue):null)!=null?o:a.defaultValue,disabled:_||void 0,autoFocus:S,onCompositionStart:te,onCompositionEnd:Q,onKeyDown:ee,onChange:ne,onFocus:M,onBlur:J},N,B);return gn({ourProps:j,theirProps:L,slot:O,defaultTag:Jue,name:"Combobox.Input"})}let tle="button";function nle(e,t){var n;let r=qg("Combobox.Button"),i=tw("Combobox.Button"),s=Fn(r.buttonRef,t),o=A.useId(),{id:a=`headlessui-combobox-button-${o}`,disabled:c=r.disabled||!1,autoFocus:d=!1,...h}=e,y=YB(r.inputRef),g=Fe(K=>{switch(K.key){case _t.Space:case _t.Enter:K.preventDefault(),K.stopPropagation(),r.comboboxState===1&&gr.flushSync(()=>i.openCombobox()),y();return;case _t.ArrowDown:K.preventDefault(),K.stopPropagation(),r.comboboxState===1&&(gr.flushSync(()=>i.openCombobox()),r.value||i.goToOption(Xt.First)),y();return;case _t.ArrowUp:K.preventDefault(),K.stopPropagation(),r.comboboxState===1&&(gr.flushSync(()=>i.openCombobox()),r.value||i.goToOption(Xt.Last)),y();return;case _t.Escape:if(r.comboboxState!==0)return;K.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&K.stopPropagation(),gr.flushSync(()=>i.closeCombobox()),y();return;default:return}}),x=Fe(K=>{K.preventDefault(),!tl(K.currentTarget)&&(K.button===NA.Left&&(r.comboboxState===0?i.closeCombobox():i.openCombobox()),y())}),_=hh([a]),{isFocusVisible:S,focusProps:I}=Hc({autoFocus:d}),{isHovered:L,hoverProps:D}=qc({isDisabled:c}),{pressed:F,pressProps:$}=fh({disabled:c}),z=A.useMemo(()=>({open:r.comboboxState===0,active:F||r.comboboxState===0,disabled:c,value:r.value,hover:L,focus:S}),[r,L,S,F,c]),V=ps({ref:s,id:a,type:$g(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(n=r.optionsRef.current)==null?void 0:n.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":_,disabled:c||void 0,autoFocus:d,onMouseDown:x,onKeyDown:g},I,D,$);return gn({ourProps:V,theirProps:h,slot:z,defaultTag:tle,name:"Combobox.Button"})}let rle="div",ile=Os.RenderStrategy|Os.Static;function sle(e,t){var n,r,i;let s=A.useId(),{id:o=`headlessui-combobox-options-${s}`,hold:a=!1,anchor:c,portal:d=!1,modal:h=!0,transition:y=!1,...g}=e,x=qg("Combobox.Options"),_=tw("Combobox.Options"),S=G3(c);S&&(d=!0);let[I,L]=Z3(S),D=Y3(),F=Fn(x.optionsRef,t,S?I:null),$=cc(x.optionsRef),z=nl(),[V,K]=f0(y,x.optionsRef,z!==null?(z&er.Open)===er.Open:x.comboboxState===0);Dg(V,x.inputRef,_.closeCombobox);let te=x.__demoMode?!1:h&&x.comboboxState===0;Kv(te,$);let Q=x.__demoMode?!1:h&&x.comboboxState===0;z3(Q,{allowed:Fe(()=>[x.inputRef.current,x.buttonRef.current,x.optionsRef.current])}),En(()=>{var B;x.optionsPropsRef.current.static=(B=e.static)!=null?B:!1},[x.optionsPropsRef,e.static]),En(()=>{x.optionsPropsRef.current.hold=a},[x.optionsPropsRef,a]),ZB(x.comboboxState===0,{container:x.optionsRef.current,accept(B){return B.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:B.hasAttribute("role")?N
77odeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(B){B.setAttribute("role","none")}});let ee=hh([(n=x.buttonRef.current)==null?void 0:n.id]),ne=A.useMemo(()=>({open:x.comboboxState===0,option:void 0}),[x.comboboxState]),J=Fe(()=>{_.setActivationTrigger(0)}),M=Fe(B=>{B.preventDefault(),_.setActivationTrigger(0)}),m=ps(S?D():{},{"aria-labelledby":ee,role:"listbox","aria-multiselectable":x.mode===1?!0:void 0,id:o,ref:F,style:{...g.style,...L,"--input-width":$x(x.inputRef,!0).width,"--button-width":$x(x.buttonRef,!0).width},onWheel:x.activationTrigger===0?void 0:J,onMouseDown:M,...d0(K)}),E=V&&x.comboboxState===1,C=w6(E,(r=x.virtual)==null?void 0:r.options),N=w6(E,x.value),P=Fe(B=>x.compare(N,B));if(x.virtual){if(C===void 0)throw new Error("Missing `options` in virtual mode");Object.assign(g,{children:Be.createElement(Vx.Provider,{value:C!==x.virtual.options?{...x,virtual:{...x.virtual,options:C}}:x},Be.createElement(Yue,{slot:ne},g.children))})}return Be.createElement(ew,{enabled:d?e.static||V:!1},Be.createElement(Vx.Provider,{value:x.mode===1?x:{...x,isSelected:P}},gn({ourProps:m,theirProps:{...g,children:Be.createElement(Nue,{freeze:E},typeof g.children=="function"?(i=g.children)==null?void 0:i.call(g,ne):g.children)},slot:ne,defaultTag:rle,features:ile,visible:V,name:"Combobox.Options"}
77)))}let ole="div";function ale(e,t){var n,r,i,s;let o=qg("Combobox.Option"),a=tw("Combobox.Option"),c=A.useId(),{id:d=`headlessui-combobox-option-${c}`,value:h,disabled:y=(i=(r=(n=o.virtual)==null?void 0:n.disabled)==null?void 0:r.call(n,h))!=null?i:!1,order:g=null,...x}=e,_=YB(o.inputRef),S=o.virtual?o.activeOptionIndex===o.calculateIndex(h):o.activeOptionIndex===null?!1:((s=o.options[o.activeOptionIndex])==null?void 0:s.id)===d,I=o.isSelected(h),L=A.useRef(null),D=Oo({disabled:y,value:h,domRef:L,order:g}),F=A.useContext(xF),$=Fn(t,L,F?F.measureElement:null),z=Fe(()=>{a.setIsTyping(!1),a.onChange(h)});En(()=>a.registerOption(d,D),[D,d]);let V=A.useRef(!(o.virtual||o.__demoMode));En(()=>{if(!o.virtual&&!o.__demoMode)return ya().requestAnimationFrame(()=>{V.current=!0})},[o.virtual,o.__demoMode]),En(()=>{if(V.current&&o.comboboxState===0&&S&&o.activationTrigger!==0)return ya().requestAnimationFrame(()=>{var m,E;(E=(m=L.current)==null?void 0:m.scrollIntoView)==null||E.call(m,{block:"nearest"})})},[L,S,o.comboboxState,o.activationTrigger,o.activeOptionIndex]);let K=Fe(m=>{m.preventDefault(),m.button===NA.Left&&(y||(z(),GB()||requestAnimationFrame(()=>_()),o.mode===0&&a.closeCombobox()))}),te=Fe(()=>{if(y)return a.goToOption(Xt.Nothing);let m=o.calculateIndex(h);a.goToOption(Xt.Specific,m)}),Q=AA(),ee=Fe(m=>Q.update(m)),ne=Fe(m=>{if(!Q.wasMoved(m)||y||S)return;let E=o.calculateIndex(h);a.goToOption(Xt.Specific,E,0)}),J=Fe(m=>{Q.wasMoved(m)&&(y||S&&(o.optionsPropsRef.current.hold||a.goToOption(Xt.Nothing)))}),M=A.useMemo(()=>({active:S,focus:S,selected:I,disabled:y}),[S,I,y]);return gn({ourProps:{id:d,ref:$,role:"option",tabIndex:y===!0?void 0:-1,"aria-disabled":y===!0?!0:void 0,"aria-selected":I,disabled:void 0,onMouseDown:K,onFocus:te,onPointerEnter:ee,onMouseEnter:ee,onPointerMove:ne,onMouseMove:ne,onPointerLeave:J,onMouseLeave:J},theirProps:x,slot:M,defaultTag:ole,name:"Combobox.Option"})}let cle=fn(Que),ule=fn(nle),vF=fn(ele),lle=zv,wF=fn(sle),dle=fn(ale),fle=Object.assign(cle,{Input:vF,Button:ule,Label:lle,Options:wF,Option:dle});function hle(e,t=typeof document<"u"?document.defaultView:null,n){let r=Fg(e,"escape");V3(t,"keydown",i=>{r&&(i.defaultPrevented||i.key===_t.Escape&&n(i))})}function ple(){var e;let[t]=A.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=A.useState((e=t?.matches)!=null?e:!1);return En(()=>{if(!t)return;function i(s){r(s.matches)}return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[t]),n}function EF({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=cc(n),i=Fe(()=>{var s,o;let a=[];for(let c of e)c!==null&&(c instanceof HTMLElement?a.push(c):"current"in c&&c.current instanceof HTMLElement&&a.push(c.current));if(t!=null&&t.current)for(let c of t.current)a.push(c);for(let c of(s=r?.querySelectorAll("html > *, body > *"))!=null?s:[])c!==document.body&&c!==document.head&&c instanceof HTMLElement&&c.id!=="headlessui-portal-root"&&(n&&(c.contains(n)||c.contains((o=n?.getRootNode())==null?void 0:o.host))||a.some(d=>c.contains(d))||a.push(c));return a});
vendor: 5,621 bytes, line 77
77return{resolveContainers:i,contains:Fe(s=>i().some(o=>o.contains(s)))}}let _F=A.createContext(null);function E6({children:e,node:t}){let[n,r]=A.useState(null),i=PA(t??n);return Be.createElement(_F.Provider,{value:i},e,i===null&&Be.createElement(od,{features:Ku.Hidden,ref:s=>{var o,a;if(s){for(let c of(a=(o=Wc(s))==null?void 0:o.querySelectorAll("html > *, body > *"))!=null?a:[])if(c!==document.body&&c!==document.head&&c instanceof HTMLElement&&c!=null&&c.contains(s)){r(c);break}}}}))}function PA(e=null){var t;return(t=A.useContext(_F))!=null?t:e}function OA(){let e=A.useRef(!1);return En(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var ca=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ca||{});function LA(){let e=A.useRef(0);return KB(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function SF(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let mle="div";var fp=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(fp||{});function yle(e,t){let n=A.useRef(null),r=Fn(n,t),{initialFocus:i,initialFocusFallback:s,containers:o,features:a=15,...c}=e;Jv()||(a=0);let d=cc(n);vle(a,{ownerDocument:d});let h=wle(a,{ownerDocument:d,container:n,initialFocus:i,initialFocusFallback:s});Ele(a,{ownerDocument:d,container:n,containers:o,previousActiveElement:h});let y=LA(),g=Fe(L=>{let D=n.current;D&&(F=>F())(()=>{tr(y.current,{[ca.Forwards]:()=>{no(D,Br.First,{skipElements:[L.relatedTarget,s]})},[ca.Backwards]:()=>{no(D,Br.Last,{skipElements:[L.relatedTarget,s]})}})})}),x=Fg(!!(a&2),"focus-trap#tab-lock"),_=ac(),S=A.useRef(!1),I={ref:r,onKeyDown(L){L.key=="Tab"&&(S.current=!0,_.requestAnimationFrame(()=>{S.current=!1}))},onBlur(L){if(!(a&4))return;let D=SF(o);n.current instanceof HTMLElement&&D.add(n.current);let F=L.relatedTarget;F instanceof HTMLElement&&F.dataset.headlessuiFocusGuard!=="true"&&(TF(D,F)||(S.current?no(n.current,tr(y.current,{[ca.Forwards]:()=>Br.Next,[ca.Backwards]:()=>Br.Previous})|Br.WrapAround,{relativeTo:L.target}):L.target instanceof HTMLElement&&zu(L.target)))}};return Be.createElement(Be.Fragment,null,x&&Be.createElement(od,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:g,features:Ku.Focusable}),gn({ourProps:I,theirProps:c,defaultTag:mle,name:"FocusTrap"}),x&&Be.createElement(od,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:g,features:Ku.Focusable}))}let gle=fn(yle),ble=Object.assign(gle,{features:fp});function xle(e=!0){let t=A.useRef(Bu.slice());return Ux(([n],[r])=>{r===!0&&n===!1&&F3(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Bu.slice())},[e,Bu,t]),Fe(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function vle(e,{ownerDocument:t}){let n=!!(e&8),r=xle(n);Ux(()=>{n||t?.activeElement===t?.body&&zu(r())},[n]),hF(()=>{n&&zu(r())})}function wle(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let s=A.useRef(null),o=Fg(!!(e&1),"focus-trap#initial-focus"),a=OA();return Ux(()=>{if(e===0)return;if(!o){i!=null&&i.current&&zu(i.current);return}let c=n.current;c&&F3(()=>{if(!a.current)return;let d=t?.activeElement;if(r!=null&&r.current){if(r?.current===d){s.current=d;return}}else if(c.contains(d)){s.current=d;return}if(r!=null&&r.current)zu(r.current);else{if(e&16){if(no(c,Br.First|Br.AutoFocus)!==th.Error)return}else if(no(c,Br.First)!==th.Error)return;if(i!=null&&i.current&&(zu(i.current),t?.activeElement===i.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}s.current=t?.activeElement})},[i,o,e]),s}function Ele(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let s=OA(),o=!!(e&4);V3(t?.defaultView,"focus",a=>{if(!o||!s.current)return;let c=SF(r);n.current instanceof HTMLElement&&c.add(n.current);let d=i.current;if(!d)return;let h=a.target;h&&h instanceof HTMLElement?TF(c,h)?(i.current=h,zu(h)):(a.preventDefault(),a.stopPropagation(),zu(d)):zu(i.current)},!0)}function TF(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function AF(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:CF)!==A.Fragment||Be.Children.count(e.children)===1}let J3=A.createContext(null);J3.displayName="TransitionContext";var _le=(e=>(e.Visible="visible",e.Hidden="hidden",e))(_le||{});function Sle(){let e=A.useContext(J3);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Tle(){let e=A.useContext(eE);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let eE=A.createContext(null);eE.displayName="NestingContext";function tE(e){return"children"in e?tE(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function kF(e,t){let n=Oo(e),r=A.useRef([]),i=OA(),s=ac(),o=Fe((x,_=Df.Hidden)=>{let S=r.current.findIndex(({el:I})=>I===x);S!==-1&&(tr(_,{[Df.Unmount](){r.current.splice(S,1)},[Df.Hidden](){r.current[S].state="hidden"}}),s.microTask(()=>{var I;!tE(r)&&i.current&&((I=n.current)==null||I.call(n))}))}),a=Fe(x=>{let _=r.current.find(({el:S})=>S===x);return _?_.state!=="visible"&&(_.state="visible"):r.current.push({el:x,state:"visible"}),()=>o(x,Df.Unmount)}),c=A.useRef([]),d=A.useRef(Promise.resolve()),h=A.useRef({enter:[],leave:[]}
vendor: 4,383 bytes, line 77
77),y=Fe((x,_,S)=>{c.current.splice(0),t&&(t.chains.current[_]=t.chains.current[_].filter(([I])=>I!==x)),t?.chains.current[_].push([x,new Promise(I=>{c.current.push(I)})]),t?.chains.current[_].push([x,new Promise(I=>{Promise.all(h.current[_].map(([L,D])=>D)).then(()=>I())})]),_==="enter"?d.current=d.current.then(()=>t?.wait.current).then(()=>S(_)):S(_)}),g=Fe((x,_,S)=>{Promise.all(h.current[_].splice(0).map(([I,L])=>L)).then(()=>{var I;(I=c.current.shift())==null||I()}).then(()=>S(_))});return A.useMemo(()=>({children:r,register:a,unregister:o,onStart:y,onStop:g,wait:d,chains:h}),[a,o,r,y,g,h,d])}let CF=A.Fragment,IF=Os.RenderStrategy;function Ale(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:c,enter:d,enterFrom:h,enterTo:y,entered:g,leave:x,leaveFrom:_,leaveTo:S,...I}=e,L=A.useRef(null),D=AF(e),F=Fn(...D?[L,t]:t===null?[]:[t]),$=(n=I.unmount)==null||n?Df.Unmount:Df.Hidden,{show:z,appear:V,initial:K}=Sle(),[te,Q]=A.useState(z?"visible":"hidden"),ee=Tle(),{register:ne,unregister:J}=ee;En(()=>ne(L),[ne,L]),En(()=>{if($===Df.Hidden&&L.current){if(z&&te!=="visible"){Q("visible");return}return tr(te,{hidden:()=>J(L),visible:()=>ne(L)})}},[te,L,ne,J,z,$]);let M=Jv();En(()=>{if(D&&M&&te==="visible"&&L.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[L,te,M,D]);let m=K&&!V,E=V&&z&&K,C=A.useRef(!1),N=kF(()=>{C.current||(Q("hidden"),J(L))},ee),P=Fe(X=>{C.current=!0;let re=X?"enter":"leave";N.onStart(L,re,ue=>{ue==="enter"?s?.():ue==="leave"&&a?.()})}),B=Fe(X=>{let re=X?"enter":"leave";C.current=!1,N.onStop(L,re,ue=>{ue==="enter"?o?.():ue==="leave"&&c?.()}),re==="leave"&&!tE(N)&&(Q("hidden"),J(L))});A.useEffect(()=>{D&&i||(P(z),B(z))},[z,D,i]);let O=!(!i||!D||!M||m),[,j]=f0(O,L,z,{start:P,end:B}),v=Ef({ref:F,className:((r=nT(I.className,E&&d,E&&h,j.enter&&d,j.enter&&j.closed&&h,j.enter&&!j.closed&&y,j.leave&&x,j.leave&&!j.closed&&_,j.leave&&j.closed&&S,!j.transition&&z&&g))==null?void 0:r.trim())||void 0,...d0(j)}),k=0;return te==="visible"&&(k|=er.Open),te==="hidden"&&(k|=er.Closed),j.enter&&(k|=er.Opening),j.leave&&(k|=er.Closing),Be.createElement(eE.Provider,{value:N},Be.createElement(Vg,{value:k},gn({ourProps:v,theirProps:I,defaultTag:CF,features:IF,visible:te==="visible",name:"Transition.Child"})))}function kle(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=A.useRef(null),a=AF(e),c=Fn(...a?[o,t]:t===null?[]:[t]);Jv();let d=nl();if(n===void 0&&d!==null&&(n=(d&er.Open)===er.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[h,y]=A.useState(n?"visible":"hidden"),g=kF(()=>{n||y("hidden")}),[x,_]=A.useState(!0),S=A.useRef([n]);En(()=>{x!==!1&&S.current[S.current.length-1]!==n&&(S.current.push(n),_(!1))},[S,n]);let I=A.useMemo(()=>({show:n,appear:r,initial:x}),[n,r,x]);Dg(n,o,()=>y("hidden")),En(()=>{n?y("visible"):!tE(g)&&o.current!==null&&y("hidden")},[n,g]);let L={unmount:i},D=Fe(()=>{var $;x&&_(!1),($=e.beforeEnter)==null||$.call(e)}),F=Fe(()=>{var $;x&&_(!1),($=e.beforeLeave)==null||$.call(e)});return Be.createElement(eE.Provider,{value:g},Be.createElement(J3.Provider,{value:I},gn({ourProps:{...L,as:A.Fragment,children:Be.createElement(RF,{ref:c,...L,...s,beforeEnter:D,beforeLeave:F})},theirProps:{},defaultTag:A.Fragment,features:IF,visible:h==="visible",name:"Transition"})))}function Cle(e,t){let n=A.useContext(J3)!==null,r=nl()!==null;return Be.createElement(Be.Fragment,null,!n&&r?Be.createElement(lT,{ref:t,...e}):Be.createElement(RF,{ref:t,...e}))}let lT=fn(kle),RF=fn(Ale),BA=fn(Cle),Ile=Object.assign(lT,{Child:BA,Root:lT});var Rle=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Rle||{}),Mle=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Mle||{});let Nle={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},FA=A.createContext(null);FA.displayName="DialogContext";function nE(e){let t=A.useContext(FA);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,nE),n}return t}function jle(e,t){return tr(t.type,Nle,e,t)}let iR=fn(function(e,t){let n=A.useId(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:s,initialFocus:o,role:a="dialog",autoFocus:c=!0,__demoMode:d=!1,unmount:h=!1,...y}=e,g=A.useRef(!1);a=(function(){return a==="dialog"||a==="alertdialog"?a:(g.current||(g.current=!0,
77console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let x=nl();i===void 0&&x!==null&&(i=(x&er.Open)===er.Open);let _=A.useRef(null),S=Fn(_,t),I=cc(_),L=i?0:1,[D,F]=A.useReducer(jle,{titleId:null,descriptionId:null,panelRef:A.createRef()}),$=Fe(()=>s(!1)),z=Fe(O=>F({type:0,id:O})),V=Jv()?L===0:!1,[K,te]=gF(),Q={get current(){var O;return(O=D.panelRef.current)!=null?O:_.current}},ee=PA(),{resolveContainers:ne}=EF({mainTreeNode:ee,portals:K,defaultContainers:[Q]}),J=x!==null?(x&er.Closing)===er.Closing:!1;z3(d||J?!1:V,{allowed:Fe(()=>{var O,j;return[(j=(O=_.current)==null?void 0:O.closest("[data-headlessui-portal]"))!=null?j:null]}),disallowed:Fe(()=>{var O;return[(O=ee?.closest("body > *:not(#headlessui-portal-root)"))!=null?O:null]})}),Gv(V,ne,O=>{O.preventDefault(),$()}),hle(V,I?.defaultView,O=>{O.preventDefault(),O.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),$()}),Kv(d||J?!1:V,I,ne),Dg(V,_,$);let[M,m]=Bg(),E=A.useMemo(()=>[{dialogState:L,close:$,setTitleId:z,unmount:h},D],[L,D,$,z,h]),C=A.useMemo(()=>({open:L===0}),[L]),N={ref:S,id:r,role:a,tabIndex:-1,"aria-modal":d?void 0:L===0?!0:void 0,"aria-labelledby":D.titleId,"aria-describedby":M,unmount:h},P=!ple(),B=fp.None;return V&&!d&&(B|=fp.RestoreFocus,B|=fp.TabLock,c&&(B|=fp.AutoFocus),P&&(B|=fp.InitialFocus)),Be.createElement(MA,null,Be.createElement(rR,{force:!0},Be.createElement(ew,null,Be.createElement(FA.Provider,{value:E},Be.createElement(bF,{target:_},Be.createElement(rR,{force:!1},Be.createElement(m,{slot:C},Be.createElement(te,null,Be.createElement(ble,{initialFocus:o,initialFocusFallback:_,containers:ne,features:B},Be.createElement(SA,{value:$},gn({ourProps:N,theirProps:y,slot:C,defaultTag:Ple,features:Ole,visible:L===0,name:"Dialog"})))))))))))}),Ple="div",Ole=Os.RenderStrategy|Os.Static;function Lle(e,t){let{transition:n=!1,open:r,...i}=e,s=nl(),o=e.hasOwnProperty("open")||s!==null,a=e.hasOwnProperty("onClose");if(!o&&!a)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!o)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!s&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?Be.createElement(E6,null,Be.createElement(Ile,{show:r,transition:n,unmount:i.unmount},Be.createElement(iR,{ref:t,...i}))):Be.createElement(E6,null,Be.createElement(iR,{ref:t,open:r,...i}))}let Ble="div";function Fle(e,t){let n=A.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...s}=e,[{dialogState:o,unmount:a},c]=nE("Dialog.Panel"),d=Fn(t,c.panelRef),h=A.useMemo(()=>({open:o===0}),[o]),y=Fe(x=>{x.stopPropagation()}),g={ref:d,id:r,onClick:y};return Be.createElement(i?BA:A.Fragment,{...i?{unmount:a}:{}},gn({ourProps:g,theirProps:s,slot:h,defaultTag:Ble,name:"Dialog.Panel"}))}let Dle="div";function $le(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:s}]=nE("Dialog.Backdrop"),o=A.useMemo(()=>({open:i===0}),[i]),a={ref:t,"aria-hidden":!0};return Be.createElement(n?BA:A.Fragment,{...n?{unmount:s}:{}},gn({ourProps:a,theirProps:r,slot:o,defaultTag:Dle,name:"Dialog.Backdrop"}))}let Ule="h2";function zle(e,t){let n=A.useId(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:s,setTitleId:o}]=nE("Dialog.Title"),a=Fn(t);A.useEffect(()=>(o(r),()=>o(null)),[r,o]);let c=A.useMemo(()=>({open:s===0}),[s]);return gn({ourProps:{ref:a,id:r},theirProps:i,slot:c,defaultTag:Ule,name:"Dialog.Title"})}let Vle=fn(Lle),DA=fn(Fle),MF=fn($le),NF=fn(zle),jF=Object.assign(Vle,{Panel:DA,Title:NF,Description:EA});var sR;let qle=(sR=Be.startTransition)!=null?sR:function(e){e()};var Hle=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Hle||{}),Wle=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.LinkPanel=4]="LinkPanel",e[e.UnlinkPanel=5]="UnlinkPanel",e))(Wle||{});let Gle={0:e=>({...e,disclosureState:tr(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},4(e){return e.linkedPanel===!0?e:{...e,linkedPanel:!0}},5(e){return e.linkedPanel===!1?e:{...e,linkedPanel:!1}},2(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},3(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},$A=A.createContext(null);$A.displayName="DisclosureContext";function UA(e){let t=A.useContext($A);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,UA),n}return t}let zA=A.createContext(null);zA.displayName="DisclosureAPIContext";function PF(e){let t=A.useContext(zA);
77if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,PF),n}return t}let VA=A.createContext(null);VA.displayName="DisclosurePanelContext";function Kle(){return A.useContext(VA)}function Yle(e,t){return tr(t.type,Gle,e,t)}let Zle=A.Fragment;function Xle(e,t){let{defaultOpen:n=!1,...r}=e,i=A.useRef(null),s=Fn(t,wA(I=>{i.current=I},e.as===void 0||e.as===A.Fragment)),o=A.useRef(null),a=A.useRef(null),c=A.useReducer(Yle,{disclosureState:n?0:1,linkedPanel:!1,buttonRef:a,panelRef:o,buttonId:null,panelId:null}),[{disclosureState:d,buttonId:h},y]=c,g=Fe(I=>{y({type:1});let L=Wc(i);if(!L||!h)return;let D=I?I instanceof HTMLElement?I:I.current instanceof HTMLElement?I.current:L.getElementById(h):L.getElementById(h);D?.focus()}),x=A.useMemo(()=>({close:g}),[g]),_=A.useMemo(()=>({open:d===0,close:g}),[d,g]),S={ref:s};return Be.createElement($A.Provider,{value:c},Be.createElement(zA.Provider,{value:x},Be.createElement(SA,{value:g},Be.createElement(Vg,{value:tr(d,{0:er.Open,1:er.Closed})},gn({ourProps:S,theirProps:r,slot:_,defaultTag:Zle,name:"Disclosure"})))))}let Qle="button";function Jle(e,t){let n=A.useId(),{id:r=`headlessui-disclosure-button-${n}`,disabled:i=!1,autoFocus:s=!1,...o}=e,[a,c]=UA("Disclosure.Button"),d=Kle(),h=d===null?!1:d===a.panelId,y=A.useRef(null),g=Fn(y,t,h?null:a.buttonRef),x=vA();A.useEffect(()=>{if(!h)return c({type:2,buttonId:r}),()=>{c({type:2,buttonId:null})}},[r,c,h]);let _=Fe(ee=>{var ne;if(h){if(a.disclosureState===1)return;switch(ee.key){case _t.Space:case _t.Enter:ee.preventDefault(),ee.stopPropagation(),c({type:0}),(ne=a.buttonRef.current)==null||ne.focus();break}}else switch(ee.key){case _t.Space:case _t.Enter:ee.preventDefault(),ee.stopPropagation(),c({type:0});break}}),S=Fe(ee=>{switch(ee.key){case _t.Space:ee.preventDefault();break}}),I=Fe(ee=>{var ne;tl(ee.currentTarget)||i||(h?(c({type:0}),(ne=a.buttonRef.current)==null||ne.focus()):c({type:0}))}),{isFocusVisible:L,focusProps:D}=Hc({autoFocus:s}),{isHovered:F,hoverProps:$}=qc({isDisabled:i}),{pressed:z,pressProps:V}=fh({disabled:i}),K=A.useMemo(()=>({open:a.disclosureState===0,hover:F,active:z,disabled:i,focus:L,autofocus:s}),[a,F,z,L,i,s]),te=$g(e,y),Q=ps(h?{ref:g,type:te,disabled:i||void 0,autoFocus:s,onKeyDown:_,onClick:I}:{ref:g,id:r,type:te,"aria-expanded":a.disclosureState===0,"aria-controls":a.linkedPanel?a.panelId:void 0,disabled:i||void 0,autoFocus:s,onKeyDown:_,onKeyUp:S,onClick:I},D,$,V);return gn({mergeRefs:x,ourProps:Q,theirProps:o,slot:K,defaultTag:Qle,name:"Disclosure.Button"})}let ede="div",tde=Os.RenderStrategy|Os.Static;function nde(e,t){let n=A.useId(),{id:r=`headlessui-disclosure-panel-${n}`,transition:i=!1,...s}=e,[o,a]=UA("Disclosure.Panel"),{close:c}=PF("Disclosure.Panel"),d=vA(),h=Fn(t,o.panelRef,I=>{qle(()=>a({type:I?4:5}))});A.useEffect(()=>(a({type:3,panelId:r}),()=>{a({type:3,panelId:null})}),[r,a]);let y=nl(),[g,x]=f0(i,o.panelRef,y!==null?(y&er.Open)===er.Open:o.disclosureState===0),_=A.useMemo(()=>({open:o.disclosureState===0,close:c}),[o.disclosureState,c]),S={ref:h,id:r,...d0(x)};return Be.createElement(MA,null,Be.createElement(VA.Provider,{value:o.panelId},gn({mergeRefs:d,ourProps:S,theirProps:s,slot:_,defaultTag:ede,features:tde,visible:g,name:"Disclosure.Panel"})))}let rde=fn(Xle),OF=fn(Jle),LF=fn(nde),ide=Object.assign(rde,{Button:OF,Panel:LF}),sde="div";function ode(e,t){let n=`headlessui-control-${A.useId()}`,[r,i]=ph(),[s,o]=Bg(),a=el(),{disabled:c=a||!1,...d}=e,h=A.useMemo(()=>({disabled:c}),[c]);return Be.createElement(vae,{value:c},Be.createElement(i,{value:r},Be.createElement(o,{value:s},Be.createElement(Rae,{id:n},gn({ourProps:{ref:t,disabled:c||void 0,"aria-disabled":c||void 0},theirProps:{...d,children:Be.createElement(kae,null,typeof d.children=="function"?d.children(h):d.children)},slot:h,defaultTag:sde,name:"Field"})))))}let ade=fn(ode);function cde(e,t){let[n,r]=A.useState(e),i=Oo(e);return En(()=>r(i.current),[i,r,...t]),n}function BF(e,t){let n=A.useRef({left:0,top:0});if(En(()=>{let i=t.current;if(!i)return;let s=i.getBoundingClientRect();s&&(n.current=s)},[e]),t.current==null||!e||t.current===document.activeElement)return!1;let r=t.current.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}let oR=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function aR(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let s=!1;for(let a of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),s=!0;let o=s?(n=i.innerText)!=null?n:"":r;return oR.test(o)&&(o=o.replace(oR,"")),o}function ude(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let s=document.getElementById(i);if(s){let o=s.getAttribute("aria-label");
77return typeof o=="string"?o.trim():aR(s).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return aR(e).trim()}function FF(e){let t=A.useRef(""),n=A.useRef("");return Fe(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let s=ude(r).trim().toLowerCase();return t.current=i,n.current=s,s})}var lde=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(lde||{}),dde=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(dde||{}),fde=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(fde||{}),hde=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e))(hde||{});function H8(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=Wv(t(e.options.slice()),s=>s.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{options:r,activeOptionIndex:i}}let pde={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(i=>n(i.dataRef.current.value));return r!==-1&&(t=r),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var n,r,i,s,o;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===Xt.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Xt.Specific)return{...a,activeOptionIndex:e.options.findIndex(h=>h.id===t.id)};if(t.focus===Xt.Previous){let h=e.activeOptionIndex;if(h!==null){let y=e.options[h].dataRef.current.domRef,g=Gf(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:x=>x.id,resolveDisabled:x=>x.dataRef.current.disabled});if(g!==null){let x=e.options[g].dataRef.current.domRef;if(((r=y.current)==null?void 0:r.previousElementSibling)===x.current||((i=x.current)==null?void 0:i.previousElementSibling)===null)return{...a,activeOptionIndex:g}}}}else if(t.focus===Xt.Next){let h=e.activeOptionIndex;if(h!==null){let y=e.options[h].dataRef.current.domRef,g=Gf(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:x=>x.id,resolveDisabled:x=>x.dataRef.current.disabled});if(g!==null){let x=e.options[g].dataRef.current.domRef;if(((s=y.current)==null?void 0:s.nextElementSibling)===x.current||((o=x.current)==null?void 0:o.nextElementSibling)===null)return{...a,activeOptionIndex:g}}}}let c=H8(e),d=Gf(t,{resolveItems:()=>c.options,resolveActiveIndex:()=>c.activeOptionIndex,resolveId:h=>h.id,resolveDisabled:h=>h.dataRef.current.disabled});return{...a,...c,activeOptionIndex:d}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(o=>{var a;return!o.dataRef.current.disabled&&((a=o.dataRef.current.textValue)==null?void 0:a.startsWith(r))}),s=i?e.options.indexOf(i):-1;return s===-1||s===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:s,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=H8(e,i=>[...i,n]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=H8(e,r=>{let i=r.findIndex(s=>s.id===t.id);return i!==-1&&r.splice(i,1),r});return{...e,...n,activationTrigger:1}}},qA=A.createContext(null);qA.displayName="ListboxActionsContext";function rE(e){let t=A.useContext(qA);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,rE),n}return t}let iE=A.createContext(null);iE.displayName="ListboxDataContext";function nw(e){let t=A.useContext(iE);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,nw),n}return t}function mde(e,t){return tr(t.type,pde,e,t)}let yde=A.Fragment;function gde(e,t){var n;let r=el(),{value:i,defaultValue:s,form:o,name:a,onChange:c,by:d,invalid:h=!1,disabled:y=r||!1,horizontal:g=!1,multiple:x=!1,__demoMode:_=!1,...S}=e;const I=g?"horizontal":"vertical";let L=Fn(t),D=Dv(s),[F=x?[]:void 0,$]=Fv(i,c,D),[z,V]=A.useReducer(mde,{dataRef:A.createRef(),listboxState:_?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,__demoMode:_}),K=A.useRef({static:!1,hold:!1}),te=A.useRef(null),Q=A.useRef(null),ee=A.useRef(new Map),ne=TA(d),J=A.useCallback(Ve=>tr(M.mode,{1:()=>F.some(et=>ne(et,Ve)),0:()=>ne(F,Ve)}),[F]),M=A.useMemo(()=>({...z,value:F,disabled:y,invalid:h,mode:x?1:0,orientation:I,compare:ne,isSelected:J,optionsPropsRef:K,buttonRef:te,optionsRef:Q,listRef:ee}),[F,y,h,x,z,ee]);En(()=>{z.dataRef.current=M},[M]);let m=M.listboxState===0;Gv(m,[M.buttonRef,M.optionsRef],(Ve,et)=>{var lt;V({type:1}),Hv(et,qv.Loose)||(Ve.preventDefault(),(lt=M.buttonRef.current)==null||lt.focus())});let E=A.useMemo(()=>({open:M.listboxState===0,disabled:y,invalid:h,value:F}),[M,y,F,h]),C=Fe(Ve=>{let et=M.options.find(lt=>lt.id===Ve);et&&k(et.dataRef.current.value)}),N=Fe(()=>{if(M.activeOptionIndex!==null){let{dataRef:Ve,id:et}=M.options[M.activeOptionIndex];k(Ve.current.value),V({type:2,focus:Xt.Specific,id:et})}}),P=Fe(()=>V({type:0})),B=Fe(()=>V({type:1})),O=ac(),j=Fe((Ve,et,lt)=>{O.dispose(),O.microTask(()=>Ve===Xt.Specific?V({type:2,focus:Xt.Specific,id:et,trigger:lt}):V({type:2,focus:Ve,trigger:lt}))}),v=Fe((Ve,et)=>(V({type:5,id:Ve,dataRef:et}),()=>V({type:6,id:Ve}
77))),k=Fe(Ve=>tr(M.mode,{0(){return $?.(Ve)},1(){let et=M.value.slice(),lt=et.findIndex(tt=>ne(tt,Ve));return lt===-1?et.push(Ve):et.splice(lt,1),$?.(et)}})),X=Fe(Ve=>V({type:3,value:Ve})),re=Fe(()=>V({type:4})),ue=A.useMemo(()=>({onChange:k,registerOption:v,goToOption:j,closeListbox:B,openListbox:P,selectActiveOption:N,selectOption:C,search:X,clearSearch:re}),[]),[pe,we]=ph({inherit:!0}),Ce={ref:L},St=A.useCallback(()=>{if(D!==void 0)return $?.(D)},[$,D]);return Be.createElement(we,{value:pe,props:{htmlFor:(n=M.buttonRef.current)==null?void 0:n.id},slot:{open:M.listboxState===0,disabled:y}},Be.createElement(X3,null,Be.createElement(qA.Provider,{value:ue},Be.createElement(iE.Provider,{value:M},Be.createElement(Vg,{value:tr(M.listboxState,{0:er.Open,1:er.Closed})},a!=null&&F!=null&&Be.createElement($v,{disabled:y,data:{[a]:F},form:o,onReset:St}),gn({ourProps:Ce,theirProps:S,slot:E,defaultTag:yde,name:"Listbox"}))))))}let bde="button";function xde(e,t){var n;let r=nw("Listbox.Button"),i=rE("Listbox.Button"),s=A.useId(),o=Lg(),{id:a=o||`headlessui-listbox-button-${s}`,disabled:c=r.disabled||!1,autoFocus:d=!1,...h}=e,y=Fn(r.buttonRef,t,K3()),g=dF(),x=Fe(ne=>{switch(ne.key){case _t.Enter:D3(ne.currentTarget);break;case _t.Space:case _t.ArrowDown:ne.preventDefault(),gr.flushSync(()=>i.openListbox()),r.value||i.goToOption(Xt.First);break;case _t.ArrowUp:ne.preventDefault(),gr.flushSync(()=>i.openListbox()),r.value||i.goToOption(Xt.Last);break}}),_=Fe(ne=>{switch(ne.key){case _t.Space:ne.preventDefault();break}}),S=Fe(ne=>{var J;if(tl(ne.currentTarget))return ne.preventDefault();r.listboxState===0?(gr.flushSync(()=>i.closeListbox()),(J=r.buttonRef.current)==null||J.focus({preventScroll:!0})):(ne.preventDefault(),i.openListbox())}),I=Fe(ne=>ne.preventDefault()),L=hh([a]),D=Uv(),{isFocusVisible:F,focusProps:$}=Hc({autoFocus:d}),{isHovered:z,hoverProps:V}=qc({isDisabled:c}),{pressed:K,pressProps:te}=fh({disabled:c}),Q=A.useMemo(()=>({open:r.listboxState===0,active:K||r.listboxState===0,disabled:c,invalid:r.invalid,value:r.value,hover:z,focus:F,autofocus:d}),[r.listboxState,r.value,c,z,F,K,r.invalid,d]),ee=ps(g(),{ref:y,id:a,type:$g(e,r.buttonRef),"aria-haspopup":"listbox","aria-controls":(n=r.optionsRef.current)==null?void 0:n.id,"aria-expanded":r.listboxState===0,"aria-labelledby":L,"aria-describedby":D,disabled:c||void 0,autoFocus:d,onKeyDown:x,onKeyUp:_,onKeyPress:I,onClick:S},$,V,te);return gn({ourProps:ee,theirProps:h,slot:Q,defaultTag:bde,name:"Listbox.Button"})}let DF=A.createContext(!1),vde="div",wde=Os.RenderStrategy|Os.Static;function Ede(e,t){var n;let r=A.useId(),{id:i=`headlessui-listbox-options-${r}`,anchor:s,portal:o=!1,modal:a=!0,transition:c=!1,...d}=e,h=G3(s);h&&(o=!0);let y=nw("Listbox.Options"),g=rE("Listbox.Options"),x=cc(y.optionsRef),_=nl(),[S,I]=f0(c,y.optionsRef,_!==null?(_&er.Open)===er.Open:y.listboxState===0);Dg(S,y.buttonRef,g.closeListbox);let L=y.__demoMode?!1:a&&y.listboxState===0;Kv(L,x);let D=y.__demoMode?!1:a&&y.listboxState===0;z3(D,{allowed:Fe(()=>[y.buttonRef.current,y.optionsRef.current])});let F=y.listboxState!==0,$=BF(F,y.buttonRef)?!1:S,z=S&&y.listboxState===1,V=w6(z,y.value),K=Fe(B=>y.compare(V,B)),te=A.useMemo(()=>{var B;if(h==null||!((B=h?.to)!=null&&B.includes("selection")))return null;let O=y.options.findIndex(j=>K(j.dataRef.current.value));return O===-1&&(O=0),O},[h,y.options]),Q=(()=>{if(h==null)return;if(te===null)return{...h,inner:void 0};let B=Array.from(y.listRef.current.values());return{...h,inner:{listRef:{current:B},index:te}}})(),[ee,ne]=Z3(Q),J=Y3(),M=Fn(y.optionsRef,t,h?ee:null),m=ac();A.useEffect(()=>{var B;let O=y.optionsRef.current;O&&y.listboxState===0&&O!==((B=Wc(O))==null?void 0:B.activeElement)&&O?.focus({preventScroll:!0})},[y.listboxState,y.optionsRef,y.optionsRef.current]);let E=Fe(B=>{var O,j;switch(m.dispose(),B.key){case _t.Space:if(y.searchQuery!=="")return B.preventDefault(),B.stopPropagation(),g.search(B.key);case _t.Enter:if(B.preventDefault(),B.stopPropagation(),y.activeOptionIndex!==null){let{dataRef:v}=y.options[y.activeOptionIndex];g.onChange(v.current.value)}y.mode===0&&(gr.flushSync(()=>g.closeListbox()),(O=y.buttonRef.current)==null||O.focus({preventScroll:!0}));break;case tr(y.orientation,{vertical:_t.ArrowDown,horizontal:_t.ArrowRight}):return B.preventDefault(),B.stopPropagation(),g.goToOption(Xt.Next);case tr(y.orientation,{vertical:_t.ArrowUp,horizontal:_t.ArrowLeft}):return B.preventDefault(),B.stopPropagation(),g.goToOption(Xt.Previous);case _t.Home:case _t.PageUp:return B.preventDefault(),B.stopPropagation(),g.goToOption(Xt.First);case _t.End:case _t.PageDown:return B.preventDefault(),B.stopPropagation(),g.goToOption(Xt.Last);case _t.Escape:B.preventDefault(),B.stopPropagation(),gr.flushSync(()=>g.closeListbox()),(j=y.buttonRef.current)==null||j.focus({preventScroll:!0});return;case _t.Tab:B.preventDefault(),B.stopPropagation(),gr.flushSync(()=>g.closeListbox()),HB(y.buttonRef.current,B.shiftKey?Br.Previous:Br.Next);break;default:B.key.length===1&&(g.search(B.key),m.setTimeout(()=>g.clearSearch(),350));break}}),C=cde(()=>{var B;return(B=y.buttonRef.current)==null?void 0:B.id},[y.buttonRef.current]),N=A.useMemo(()=>({open:y.listboxState===0}),[y.listboxState]),P=ps(h?J():{},{id:i,ref:M,"aria-activedescendant":y.activeOptionIndex===null||(n=y.options[y.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":y.mode===1?!0:void 0,"aria-labelledby":C,"aria-orientation":y.orientation,onKeyDown:E,role:"listbox",tabIndex:y.listboxState===0?0:void 0,style:{...d.style,...ne,"--button-width":$x(y.buttonRef,!0).width},...d0(I)});return Be.createElement(ew,{enabled:o?e.static||S:!1},Be.createElement(iE.Provider,{value:y.mode===1?y:{...y,isSelected:K}},gn({ourProps:P,theirProps:d,slot:N,defaultTag:vde,features:wde,visible:$,name:"Listbox.Options"}
77)))}let _de="div";function Sde(e,t){let n=A.useId(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:s,...o}=e,a=A.useContext(DF)===!0,c=nw("Listbox.Option"),d=rE("Listbox.Option"),h=c.activeOptionIndex!==null?c.options[c.activeOptionIndex].id===r:!1,y=c.isSelected(s),g=A.useRef(null),x=FF(g),_=Oo({disabled:i,value:s,domRef:g,get textValue(){return x()}}),S=Fn(t,g,te=>{te?c.listRef.current.set(r,te):c.listRef.current.delete(r)});En(()=>{if(!c.__demoMode&&c.listboxState===0&&h&&c.activationTrigger!==0)return ya().requestAnimationFrame(()=>{var te,Q;(Q=(te=g.current)==null?void 0:te.scrollIntoView)==null||Q.call(te,{block:"nearest"})})},[g,h,c.__demoMode,c.listboxState,c.activationTrigger,c.activeOptionIndex]),En(()=>{if(!a)return d.registerOption(r,_)},[_,r,a]);let I=Fe(te=>{var Q;if(i)return te.preventDefault();d.onChange(s),c.mode===0&&(gr.flushSync(()=>d.closeListbox()),(Q=c.buttonRef.current)==null||Q.focus({preventScroll:!0}))}),L=Fe(()=>{if(i)return d.goToOption(Xt.Nothing);d.goToOption(Xt.Specific,r)}),D=AA(),F=Fe(te=>{D.update(te),!i&&(h||d.goToOption(Xt.Specific,r,0))}),$=Fe(te=>{D.wasMoved(te)&&(i||h||d.goToOption(Xt.Specific,r,0))}),z=Fe(te=>{D.wasMoved(te)&&(i||h&&d.goToOption(Xt.Nothing))}),V=A.useMemo(()=>({active:h,focus:h,selected:y,disabled:i,selectedOption:y&&a}),[h,y,i,a]);return!y&&a?null:gn({ourProps:a?{}:{id:r,ref:S,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":y,disabled:void 0,onClick:I,onFocus:L,onPointerEnter:F,onMouseEnter:F,onPointerMove:$,onMouseMove:$,onPointerLeave:z,onMouseLeave:z},theirProps:o,slot:V,defaultTag:_de,name:"Listbox.Option"})}let Tde=A.Fragment;function Ade(e,t){let{options:n,placeholder:r,...i}=e,s={ref:Fn(t)},o=nw("ListboxSelectedOption"),a=A.useMemo(()=>({}),[]),c=o.value===void 0||o.value===null||o.mode===1&&Array.isArray(o.value)&&o.value.length===0;return Be.createElement(DF.Provider,{value:!0},gn({ourProps:s,theirProps:{...i,children:Be.createElement(Be.Fragment,null,r&&c?r:n)},slot:a,defaultTag:Tde,name:"ListboxSelectedOption"}))}let kde=fn(gde),rw=fn(xde),Cde=zv,iw=fn(Ede),pg=fn(Sde),Ide=fn(Ade),sE=Object.assign(kde,{Button:rw,Label:Cde,Options:iw,Option:pg,SelectedOption:Ide});var Rde=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Rde||{}),Mde=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Mde||{}),Nde=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Nde||{});function W8(e,t=n=>n){let n=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=Wv(t(e.items.slice()),s=>s.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{items:r,activeItemIndex:i}}let jde={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,t)=>{var n,r,i,s,o;if(e.menuState===1)return e;let a={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===Xt.Nothing)return{...a,activeItemIndex:null};if(t.focus===Xt.Specific)return{...a,activeItemIndex:e.items.findIndex(h=>h.id===t.id)};if(t.focus===Xt.Previous){let h=e.activeItemIndex;if(h!==null){let y=e.items[h].dataRef.current.domRef,g=Gf(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:x=>x.id,resolveDisabled:x=>x.dataRef.current.disabled});if(g!==null){let x=e.items[g].dataRef.current.domRef;if(((r=y.current)==null?void 0:r.previousElementSibling)===x.current||((i=x.current)==null?void 0:i.previousElementSibling)===null)return{...a,activeItemIndex:g}}}}else if(t.focus===Xt.Next){let h=e.activeItemIndex;if(h!==null){let y=e.items[h].dataRef.current.domRef,g=Gf(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:x=>x.id,resolveDisabled:x=>x.dataRef.current.disabled});if(g!==null){let x=e.items[g].dataRef.current.domRef;if(((s=y.current)==null?void 0:s.nextElementSibling)===x.current||((o=x.current)==null?void 0:o.nextElementSibling)===null)return{...a,activeItemIndex:g}}}}let c=W8(e),d=Gf(t,{resolveItems:()=>c.items,resolveActiveIndex:()=>c.activeItemIndex,resolveId:h=>h.id,resolveDisabled:h=>h.dataRef.current.disabled});return{...a,...c,activeItemIndex:d}},3:(e,t)=>
77{let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(o=>{var a;return((a=o.dataRef.current.textValue)==null?void 0:a.startsWith(r))&&!o.dataRef.current.disabled}),s=i?e.items.indexOf(i):-1;return s===-1||s===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:s,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,t)=>{let n=W8(e,r=>[...r,{id:t.id,dataRef:t.dataRef}]);return{...e,...n}},6:(e,t)=>{let n=W8(e,r=>{let i=r.findIndex(s=>s.id===t.id);return i!==-1&&r.splice(i,1),r});return{...e,...n,activationTrigger:1}}},HA=A.createContext(null);HA.displayName="MenuContext";function oE(e){let t=A.useContext(HA);if(t===null){let n=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,oE),n}return t}function Pde(e,t){return tr(t.type,jde,e,t)}let Ode=A.Fragment;function Lde(e,t){let{__demoMode:n=!1,...r}=e,i=A.useReducer(Pde,{__demoMode:n,menuState:n?0:1,buttonRef:A.createRef(),itemsRef:A.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:s,itemsRef:o,buttonRef:a},c]=i,d=Fn(t);Gv(s===0,[a,o],(x,_)=>{var S;c({type:1}),Hv(_,qv.Loose)||(x.preventDefault(),(S=a.current)==null||S.focus())});let h=Fe(()=>{c({type:1})}),y=A.useMemo(()=>({open:s===0,close:h}),[s,h]),g={ref:d};return Be.createElement(X3,null,Be.createElement(HA.Provider,{value:i},Be.createElement(Vg,{value:tr(s,{0:er.Open,1:er.Closed})},gn({ourProps:g,theirProps:r,slot:y,defaultTag:Ode,name:"Menu"}))))}let Bde="button";function Fde(e,t){var n;let r=A.useId(),{id:i=`headlessui-menu-button-${r}`,disabled:s=!1,autoFocus:o=!1,...a}=e,[c,d]=oE("Menu.Button"),h=dF(),y=Fn(c.buttonRef,t,K3()),g=Fe(K=>{switch(K.key){case _t.Space:case _t.Enter:case _t.ArrowDown:K.preventDefault(),K.stopPropagation(),gr.flushSync(()=>d({type:0})),d({type:2,focus:Xt.First});break;case _t.ArrowUp:K.preventDefault(),K.stopPropagation(),gr.flushSync(()=>d({type:0})),d({type:2,focus:Xt.Last});break}}),x=Fe(K=>{switch(K.key){case _t.Space:K.preventDefault();break}}),_=Fe(K=>{var te;if(tl(K.currentTarget))return K.preventDefault();s||(c.menuState===0?(gr.flushSync(()=>d({type:1})),(te=c.buttonRef.current)==null||te.focus({preventScroll:!0})):(K.preventDefault(),d({type:0})))}),{isFocusVisible:S,focusProps:I}=Hc({autoFocus:o}),{isHovered:L,hoverProps:D}=qc({isDisabled:s}),{pressed:F,pressProps:$}=fh({disabled:s}),z=A.useMemo(()=>({open:c.menuState===0,active:F||c.menuState===0,disabled:s,hover:L,focus:S,autofocus:o}),[c,L,S,F,s,o]),V=ps(h(),{ref:y,id:i,type:$g(e,c.buttonRef),"aria-haspopup":"menu","aria-controls":(n=c.itemsRef.current)==null?void 0:n.id,"aria-expanded":c.menuState===0,disabled:s||void 0,autoFocus:o,onKeyDown:g,onKeyUp:x,onClick:_},I,D,$);return gn({ourProps:V,theirProps:a,slot:z,defaultTag:Bde,name:"Menu.Button"})}let Dde="div",$de=Os.RenderStrategy|Os.Static;function Ude(e,t){var n,r;let i=A.useId(),{id:s=`headlessui-menu-items-${i}`,anchor:o,portal:a=!1,modal:c=!0,transition:d=!1,...h}=e,y=G3(o),[g,x]=oE("Menu.Items"),[_,S]=Z3(y),I=Y3(),L=Fn(g.itemsRef,t,y?_:null),D=cc(g.itemsRef);y&&(a=!0);let F=nl(),[$,z]=f0(d,g.itemsRef,F!==null?(F&er.Open)===er.Open:g.menuState===0);Dg($,g.buttonRef,()=>{x({type:1})});let V=g.__demoMode?!1:c&&g.menuState===0;Kv(V,D);let K=g.__demoMode?!1:c&&g.menuState===0;z3(K,{allowed:Fe(()=>[g.buttonRef.current,g.itemsRef.current])});let te=g.menuState!==0,Q=BF(te,g.buttonRef)?!1:$;A.useEffect(()=>{let E=g.itemsRef.current;E&&g.menuState===0&&E!==D?.activeElement&&E.focus({preventScroll:!0})},[g.menuState,g.itemsRef,D,g.itemsRef.current]),ZB(g.menuState===0,{container:g.itemsRef.current,accept(E){return E.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:E.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(E){E.setAttribute("role","none")}});let ee=ac(),ne=Fe(E=>{var C,N,P;switch(ee.dispose(),E.key){case _t.Space:if(g.searchQuery!=="")return E.preventDefault(),E.stopPropagation(),x({type:3,value:E.key});case _t.Enter:if(E.preventDefault(),E.stopPropagation(),x({type:1}),g.activeItemIndex!==null){let{dataRef:B}=g.items[g.activeItemIndex];(N=(C=B.current)==null?void 0:C.domRef.current)==null||N.click()}qB(g.buttonRef.current);break;case _t.ArrowDown:return E.preventDefault(),E.stopPropagation(),x({type:2,focus:Xt.Next});case _t.ArrowUp:return E.preventDefault(),E.stopPropagation(),x({type:2,focus:Xt.Previous});case _t.Home:case _t.PageUp:return E.preventDefault(),E.stopPropagation(),x({type:2,focus:Xt.First});case _t.End:case _t.PageDown:return E.preventDefault(),E.stopPropagation(),x({type:2,focus:Xt.Last});case _t.Escape:E.preventDefault(),E.stopPropagation(),gr.flushSync(()=>x({type:1})),(P=g.buttonRef.current)==null||P.focus({preventScroll:!0});break;case _t.Tab:E.preventDefault(),E.stopPropagation(),gr.flushSync(()=>x({type:1}
77)),HB(g.buttonRef.current,E.shiftKey?Br.Previous:Br.Next);break;default:E.key.length===1&&(x({type:3,value:E.key}),ee.setTimeout(()=>x({type:4}),350));break}}),J=Fe(E=>{switch(E.key){case _t.Space:E.preventDefault();break}}),M=A.useMemo(()=>({open:g.menuState===0}),[g.menuState]),m=ps(y?I():{},{"aria-activedescendant":g.activeItemIndex===null||(n=g.items[g.activeItemIndex])==null?void 0:n.id,"aria-labelledby":(r=g.buttonRef.current)==null?void 0:r.id,id:s,onKeyDown:ne,onKeyUp:J,role:"menu",tabIndex:g.menuState===0?0:void 0,ref:L,style:{...h.style,...S,"--button-width":$x(g.buttonRef,!0).width},...d0(z)});return Be.createElement(ew,{enabled:a?e.static||$:!1},gn({ourProps:m,theirProps:h,slot:M,defaultTag:Dde,features:$de,visible:Q,name:"Menu.Items"}))}let zde=A.Fragment;function Vde(e,t){let n=A.useId(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...s}=e,[o,a]=oE("Menu.Item"),c=o.activeItemIndex!==null?o.items[o.activeItemIndex].id===r:!1,d=A.useRef(null),h=Fn(t,d);En(()=>{if(!o.__demoMode&&o.menuState===0&&c&&o.activationTrigger!==0)return ya().requestAnimationFrame(()=>{var Q,ee;(ee=(Q=d.current)==null?void 0:Q.scrollIntoView)==null||ee.call(Q,{block:"nearest"})})},[o.__demoMode,d,c,o.menuState,o.activationTrigger,o.activeItemIndex]);let y=FF(d),g=A.useRef({disabled:i,domRef:d,get textValue(){return y()}});En(()=>{g.current.disabled=i},[g,i]),En(()=>(a({type:5,id:r,dataRef:g}),()=>a({type:6,id:r})),[g,r]);let x=Fe(()=>{a({type:1})}),_=Fe(Q=>{if(i)return Q.preventDefault();a({type:1}),qB(o.buttonRef.current)}),S=Fe(()=>{if(i)return a({type:2,focus:Xt.Nothing});a({type:2,focus:Xt.Specific,id:r})}),I=AA(),L=Fe(Q=>{I.update(Q),!i&&(c||a({type:2,focus:Xt.Specific,id:r,trigger:0}))}),D=Fe(Q=>{I.wasMoved(Q)&&(i||c||a({type:2,focus:Xt.Specific,id:r,trigger:0}))}),F=Fe(Q=>{I.wasMoved(Q)&&(i||c&&a({type:2,focus:Xt.Nothing}))}),[$,z]=ph(),[V,K]=Bg(),te=A.useMemo(()=>({active:c,focus:c,disabled:i,close:x}),[c,i,x]);return Be.createElement(z,null,Be.createElement(K,null,gn({ourProps:{id:r,ref:h,role:"menuitem",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-labelledby":$,"aria-describedby":V,disabled:void 0,onClick:_,onFocus:S,onPointerEnter:L,onMouseEnter:L,onPointerMove:D,onMouseMove:D,onPointerLeave:F,onMouseLeave:F},theirProps:s,slot:te,defaultTag:zde,name:"Menu.Item"})))}let qde="div";function Hde(e,t){let[n,r]=ph();return Be.createElement(r,null,gn({ourProps:{ref:t,"aria-labelledby":n,role:"group"},theirProps:e,slot:{},defaultTag:qde,name:"Menu.Section"}))}let Wde="header";function Gde(e,t){let n=A.useId(),{id:r=`headlessui-menu-heading-${n}`,...i}=e,s=_A();En(()=>s.register(r),[r,s.register]);let o={id:r,ref:t,role:"presentation",...s.props};return gn({ourProps:o,theirProps:i,slot:{},defaultTag:Wde,name:"Menu.Heading"})}let Kde="div";function Yde(e,t){return gn({ourProps:{ref:t,role:"separator"},theirProps:e,slot:{},defaultTag:Kde,name:"Menu.Separator"})}let Zde=fn(Lde),$F=fn(Fde),UF=fn(Ude),ex=fn(Vde),tx=fn(Hde),Xde=fn(Gde),dT=fn(Yde),Qde=Object.assign(Zde,{Button:$F,Items:UF,Item:ex,Section:tx,Heading:Xde,Separator:dT});var Jde=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Jde||{}),efe=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(efe||{});let tfe={0:e=>({...e,popoverState:tr(e.popoverState,{0:1,1:0}),__demoMode:!1}),1(e){return e.popoverState===1?e:{...e,popoverState:1,__demoMode:!1}},2(e,t){return e.button===t.button?e:{...e,button:t.button}},3(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},4(e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},5(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},WA=A.createContext(null);WA.displayName="PopoverContext";function aE(e){let t=A.useContext(WA);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,aE),n}return t}let cE=A.createContext(null);cE.displayName="PopoverAPIContext";function GA(e){let t=A.useContext(cE);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,GA),n}return t}let KA=A.createContext(null);KA.displayName="PopoverGroupContext";function zF(){return A.useContext(KA)}let uE=A.createContext(null);uE.displayName="PopoverPanelContext";function nfe(){return A.useContext(uE)}function rfe(e,t){return tr(t.type,tfe,e,t)}let ife="div";function sfe(e,t){var n;let{__demoMode:r=!1,...i}=e,s=A.useRef(null),o=Fn(t,wA(P=>{s.current=P})),a=A.useRef([]),c=A.useReducer(rfe,{__demoMode:r,popoverState:r?0:1,buttons:a,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:A.createRef(),afterPanelSentinel:A.createRef(),afterButtonSentinel:A.createRef()}),[{popoverState:d,button:h,buttonId:y,panel:g,panelId:x,beforePanelSentinel:_,afterPanelSentinel:S,afterButtonSentinel:I},L]=c,D=cc((n=s.current)!=null?n:h),F=A.useMemo(()=>
77{if(!h||!g)return!1;for(let X of document.querySelectorAll("body > *"))if(Number(X?.contains(h))^Number(X?.contains(g)))return!0;let P=Vv(),B=P.indexOf(h),O=(B+P.length-1)%P.length,j=(B+1)%P.length,v=P[O],k=P[j];return!g.contains(v)&&!g.contains(k)},[h,g]),$=Oo(y),z=Oo(x),V=A.useMemo(()=>({buttonId:$,panelId:z,close:()=>L({type:1})}),[$,z,L]),K=zF(),te=K?.registerPopover,Q=Fe(()=>{var P;return(P=K?.isFocusWithinPopoverGroup())!=null?P:D?.activeElement&&(h?.contains(D.activeElement)||g?.contains(D.activeElement))});A.useEffect(()=>te?.(V),[te,V]);let[ee,ne]=gF(),J=PA(h),M=EF({mainTreeNode:J,portals:ee,defaultContainers:[h,g]});V3(D?.defaultView,"focus",P=>{var B,O,j,v,k,X;P.target!==window&&P.target instanceof HTMLElement&&d===0&&(Q()||h&&g&&(M.contains(P.target)||(O=(B=_.current)==null?void 0:B.contains)!=null&&O.call(B,P.target)||(v=(j=S.current)==null?void 0:j.contains)!=null&&v.call(j,P.target)||(X=(k=I.current)==null?void 0:k.contains)!=null&&X.call(k,P.target)||L({type:1})))},!0),Gv(d===0,M.resolveContainers,(P,B)=>{L({type:1}),Hv(B,qv.Loose)||(P.preventDefault(),h?.focus())});let m=Fe(P=>{L({type:1});let B=P?P instanceof HTMLElement?P:"current"in P&&P.current instanceof HTMLElement?P.current:h:h;B?.focus()}),E=A.useMemo(()=>({close:m,isPortalled:F}),[m,F]),C=A.useMemo(()=>({open:d===0,close:m}),[d,m]),N={ref:o};return Be.createElement(E6,{node:J},Be.createElement(X3,null,Be.createElement(uE.Provider,{value:null},Be.createElement(WA.Provider,{value:c},Be.createElement(cE.Provider,{value:E},Be.createElement(SA,{value:m},Be.createElement(Vg,{value:tr(d,{0:er.Open,1:er.Closed})},Be.createElement(ne,null,gn({ourProps:N,theirProps:i,slot:C,defaultTag:ife,name:"Popover"})))))))))}let ofe="button";function afe(e,t){let n=A.useId(),{id:r=`headlessui-popover-button-${n}`,disabled:i=!1,autoFocus:s=!1,...o}=e,[a,c]=aE("Popover.Button"),{isPortalled:d}=GA("Popover.Button"),h=A.useRef(null),y=`headlessui-focus-sentinel-${A.useId()}`,g=zF(),x=g?.closeOthers,_=nfe()!==null;A.useEffect(()=>{if(!_)return c({type:3,buttonId:r}),()=>{c({type:3,buttonId:null})}},[_,r,c]);let[S]=A.useState(()=>Symbol()),I=Fn(h,t,K3(),_?null:B=>{if(B)a.buttons.current.push(S);else{let O=a.buttons.current.indexOf(S);O!==-1&&a.buttons.current.splice(O,1)}a.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),B&&c({type:2,button:B})}),L=Fn(h,t),D=cc(h),F=Fe(B=>{var O,j,v;if(_){if(a.popoverState===1)return;switch(B.key){case _t.Space:case _t.Enter:B.preventDefault(),(j=(O=B.target).click)==null||j.call(O),c({type:1}),(v=a.button)==null||v.focus();break}}else switch(B.key){case _t.Space:case _t.Enter:B.preventDefault(),B.stopPropagation(),a.popoverState===1&&x?.(a.buttonId),c({type:0});break;case _t.Escape:if(a.popoverState!==0)return x?.(a.buttonId);if(!h.current||D!=null&&D.activeElement&&!h.current.contains(D.activeElement))return;B.preventDefault(),B.stopPropagation(),c({type:1});break}}),$=Fe(B=>{_||B.key===_t.Space&&B.preventDefault()}),z=Fe(B=>{var O,j;tl(B.currentTarget)||i||(_?(c({type:1}),(O=a.button)==null||O.focus()):(B.preventDefault(),B.stopPropagation(),a.popoverState===1&&x?.(a.buttonId),c({type:0}),(j=a.button)==null||j.focus()))}),V=Fe(B=>{B.preventDefault(),B.stopPropagation()}),{isFocusVisible:K,focusProps:te}=Hc({autoFocus:s}),{isHovered:Q,hoverProps:ee}=qc({isDisabled:i}),{pressed:ne,pressProps:J}=fh({disabled:i}),M=a.popoverState===0,m=A.useMemo(()=>({open:M,active:ne||M,disabled:i,hover:Q,focus:K,autofocus:s}),[M,Q,K,ne,i,s]),E=$g(e,h),C=ps(_?{ref:L,type:E,onKeyDown:F,onClick:z,disabled:i||void 0,autoFocus:s}:{ref:I,id:a.buttonId,type:E,"aria-expanded":a.popoverState===0,"aria-controls":a.panel?a.panelId:void 0,disabled:i||void 0,autoFocus:s,onKeyDown:F,onKeyUp:$,onClick:z,onMouseDown:V},te,ee,J),N=LA(),P=Fe(()=>{let B=a.panel;if(!B)return;function O(){tr(N.current,{[ca.Forwards]:()=>no(B,Br.First),[ca.Backwards]:()=>no(B,Br.Last)})===th.Error&&no(Vv().filter(j=>j.dataset.headlessuiFocusGuard!=="true"),tr(N.current,{[ca.Forwards]:Br.Next,[ca.Backwards]:Br.Previous}),{relativeTo:a.button})}O()});return Be.createElement(Be.Fragment,null,gn({ourProps:C,theirProps:o,slot:m,defaultTag:ofe,name:"Popover.Button"}),M&&!_&&d&&Be.createElement(od,{id:y,ref:a.afterButtonSentinel,features:Ku.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:P}))}let cfe="div",ufe=Os.RenderStrategy|Os.Static;function VF(e,t){let n=A.useId(),{id:r=`headlessui-popover-backdrop-${n}`,transition:i=!1,...s}=e,[{popoverState:o},a]=aE("Popover.Backdrop"),c=A.useRef(null),d=Fn(t,c),h=nl(),[y,g]=f0(i,c,h!==null?(h&er.Open)===er.Open:o===0),x=Fe(I=>{if(tl(I.currentTarget))return I.preventDefault();a({type:1})}),_=A.useMemo(()=>({open:o===0}),[o]),S={ref:d,id:r,"aria-hidden":!0,onClick:x,...d0(g)};
77return gn({ourProps:S,theirProps:s,slot:_,defaultTag:cfe,features:ufe,visible:y,name:"Popover.Backdrop"})}let lfe="div",dfe=Os.RenderStrategy|Os.Static;function ffe(e,t){let n=A.useId(),{id:r=`headlessui-popover-panel-${n}`,focus:i=!1,anchor:s,portal:o=!1,modal:a=!1,transition:c=!1,...d}=e,[h,y]=aE("Popover.Panel"),{close:g,isPortalled:x}=GA("Popover.Panel"),_=`headlessui-focus-sentinel-before-${n}`,S=`headlessui-focus-sentinel-after-${n}`,I=A.useRef(null),L=G3(s),[D,F]=Z3(L),$=Y3();L&&(o=!0);let z=Fn(I,t,L?D:null,P=>{y({type:4,panel:P})}),V=cc(I),K=vA();En(()=>(y({type:5,panelId:r}),()=>{y({type:5,panelId:null})}),[r,y]);let te=nl(),[Q,ee]=f0(c,I,te!==null?(te&er.Open)===er.Open:h.popoverState===0);Dg(Q,h.button,()=>{y({type:1})});let ne=h.__demoMode?!1:a&&Q;Kv(ne,V);let J=Fe(P=>{var B;switch(P.key){case _t.Escape:if(h.popoverState!==0||!I.current||V!=null&&V.activeElement&&!I.current.contains(V.activeElement))return;P.preventDefault(),P.stopPropagation(),y({type:1}),(B=h.button)==null||B.focus();break}});A.useEffect(()=>{var P;e.static||h.popoverState===1&&((P=e.unmount)==null||P)&&y({type:4,panel:null})},[h.popoverState,e.unmount,e.static,y]),A.useEffect(()=>{if(h.__demoMode||!i||h.popoverState!==0||!I.current)return;let P=V?.activeElement;I.current.contains(P)||no(I.current,Br.First)},[h.__demoMode,i,I.current,h.popoverState]);let M=A.useMemo(()=>({open:h.popoverState===0,close:g}),[h.popoverState,g]),m=ps(L?$():{},{ref:z,id:r,onKeyDown:J,onBlur:i&&h.popoverState===0?P=>{var B,O,j,v,k;let X=P.relatedTarget;X&&I.current&&((B=I.current)!=null&&B.contains(X)||(y({type:1}),((j=(O=h.beforePanelSentinel.current)==null?void 0:O.contains)!=null&&j.call(O,X)||(k=(v=h.afterPanelSentinel.current)==null?void 0:v.contains)!=null&&k.call(v,X))&&X.focus({preventScroll:!0})))}:void 0,tabIndex:-1,style:{...d.style,...F,"--button-width":$x(h.button,!0).width},...d0(ee)}),E=LA(),C=Fe(()=>{let P=I.current;if(!P)return;function B(){tr(E.current,{[ca.Forwards]:()=>{var O;no(P,Br.First)===th.Error&&((O=h.afterPanelSentinel.current)==null||O.focus())},[ca.Backwards]:()=>{var O;(O=h.button)==null||O.focus({preventScroll:!0})}})}B()}),N=Fe(()=>{let P=I.current;if(!P)return;function B(){tr(E.current,{[ca.Forwards]:()=>{var O;if(!h.button)return;let j=Vv(),v=j.indexOf(h.button),k=j.slice(0,v+1),X=[...j.slice(v+1),...k];for(let re of X.slice())if(re.dataset.headlessuiFocusGuard==="true"||(O=h.panel)!=null&&O.contains(re)){let ue=X.indexOf(re);ue!==-1&&X.splice(ue,1)}no(X,Br.First,{sorted:!1})},[ca.Backwards]:()=>{var O;no(P,Br.Previous)===th.Error&&((O=h.button)==null||O.focus())}})}B()});return Be.createElement(MA,null,Be.createElement(uE.Provider,{value:r},Be.createElement(cE.Provider,{value:{close:g,isPortalled:x}},Be.createElement(ew,{enabled:o?e.static||Q:!1},Q&&x&&Be.createElement(od,{id:_,ref:h.beforePanelSentinel,features:Ku.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:C}),gn({mergeRefs:K,ourProps:m,theirProps:d,slot:M,defaultTag:lfe,features:dfe,visible:Q,name:"Popover.Panel"}),Q&&x&&Be.createElement(od,{id:S,ref:h.afterPanelSentinel,features:Ku.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:N})))))}let hfe="div";function pfe(e,t){let n=A.useRef(null),r=Fn(n,t),[i,s]=A.useState([]),o=Fe(_=>{s(S=>{let I=S.indexOf(_);if(I!==-1){let L=S.slice();return L.splice(I,1),L}return S})}),a=Fe(_=>(s(S=>[...S,_]),()=>o(_))),c=Fe(()=>{var _;let S=Wc(n);if(!S)return!1;let I=S.activeElement;return(_=n.current)!=null&&_.contains(I)?!0:i.some(L=>{var D,F;return((D=S.getElementById(L.buttonId.current))==null?void 0:D.contains(I))||((F=S.getElementById(L.panelId.current))==null?void 0:F.contains(I))})}),d=Fe(_=>{for(let S of i)S.buttonId.current!==_&&S.close()}),h=A.useMemo(()=>({registerPopover:a,unregisterPopover:o,isFocusWithinPopoverGroup:c,closeOthers:d}),[a,o,c,d]),y=A.useMemo(()=>({}),[]),g=e,x={ref:r};return Be.createElement(E6,null,Be.createElement(KA.Provider,{value:h},gn({ourProps:x,theirProps:g,slot:y,defaultTag:hfe,name:"Popover.Group"})))}let mfe=fn(sfe),YA=fn(afe),yfe=fn(VF),gfe=fn(VF),ZA=fn(ffe),bfe=fn(pfe),qF=Object.assign(mfe,{Button:YA,Backdrop:gfe,Overlay:yfe,Panel:ZA,Group:bfe});var xfe=(e=>(e[e.RegisterOption=0]="RegisterOption",e[e.UnregisterOption=1]="UnregisterOption",e))(xfe||{});let vfe={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:Wv(n,r=>r.element.current)}},1(e,t){let n=e.options.slice(),r=e.options.findIndex(i=>i.id===t.id);return r===-1?e:(n.splice(r,1),{...e,options:n})}},XA=A.createContext(null);XA.displayName="RadioGroupDataContext";function QA(e){let t=A.useContext(XA);if(t===null){let n=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,QA),n}return t}let JA=A.createContext(null);JA.displayName="RadioGroupActionsContext";function ek(e){let t=A.useContext(JA);if(t===null){let n=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ek),n}return t}function wfe(e,t){return tr(t.type,vfe,e,t)}let Efe="div";function _fe(e,t){let n=A.useId(),r=el(),{id:i=`headlessui-radiogroup-${n}`,value:s,form:o,name:a,onChange:c,by:d,disabled:h=r||!1,defaultValue:y,...g}=e,x=TA(d),[_,S]=A.useReducer(wfe,{options:[]}),I=_.options,[L,D]=ph(),[F,$]=Bg(),z=A.useRef(null),V=Fn(z,t),K=Dv(y),[te,Q]=Fv(s,c,K),ee=A.useMemo(()=>I.find(O=>!O.propsRef.current.disabled),[I]),ne=A.useMemo(()=>I.some(O=>x(O.propsRef.current.value,te)),[I,te]),J=Fe(O=>{var j;if(h||x(O,te))return!1;let v=(j=I.find(k=>x(k.propsRef.current.value,O)))==null?void 0:j.propsRef.current;return v!=null&&v.disabled?!1:(Q?.(O),!0)}),M=Fe(O=>{let j=z.current;if(!j)return;
77let v=Wc(j),k=I.filter(X=>X.propsRef.current.disabled===!1).map(X=>X.element.current);switch(O.key){case _t.Enter:D3(O.currentTarget);break;case _t.ArrowLeft:case _t.ArrowUp:if(O.preventDefault(),O.stopPropagation(),no(k,Br.Previous|Br.WrapAround)===th.Success){let X=I.find(re=>re.element.current===v?.activeElement);X&&J(X.propsRef.current.value)}break;case _t.ArrowRight:case _t.ArrowDown:if(O.preventDefault(),O.stopPropagation(),no(k,Br.Next|Br.WrapAround)===th.Success){let X=I.find(re=>re.element.current===v?.activeElement);X&&J(X.propsRef.current.value)}break;case _t.Space:{O.preventDefault(),O.stopPropagation();let X=I.find(re=>re.element.current===v?.activeElement);X&&J(X.propsRef.current.value)}break}}),m=Fe(O=>(S({type:0,...O}),()=>S({type:1,id:O.id}))),E=A.useMemo(()=>({value:te,firstOption:ee,containsCheckedOption:ne,disabled:h,compare:x,..._}),[te,ee,ne,h,x,_]),C=A.useMemo(()=>({registerOption:m,change:J}),[m,J]),N={ref:V,id:i,role:"radiogroup","aria-labelledby":L,"aria-describedby":F,onKeyDown:M},P=A.useMemo(()=>({value:te}),[te]),B=A.useCallback(()=>{if(K!==void 0)return J(K)},[J,K]);return Be.createElement($,{name:"RadioGroup.Description"},Be.createElement(D,{name:"RadioGroup.Label"},Be.createElement(JA.Provider,{value:C},Be.createElement(XA.Provider,{value:E},a!=null&&Be.createElement($v,{disabled:h,data:{[a]:te||"on"},overrides:{type:"radio",checked:te!=null},form:o,onReset:B}),gn({ourProps:N,theirProps:g,slot:P,defaultTag:Efe,name:"RadioGroup"})))))}let Sfe="div";function Tfe(e,t){var n;let r=QA("RadioGroup.Option"),i=ek("RadioGroup.Option"),s=A.useId(),{id:o=`headlessui-radiogroup-option-${s}`,value:a,disabled:c=r.disabled||!1,autoFocus:d=!1,...h}=e,y=A.useRef(null),g=Fn(y,t),[x,_]=ph(),[S,I]=Bg(),L=Oo({value:a,disabled:c});En(()=>i.registerOption({id:o,element:y,propsRef:L}),[o,i,y,L]);let D=Fe(ne=>{var J;if(tl(ne.currentTarget))return ne.preventDefault();i.change(a)&&((J=y.current)==null||J.focus())}),F=((n=r.firstOption)==null?void 0:n.id)===o,{isFocusVisible:$,focusProps:z}=Hc({autoFocus:d}),{isHovered:V,hoverProps:K}=qc({isDisabled:c}),te=r.compare(r.value,a),Q=ps({ref:g,id:o,role:"radio","aria-checked":te?"true":"false","aria-labelledby":x,"aria-describedby":S,"aria-disabled":c?!0:void 0,tabIndex:c?-1:te||!r.containsCheckedOption&&F?0:-1,onClick:c?void 0:D,autoFocus:d},z,K),ee=A.useMemo(()=>({checked:te,disabled:c,active:$,hover:V,focus:$,autofocus:d}),[te,c,V,$,d]);return Be.createElement(I,{name:"RadioGroup.Description"},Be.createElement(_,{name:"RadioGroup.Label"},gn({ourProps:Q,theirProps:h,slot:ee,defaultTag:Sfe,name:"RadioGroup.Option"})))}let Afe="span";function kfe(e,t){var n;let r=QA("Radio"),i=ek("Radio"),s=A.useId(),o=Lg(),a=el(),{id:c=o||`headlessui-radio-${s}`,value:d,disabled:h=r.disabled||a||!1,autoFocus:y=!1,...g}=e,x=A.useRef(null),_=Fn(x,t),S=hh(),I=Uv(),L=Oo({value:d,disabled:h});En(()=>i.registerOption({id:c,element:x,propsRef:L}),[c,i,x,L]);let D=Fe(ne=>{var J;if(tl(ne.currentTarget))return ne.preventDefault();i.change(d)&&((J=x.current)==null||J.focus())}),{isFocusVisible:F,focusProps:$}=Hc({autoFocus:y}),{isHovered:z,hoverProps:V}=qc({isDisabled:h}),K=((n=r.firstOption)==null?void 0:n.id)===c,te=r.compare(r.value,d),Q=ps({ref:_,id:c,role:"radio","aria-checked":te?"true":"false","aria-labelledby":S,"aria-describedby":I,"aria-disabled":h?!0:void 0,tabIndex:h?-1:te||!r.containsCheckedOption&&K?0:-1,autoFocus:y,onClick:h?void 0:D},$,V),ee=A.useMemo(()=>({checked:te,disabled:h,hover:z,focus:F,autofocus:y}),[te,h,z,F,y]);return gn({ourProps:Q,theirProps:g,slot:ee,defaultTag:Afe,name:"Radio"})}let Cfe=fn(_fe),Ife=fn(Tfe),HF=fn(kfe),Rfe=zv,Mfe=EA,Nfe=Object.assign(Cfe,{Option:Ife,Radio:HF,Label:Rfe,Description:Mfe}),tk=A.createContext(null);tk.displayName="GroupContext";let jfe=A.Fragment;function Pfe(e){var t;let[n,r]=A.useState(null),[i,s]=ph(),[o,a]=Bg(),c=A.useMemo(()=>({switch:n,setSwitch:r}),[n,r]),d={},h=e;return Be.createElement(a,{name:"Switch.Description",value:o},Be.createElement(s,{name:"Switch.Label",value:i,props:{htmlFor:(t=c.switch)==null?void 0:t.id,onClick(y){n&&(y.currentTarget instanceof HTMLLabelElement&&y.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},Be.createElement(tk.Provider,{value:c},gn({ourProps:d,theirProps:h,slot:{},defaultTag:jfe,name:"Switch.Group"}))))}let Ofe="button";function Lfe(e,t){var n;let r=A.useId(),i=Lg(),s=el(),{id:o=i||`headlessui-switch-${r}`,disabled:a=s||!1,checked:c,defaultChecked:d,onChange:h,name:y,value:g,form:x,autoFocus:_=!1,...S}=e,I=A.useContext(tk),L=A.useRef(null),D=Fn(L,t,I===null?null:I.setSwitch),F=Dv(d),[$,z]=Fv(c,h,F??!1),V=ac(),[K,te]=A.useState(!1),Q=Fe(()=>{te(!0),z?.(!$),V.nextFrame(()=>{te(!1)})}),ee=Fe(X=>{if(tl(X.currentTarget))return X.preventDefault();X.preventDefault(),Q()}),ne=Fe(X=>{X.key===_t.Space?(X.preventDefault(),Q()):X.key===_t.Enter&&D3(X.currentTarget)}),J=Fe(X=>X.preventDefault()),M=hh(),m=Uv(),{isFocusVisible:E,focusProps:C}=Hc({autoFocus:_}),{isHovered:N,hoverProps:P}=qc({isDisabled:a}),{pressed:B,pressProps:O}=fh({disabled:a}),j=A.useMemo(()=>({checked:$,disabled:a,hover:N,focus:E,active:B,autofocus:_,changing:K}
77),[$,N,E,B,a,K,_]),v=ps({id:o,ref:D,role:"switch",type:$g(e,L),tabIndex:e.tabIndex===-1?0:(n=e.tabIndex)!=null?n:0,"aria-checked":$,"aria-labelledby":M,"aria-describedby":m,disabled:a||void 0,autoFocus:_,onClick:ee,onKeyUp:ne,onKeyPress:J},C,P,O),k=A.useCallback(()=>{if(F!==void 0)return z?.(F)},[z,F]);return Be.createElement(Be.Fragment,null,y!=null&&Be.createElement($v,{disabled:a,data:{[y]:g||"on"},overrides:{type:"checkbox",checked:$},form:x,onReset:k}),gn({ourProps:v,theirProps:S,slot:j,defaultTag:Ofe,name:"Switch"}))}let Bfe=fn(Lfe),Ffe=Pfe,Dfe=zv,$fe=EA,Ufe=Object.assign(Bfe,{Group:Ffe,Label:Dfe,Description:$fe});function zfe({children:e,content:t,className:n,anchor:r="bottom start"}){return u.jsxs(qF,{children:[u.jsx(YA,{className:"flex",as:"div",children:e}),u.jsx(ZA,{className:It("z-30 rounded-xl border border-accent-10 bg-accent-0 p-3 shadow-2xl [--anchor-gap:theme(spacing.2)]","transition duration-100 ease-out data-[closed]:scale-95 data-[closed]:opacity-0",n),anchor:r,transition:!0,children:t})]})}const{MIRRORS:cR}=ku;function uR({mirror:e}){return u.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-lg bg-accent-10 pr-2.5 hover:opacity-80",children:[u.jsx("a",{href:`https://${e}`,target:"_blank",className:"grow px-2.5 py-1.5 text-accent-50",rel:"noreferrer",children:e}),u.jsx(B3,{text:`https://${e}`})]})}function Vfe(){return u.jsxs("div",{className:"flex flex-col gap-4 text-xs text-accent-50",children:["Available centralized (web2) and decentralized (web3) website mirrors.",u.jsx("div",{children:"Centralized:"}),u.jsx("div",{className:"space-y-1",children:cR.centralized.map(e=>u.jsx(uR,{mirror:e},e))}),"Decentralized (IPFS):",u.jsx("div",{className:"space-y-1",children:cR.decentralized.map(e=>u.jsx(uR,{mirror:e},e))})]})}function qfe(){return u.jsx(zfe,{anchor:"top start",className:"w-72 p-5",content:u.jsx(Vfe,{}),children:u.jsx("button",{className:"text-xs text-accent-50 hover:text-foreground",children:"Website Mirrors"})})}const Hfe={primary:{solid:"bg-primary text-white",outline:"border-primary text-primary"},secondary:{solid:"bg-primary/10 text-primary",outline:"border-primary/30 text-primary"},neutral:{solid:"bg-accent-10 text-foreground",outline:"border-accent-30 text-foreground"},error:{solid:"bg-red/10 text-red",outline:"border-red/30 text-red"},white:{solid:"bg-white text-foreground dark:text-background",outline:"border-white text-white"}},Wfe={xs:"px-1.5 py-0.5 text-2xs rounded-full uppercase",sm:"px-3 py-1.5 text-xs rounded-lg",md:"px-4 py-2.5 text-xs rounded-xl",lg:"px-6 py-3.5 text-sm rounded-xl"};function wn({children:e,color:t="primary",appearance:n="solid",size:r="sm",pill:i=!0,className:s,disabled:o,pending:a,...c}){return u.jsxs(Sae,{as:c.href?"a":"button",disabled:a||o,className:It("relative inline-flex items-center justify-center border border-transparent bg-transparent text-center font-semibold transition hover:opacity-80",o&&"opacity-80",(a||o)&&"pointer-events-none cursor-default",Hfe[t][n],Wfe[r],i&&"rounded-full",s),...c,children:[a&&u.jsx("div",{className:"absolute inset-0 inline-flex items-center justify-center",children:u.jsx(Pv,{className:r==="xs"?"size-[1em]":"size-[1.25em]"})}),u.jsx("div",{className:It("inline-flex items-center justify-center gap-[0.75em] transition",o&&"opacity-50",a&&"invisible"),children:e})]})}function qn({href:e,children:t,useButton:n=!1,beforeNavigation:r,...i}){const[s,o]=Jf(),a=function(d,h){o&&(d.preventDefault(),o(h))},c=n?wn:"a";return u.jsx(c,{href:e,...i,onClick:d=>{r?.(),a(d,e)},children:t})}var Gfe=e=>typeof e!="string"?{}:e.split(/ ?; ?/).reduce((t,n)=>{const[r,i]=n.split(/ ?: ?/).map((s,o)=>o===0?s.replace(/\s+/g,""):s.trim());if(r&&i){const s=r.replace(/(\w)-(\w)/g,(a,c,d)=>`${c}${d.toUpperCase()}`);let o=i.trim();Number.isNaN(Number(i))||(o=Number(i)),t[r.startsWith("-")?r:s]=o}return t},{});function Kfe(e=6){const t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";let n="";for(let r=e;r>0;--r)n+=t[Math.round(Math.random()*(t.length-1))];return n}var Yfe=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],lR={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset
77:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode
77-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"};function Zfe(e,t){const{key:n,level:r,...i}=t;switch(e.nodeType){case 1:return A.createElement(Qfe(e.nodeName),Xfe(e,n),dR(e.childNodes,r,i));case 3:{const s=e.nodeValue?.toString()??"";if(!i.allowWhiteSpaces&&/^\s+$/.test(s)&&!/[\u00A0\u202F]/.test(s))return null;if(!e.parentNode)return s;const o=e.parentNode.nodeName.toLowerCase();return Yfe.includes(o)?(/\S/.test(s)&&console.warn(`A textNode is not allowed inside '${o}'. Your text "${s}" will be ignored`),null):s}case 8:return null;case 11:return dR(e.childNodes,r,t);default:return null}}function Xfe(e,t){const n={key:t};if(e instanceof Element){const r=e.getAttribute("class");r&&(n.className=r),[...e.attributes].forEach(i=>{switch(i.name){case"class":break;case"style":n[i.name]=Gfe(i.value);break;case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"readonly":case"required":case"reversed":case"selected":case"typemustmatch":n[lR[i.name]||i.name]=!0;break;default:n[lR[i.name]||i.name]=i.value}})}return n}function dR(e,t,n){const r=[...e].map((i,s)=>_6(i,{...n,index:s,level:t+1})).filter(Boolean);return r.length?r:null}function Qfe(e){return/[a-z]+[A-Z]+[a-z]+/.test(e)?e:e.toLowerCase()}function _6(e,t={}){if(!e||!(e instanceof Node))return null;const{actions:n=[],index:r=0,level:i=0,randomKey:s}=t;let o=e,a=`${i}-${r}`;const c=[];return s&&i===0&&(a=`${Kfe()}-${a}`),Array.isArray(n)&&n.forEach(d=>{d.condition(o,a,i)&&(typeof d.pre=="function"&&(o=d.pre(o,a,i),o instanceof Node||(o=e)),typeof d.post=="function"&&c.push(d.post(o,a,i)))}),c.length?c:Zfe(o,{key:a,level:i,...t})}function Jfe(e,t={}){if(!e||typeof e!="string")return null;const{includeAllNodes:n=!1,nodeOnly:r=!1,selector:i="body > *",type:s="text/html"}=t;try{const a=new DOMParser().parseFromString(e,s);if(n){const{childNodes:d}=a.body;return r?d:[...d].map(h=>_6(h,t))}const c=a.querySelector(i)||a.body.childNodes[0];if(!(c instanceof Node))throw new TypeError("Error parsing input");return r?c:_6(c,t)}catch{}return null}function WF(e,t={}){return typeof e=="string"?Jfe(e,t):e instanceof Node?_6(e,t):null}var ehe=Object.defineProperty,the=(e,t,n)=>t in e?ehe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d5=(e,t,n)=>(the(e,typeof t!="symbol"?t+"":t,n),n),fR="react-inlinesvg",hR=10,yr={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function O5(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function nhe(){return ihe()&&typeof window<"u"&&window!==null}async function GF(e,t){const n=await fetch(e,t),r=n.headers.get("content-type"),[i]=(r??"").split(/ ?; ?/);if(n.status>299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some(s=>i.includes(s)))throw new Error(`Content type isn't valid: ${i}`);return n.text()}function rhe(e=1){return new Promise(t=>{setTimeout(t,e*1e3)})}
77function ihe(){if(!document)return!1;const e=document.createElement("div");e.innerHTML="<svg />";const t=e.firstChild;return!!t&&t.namespaceURI==="http://www.w3.org/2000/svg"}function she(e){return e[Math.floor(Math.random()*e.length)]}function ohe(e){const t="abcdefghijklmnopqrstuvwxyz",r=`${t}${t.toUpperCase()}1234567890`;let i="";for(let s=0;s<e;s++)i+=she(r);return i}function ahe(e,...t){const n={};for(const r in e)({}).hasOwnProperty.call(e,r)&&(t.includes(r)||(n[r]=e[r]));return n}var che=class{constructor(){d5(this,"cacheApi"),d5(this,"cacheStore"),d5(this,"subscribers",[]),d5(this,"isReady",!1),this.cacheStore=new Map;let e=fR,t=!1;O5()&&(e=window.REACT_INLINESVG_CACHE_NAME??fR,t=!!window.REACT_INLINESVG_PERSISTENT_CACHE&&"caches"in window),t?caches.open(e).then(n=>{this.cacheApi=n,this.isReady=!0,this.subscribers.forEach(r=>r())}).catch(n=>{this.isReady=!0,console.error(`Failed to open cache: ${n.message}`)}):this.isReady=!0}onReady(e){this.isReady?e():this.subscribers.push(e)}async get(e,t){return await(this.cacheApi?this.fetchAndAddToPersistentCache(e,t):this.fetchAndAddToInternalCache(e,t)),this.cacheStore.get(e)?.content??""}set(e,t){this.cacheStore.set(e,t)}isCached(e){return this.cacheStore.get(e)?.status===yr.LOADED}async fetchAndAddToInternalCache(e,t){const n=this.cacheStore.get(e);if(n?.status===yr.LOADING){await this.handleLoading(e,async()=>{this.cacheStore.set(e,{content:"",status:yr.IDLE}),await this.fetchAndAddToInternalCache(e,t)});return}if(!n?.content){this.cacheStore.set(e,{content:"",status:yr.LOADING});try{const r=await GF(e,t);this.cacheStore.set(e,{content:r,status:yr.LOADED})}catch(r){throw this.cacheStore.set(e,{content:"",status:yr.FAILED}),r}}}async fetchAndAddToPersistentCache(e,t){const n=this.cacheStore.get(e);if(n?.status===yr.LOADED)return;if(n?.status===yr.LOADING){await this.handleLoading(e,async()=>{this.cacheStore.set(e,{content:"",status:yr.IDLE}),await this.fetchAndAddToPersistentCache(e,t)});return}this.cacheStore.set(e,{content:"",status:yr.LOADING});const r=await this.cacheApi?.match(e);if(r){const i=await r.text();this.cacheStore.set(e,{content:i,status:yr.LOADED});return}try{await this.cacheApi?.add(new Request(e,t));const s=await(await this.cacheApi?.match(e))?.text()??"";this.cacheStore.set(e,{content:s,status:yr.LOADED})}catch(i){throw this.cacheStore.set(e,{content:"",status:yr.FAILED}),i}}async handleLoading(e,t){let n=0;for(;this.cacheStore.get(e)?.status===yr.LOADING&&n<hR;)await rhe(.1),n+=1;n>=hR&&await t()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map(([e,t])=>({[e]:t}))}async delete(e){this.cacheApi&&await this.cacheApi.delete(e),this.cacheStore.delete(e)}async clear(){if(this.cacheApi){const e=await this.cacheApi.keys();for(const t of e)await this.cacheApi.delete(t)}this.cacheStore.clear()}};function pR(e){const t=A.useRef();return A.useEffect(()=>{t.current=e}),t.current}function uhe(e){const{baseURL:t,content:n,description:r,handleError:i,hash:s,preProcessor:o,title:a,uniquifyIDs:c=!1}=e;try{const d=lhe(n,o),h=WF(d,{nodeOnly:!0});if(!h||!(h instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");const y=KF(h,{baseURL:t,hash:s,uniquifyIDs:c});if(r){const g=y.querySelector("desc");g?.parentNode&&g.parentNode.removeChild(g);const x=document.createElementNS("http://www.w3.org/2000/svg","desc");x.innerHTML=r,y.prepend(x)}if(typeof a<"u"){const g=y.querySelector("title");if(g?.parentNode&&g.parentNode.removeChild(g),a){const x=document.createElementNS("http://www.w3.org/2000/svg","title");x.innerHTML=a,y.prepend(x)}}return y}catch(d){return i(d)}}function lhe(e,t){return t?t(e):e}function KF(e,t){const{baseURL:n="",hash:r,uniquifyIDs:i}=t,s=["id","href","xlink:href","xlink:role","xlink:arcrole"],o=["href","xlink:href"],a=(c,d)=>o.includes(c)&&(d?!d.includes("#"):!1);return i&&[...e.children].forEach(c=>{if(c.attributes?.length){const d=Object.values(c.attributes).map(h=>{const y=h,g=/url\((.*?)\)/.exec(h.value);return g?.[1]&&(y.value=h.value.replace(g[0],`url(${n}${g[1]}__${r})`)),y});
77s.forEach(h=>{const y=d.find(g=>g.name===h);y&&!a(h,y.value)&&(y.value=`${y.value}__${r}`)})}return c.children.length?KF(c,t):c}),e}var hy;function dhe(e){const{cacheRequests:t=!0,children:n=null,description:r,fetchOptions:i,innerRef:s,loader:o=null,onError:a,onLoad:c,src:d,title:h,uniqueHash:y}=e,[g,x]=A.useReducer((m,E)=>({...m,...E}),{content:"",element:null,isCached:t&&hy.isCached(e.src),status:yr.IDLE}),{content:_,element:S,isCached:I,status:L}=g,D=pR(e),F=pR(g),$=A.useRef(y??ohe(8)),z=A.useRef(!1),V=A.useRef(!1),K=A.useCallback(m=>{z.current&&(x({status:m.message==="Browser does not support SVG"?yr.UNSUPPORTED:yr.FAILED}),a?.(m))},[a]),te=A.useCallback((m,E=!1)=>{z.current&&x({content:m,isCached:E,status:yr.LOADED})},[]),Q=A.useCallback(async()=>{const m=await GF(d,i);te(m)},[i,te,d]),ee=A.useCallback(()=>{try{const m=uhe({...e,handleError:K,hash:$.current,content:_}),E=WF(m);if(!E||!A.isValidElement(E))throw new Error("Could not convert the src to a React element");x({element:E,status:yr.READY})}catch(m){K(new Error(m.message))}},[_,K,e]),ne=A.useCallback(async()=>{const m=/^data:image\/svg[^,]*?(;base64)?,(.*)/u.exec(d);let E;if(m?E=m[1]?window.atob(m[2]):decodeURIComponent(m[2]):d.includes("<svg")&&(E=d),E){te(E);return}try{if(t){const C=await hy.get(d,i);te(C,!0)}else await Q()}catch(C){K(C)}},[t,Q,i,K,te,d]),J=A.useCallback(async()=>{z.current&&x({content:"",element:null,isCached:!1,status:yr.LOADING})},[]);A.useEffect(()=>{if(z.current=!0,!O5()||V.current)return()=>{};try{if(L===yr.IDLE){if(!nhe())throw new Error("Browser does not support SVG");if(!d)throw new Error("Missing src");J()}}catch(m){K(m)}return V.current=!0,()=>{z.current=!1}},[]),A.useEffect(()=>{if(O5()&&D)if(D.src!==d){if(!d){K(new Error("Missing src"));return}J()}else(D.title!==h||D.description!==r)&&ee()},[r,ee,K,J,D,d,h]),A.useEffect(()=>{F&&(F.status!==yr.LOADING&&L===yr.LOADING&&ne(),F.status!==yr.LOADED&&L===yr.LOADED&&ee(),F.status!==yr.READY&&L===yr.READY&&c?.(d,I))},[ne,ee,I,c,F,d,L]);const M=ahe(e,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs");return O5()?S?A.cloneElement(S,{ref:s,...M}):[yr.UNSUPPORTED,yr.FAILED].includes(L)?n:o:o}function $f(e){hy||(hy=new che);const{loader:t}=e,n=A.useRef(!1),[r,i]=A.useState(hy.isReady);return A.useEffect(()=>{n.current||(hy.onReady(()=>{i(!0)}),n.current=!0)},[]),r?u.jsx(dhe,{...e}):t}const _r=A.memo(function({src:t,className:n,svgAttributes:r}){return u.jsx($f,{className:n,src:t,uniquifyIDs:!0,preProcessor:i=>{const o=new DOMParser().parseFromString(i,"image/svg+xml"),a=o.querySelector("svg");return a?(r&&Object.entries(r).forEach(([d,h])=>{a.setAttribute(d,String(h))}),new XMLSerializer().serializeToString(o)):i}})});function fhe(){const{formatLogs:e}=l0(),[t,n]=A.useState(!1),{mode:r}=M3();return u.jsx("footer",{className:"pb-4 pt-8 sm:pb-6 sm:pt-12 md:pb-8 md:pt-16 lg:pt-24",children:u.jsxs("div",{className:"rounded-2xl bg-accent-0 p-6 sm:p-10",children:[u.jsxs("div",{className:"flex items-start justify-between",children:[u.jsxs("nav",{className:"flex flex-col gap-2 text-xs text-accent-50 lg:flex-row lg:items-center lg:gap-5",children:[u.jsxs("div",{className:"flex flex-col gap-2 lg:flex-row lg:gap-6",children:[u.jsx(qn,{className:"text-accent-50 hover:text-foreground",href:"/docs",children:"Documentation"}),u.jsx(qn,{className:"text-accent-50 hover:text-foreground",href:"/security",children:"Security"}),u.jsx(qn,{className:"text-accent-50 hover:text-foreground",href:"/brand",children:"Brand Kit"}),!1,u.jsxs(qn,{className:"text-accent-50 hover:text-foreground",href:"/launcher",children:["Aero"," Launch"]})]}),u.jsx("div",{className:"hidden text-accent-40 lg:block",children:"|"}),u.jsxs("div",{className:"flex flex-col gap-2 lg:flex-row lg:gap-6",children:[u.jsx("a",{className:"text-accent-50 hover:text-foreground",href:ku.dune,target:"_blank",rel:"noreferrer",children:"Analytics"}),u.jsx("a",{className:"text-accent-50 hover:text-foreground",href:ku.discord,target:"_blank",rel:"noreferrer",children:"Support"})]}),u.jsx("div",{className:"hidden text-accent-40 lg:block",children:"|"}),u.jsx(qfe,{})]}),u.jsx(hse,{})]}),u.jsx("div",{className:"mt-8 flex flex-col gap-8 md:mt-40 md:flex-row md:items-center md:justify-between",children:u.jsxs("div",{className:"flex items-center gap-3.5",children:[u.jsx("a",{href:ku.twitter,target:"_blank",rel:"noreferrer",className:"block",children:u.jsx(_r,{src:"/svg/icn-x.svg",className:"size-8 hover:opacity-80"})}),u.jsx("a",{href:ku.warpcast,target:"_blank",rel:"noreferrer",className:"block",children:u.jsx(_r,{src:"/svg/icn-farcaster.svg",className:"size-8 hover:opacity-80"})}),u.jsx("a",{href:ku.discord,target:"_blank",rel:"noreferrer",className:"block",children:u.jsx(_r,{src:"/svg/icn-discord.svg",className:"size-8 hover:opacity-80"})}),u.jsx("a",{href:ku.debank,target:"_blank",rel:"noreferrer",className:"block",children:u.jsx(_r,{src:"/svg/icn-debank.svg",className:"size-8 hover:opacity-80"})}),u.jsx("a",{href:ku.github,target:"_blank",rel:"noreferrer",className:"block",children:u.jsx(_r,{src:"/svg/icn-git.svg",className:"size-8 hover:opacity-80"})}),u.jsx("a",{href:ku.medium,target:"_blank",rel:"noreferrer",className:"block",children:u.jsx(_r,{src:"/svg/icn-medium.svg",className:"size-8 hover:opacity-80"})})]})}),u.jsxs("div",{className:"mt-6 flex flex-col md:flex-row md:items-center md:justify-between",children:[u.jsxs("div",{className:"mb-6 flex flex-col gap-2 text-xs text-accent-40 sm:mb-0 md:flex-row md:items-center md:gap-3",children:[u.jsxs("div",{children:[new Date().getFullYear()," © ",ls.appName," Finance"]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("div",{onClick:()=>n(i=>!i),children:"v5.0.0+c43409"}),t&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"cursor-pointer underline",onClick:()=>{n(i=>!i),navigator.clipboard.writeText(e())},children:"Copy Logs"}),u.jsx("span",{children:G9().join(" ")})]})]}),u.jsx("div",{className:"hidden text-accent-40 md:block",children:"·"}
77),u.jsx(qn,{className:"text-accent-50 hover:text-foreground",href:"/legal",children:"Legal Disclaimer"}),u.jsx("a",{className:"text-accent-50 hover:text-foreground",href:`/documents/${oo}/legal-disclosures.pdf`,target:"_blank",rel:"noreferrer",children:"Legal Disclosures"})]}),u.jsxs("div",{className:"flex items-center gap-3 text-xs text-accent-50",children:["A public good for",u.jsx(_r,{src:"/svg/logo-base.svg",className:"h-4"})]})]})]})})}function mh({isOpen:e,onClose:t,title:n,children:r,className:i,padded:s=!0}){return u.jsxs(jF,{open:e,onClose:t,children:[u.jsx(MF,{transition:!0,className:"fixed inset-0 z-30 bg-black/80 transition duration-500 data-[closed]:opacity-0 data-[closed]:duration-100"}),u.jsx("div",{className:"fixed inset-0 z-40 overflow-y-auto pt-5 sm:p-8",children:u.jsx("div",{className:"flex min-h-full items-end justify-center sm:items-center",children:u.jsxs(DA,{transition:!0,className:It("relative w-full max-w-xl overflow-hidden rounded-t-2xl bg-accent-0 shadow-2xl sm:rounded-b-2xl","transition duration-300 data-[closed]:translate-y-12 data-[closed]:opacity-0 data-[closed]:duration-100",i),children:[n&&u.jsxs(NF,{as:"h3",className:"flex justify-between border-b border-accent-10 p-5 text-sm font-semibold",children:[n,u.jsx("button",{type:"button",className:"-m-1 rounded-full p-1 transition hover:bg-accent-10 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50",onClick:t,"aria-label":"Close Modal","data-test-id":"modal-close-button",children:u.jsx(jg,{size:20})})]}),u.jsx("div",{className:s?"p-5 sm:p-8":"",children:r})]})})})]})}function xd(){const e=YL(),t=C3(),n=A.useMemo(()=>new URLSearchParams(e),[e]),r=A.useCallback((s,{preserveParams:o=!1}={})=>{const a=o?{...Object.fromEntries(n.entries()),...s}:s;return Object.keys(a).forEach(c=>{a[c]===""&&delete a[c]}),new URLSearchParams(a)},[n]),i=A.useCallback((s,o={})=>{const{preserveParams:a=!1,replace:c=!0}=o,d=window.location.hash,h=r(s,{preserveParams:a}),y=`${t}${Array.from(h).length?"?"+h:""}${d}`;y!==window.location.pathname+window.location.search+window.location.hash&&ZL(y,{replace:c})},[t,n]);return[n,i,r]}function Rr(){const e=Fo(),[t]=xd(),n=t.get("account");return{...e,address:n||e.address}}function Zu(e,t=!1){const n=e??BS(Fc),r=og[n]||LJ[n]||Pt;return{chain:t?FO.concat(DO).find(i=>i.id===r.id):r,isCanonical:YF(r.id)}}const Zn=e=>{const{chainId:t}=Rr();return A.useMemo(()=>Zu(e),[t,e])};function YF(e){return e===Pt.id}async function Hg(e,t,n,r,i,s=!0,o,a){const c=o?[...FO,...DO].filter(_=>o.includes(_.id)):void 0,d=en.uniqBy(c?.length?c:[...$J],"id"),h=d.map(_=>n(_)),y=await Promise.allSettled(Vp(t,h)),g=[],x=[];for(let _=0;_<y.length;_++){const S=y[_];if(S.status==="fulfilled"){const I="payload"in S.value?S.value.payload:S.value;S.value.hasOOG&&(a?.(),toast.error(`Fetching ${d[_].name} ${e.toLowerCase()}: read limit reached`)),g.push(I),x.push(d[_])}else s&&(console.error(S.reason),toast.error(`Could not load ${e.toLowerCase()} for ${d[_].name}.`))}if(r){const[_]=await Promise.allSettled(Vp(r,[[g,x,i?.(g,x)]]));if(_.status==="fulfilled")return _.value;throw console.error(_.reason),_.reason}else return g.flat()}function Zp(e){const{data:t={},isPending:n}=$ne(),r=t[e],{pushLog:i,utils:s}=l0(),o="CAP"+e;A.useEffect(()=>{r&&!s.topicPresent(o)&&i(o,Gp(r))},[Gp(r)+o]);const{atomicBatch:a,atomicNeedsUpgrade:c}=A.useMemo(()=>{const d=!n&&!!r,h=d&&"atomic"in r&&["ready","supported"].includes(r.atomic?.status??""),y=d&&r.atomicBatch?.supported===!0;return{atomicNeedsUpgrade:r?.atomic?.status==="ready"||r?.atomicBatch?.ready===!0,atomicBatch:hd.includes("batched-txs")&&(h||y)}},[n,r]);return{...t[e]??{},atomicBatch:a,atomicNeedsUpgrade:c}}async function hhe(e){return(await hL(Fc,{chainId:e})).timestamp+dJ}function vd(e,t){const{address:n}=Rr(),{atomicBatch:r,atomicNeedsUpgrade:i}=Zp(e),s=t||n,{data:o}=Gne({contracts:[{chainId:e,address:s,abi:Cn(["function isOwner(address) view returns (bool)"]),functionName:"isOwner",args:[Pn]}],query:{enabled:!!s}}),{data:a,isSuccess:c}=gL({chainId:e,address:s,query:{enabled:!!s}}),d=A.useMemo(()=>!a||bi(a)!==23||!a.toLowerCase().startsWith("0xef0100")?null:Qi(Zy(a,3)),[a]);if(!s||!c||!o)return null;const[h]=o;return d?"7702":a?h.status==="success"?"MSIG":"4337":r&&!i?"4337":"EOA"}function phe(e={}){const{chain:t}=Rr(),{chain:n}=Zn(t?.id??Pt.id);return{...Kr({queryKey:["fetchApproximateServerUnixTimestamp"],queryFn:()=>hhe(n.id),...e}),chain:n}}const ap=new Map;function yh(e,t){if(A.useSyncExternalStore===void 0)throw new TypeError('You are using React 17 or below. Install with "npm install use-local-storage-state@17".');const[n]=A.useState(t?.defaultValue);if(typeof window>"u")return[n,()=>{},{isPersistent:!0,removeItem:()=>{}}];const r=t?.serializer;return mhe(e,n,t?.storageSync,r?.parse,r?.stringify)}function mhe(e,t,n=!0,r=yhe,i=JSON.stringify){if(!ap.has(e)&&t!==void 0&&localStorage.getItem(e)===null)try{localStorage.setItem(e,i(t))}catch{}const s=A.useRef({item:null,parsed:t}),o=A.useSyncExternalStore(A.useCallback(c=>{const d=h=>{e===h&&c()};return fT.add(d),()=>{fT.delete(d)}},[e]),()=>{const c=localStorage.getItem(e);if(ap.has(e))s.current={item:c,parsed:ap.get(e)};else if(c!==s.current.item){let d;try{d=c===null?t:r(c)}catch{d=t}s.current={item:c,parsed:d}}return s.current.parsed},()=>t),a=A.useCallback(c=>{const d=c instanceof Function?c(s.current.parsed):c;try{localStorage.setItem(e,i(d)),ap.delete(e)}catch{ap.set(e,d)}G8(e)},[e,i]);return A.useEffect(()=>{if(!n)return;const c=d=>{d.storageArea===localStorage&&d.key===e&&G8(e)};return window.addEventListener("storage",c),()=>window.removeEventListener("storage",c)},[e,n]),A.useMemo(()=>[o,a,{isPersistent:o===t||!ap.has(e),removeItem(){ap.delete(e),localStorage.removeItem(e),G8(e)}}],[e,a,o,t])}const fT=new Set;function G8(e){for(const t of[...fT])t(e)}function yhe(e){return e==="undefined"?void 0:JSON.parse(e)}const ghe=VL().length,lE=()=>{const{address:e,isConnected:t}=Rr(),{connect:n,connectors:r,isPending:i}=zne(),{disconnect:s}=Hne(),o=A.useMemo(()=>r.slice(0,ghe).map(a=>a.name==="Injected"?{...a,name:"Browser Wallet"}:a),[r]);return A.useEffect(()=>{const a=o.find(c=>c.id==="safe");a?.getProvider().then(c=>{c&&n({connector:a})})},[n,o]),{address:e,isConnected:t,isPending:i,connectors:o,connect({connector:a}){n({connector:a})},disconnect(){s()}}},bhe=()=>{const{address:e,isConnected:t}=Rr(),[n,r]=yh("terms-signed",{defaultValue:!1}),i=CJ+new Date().toJSON(),[s,o]=A.useState(!1),{error:a,isPending:c,signMessage:d}=Yne({mutation:{async onSuccess(h,y){const g=await vte(Fc,{address:e,message:y.message,signature:h});g&&(r(!0),o(t&&g))}}});return{address:e,isConnected:t,isPending:c,isSigned:n,isNewSignin:s,error:a,signIn(){d({account:e,message:i})}}},Fb="to",nk=()=>{const[e,t]=Jf(),[n]=xd(),r=YL();return{getConnectUrl({keepSearch:i=!1}={}){const s=n.get(Fb);return i?`/connect?${Fb}=${encodeURIComponent(e+r)}`:s?`/connect?${Fb}=${encodeURIComponent(s)}`:`/connect?${Fb}=${encodeURIComponent(`${e}?${n.toString()}`)}`},navigateAfterSignin(){const i=n.get(Fb)||IJ;t(decodeURIComponent(i))}}};function Wg({address:e,className:t,showCopy:n=!1}){return e?u.jsxs("div",{className:It("group/address inline-flex items-center gap-1.5",t),children:[e.substring(0,6),"...",e.substring(e.length-4),n&&u.jsx("div",{className:"flex opacity-0 transition group-hover/address:opacity-100",children:u.jsx(B3,{text:e})})]}):null}function qx({chainId:e,className:t,children:n}){const{chain:r}=Zn(e),{id:i,name:s}=r;return u.jsxs("div",{className:It("flex items-center gap-1.5 text-xs text-accent-50",t),children:[n,u.jsx("img",{src:`/svg/chains/${i}.svg`,className:"size-3 rounded"})," ",s]})}function xhe({onSelect:e,includeExternalChains:t=!1}){const[n,r]=A.useState(Pt),i=t?[...Xi,...Up]:Xi;return A.useEffect(()=>{e?.(n)},[n,e]),u.jsxs(sE,{value:n,onChange:r,children:[u.jsxs(rw,{className:"relative flex items-center gap-4 roun
77ded-lg border border-accent-30 bg-transparent p-3 text-base placeholder-accent-40 outline-0 hover:border-accent-40 focus:border-accent-40 dark:bg-transparent",children:[u.jsx("img",{src:`/svg/chains/${n.id}.svg`,className:"size-4","aria-hidden":"true"}),u.jsx(Ju,{className:"group pointer-events-none size-4","aria-hidden":"true"})]}),u.jsx(iw,{anchor:"bottom start",transition:!0,className:xi("relative z-50 rounded-xl p-1 [--anchor-gap:4px]","bg-accent-0 shadow-2xl focus:outline-none","origin-top transition duration-200 ease-out data-[closed]:scale-95 data-[closed]:opacity-0"),children:i.map(s=>u.jsx(pg,{value:s,className:"group flex cursor-default select-none items-center gap-2 rounded-lg px-3 py-1.5",children:u.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[u.jsx("img",{src:`/svg/chains/${s.id}.svg`,className:"w-5"}),s.name]})},s.id))})]})}const gh=A.forwardRef(({icon:e,endIcon:t,placeholder:n,className:r,iconClassName:i,onChange:s,value:o,testId:a,showClearIcon:c=!0,...d},h)=>{const y=A.useMemo(()=>{const S=e;return S?.render?S.render({className:"w-4 h-4"}):e},[e]),{utils:{getId:g,topicPresent:x,pushOrMutate:_}}=l0();return A.useEffect(()=>{const S=g("INPT",a);!x(S,!0)&&!o||_(S,I=>I?`${I}>${o}`:o)},[o]),u.jsxs("div",{className:It("outline outline-0 -outline-offset-1 outline-accent-50 focus-within:outline-1","relative flex items-center rounded-xl border border-accent-30 text-xs focus-within:border-transparent",r),children:[e&&u.jsx("div",{className:It("pointer-events-none ml-3.5",i),children:y}),u.jsx("input",{ref:h,type:"text",autoComplete:"off",className:It("w-full grow text-ellipsis border-none bg-transparent px-3.5 py-2.5 text-base placeholder-accent-50 outline-none focus:ring-0 sm:text-sm",!t&&o&&c&&"pr-10"),value:o,onChange:s,placeholder:n,...d}),!t&&o&&c&&u.jsx("button",{onClick:()=>s({target:{value:""}}),"aria-label":"Clear input",className:"absolute right-0 mr-4 rounded-full bg-accent-10 p-1 hover:opacity-80",children:u.jsx(jg,{className:"size-2.5 text-accent-50"})}),t]})});gh.displayName="Input";function vhe(){const[e,t]=yh("customRPCs",{defaultValue:[]}),[n,r]=A.useState(""),[i,s]=A.useState(Pt),o=[...Xi,...Up];A.useEffect(()=>{(()=>{const y={};o.forEach(g=>{const x=`customRPC${g.id}`,_=localStorage.getItem(x);_&&(e[g.id]||(y[g.id]=_),localStorage.removeItem(x))}),Object.keys(y).length>0&&t(g=>({...g,...y}))})()},[]);const a=h=>{t(y=>{const g={...y};return delete g[h],g}),c()},c=()=>{toast.success(u.jsxs("div",{children:["RPC settings updated."," ",u.jsx("button",{type:"button",className:"inline text-green no-underline underline-offset-2 hover:underline",onClick:()=>window.location.reload(),children:"Refresh page"})," ","to apply."]}))},d=h=>{h.preventDefault(),t(y=>({...y,[i.id]:n})),r(""),c()};return u.jsx("div",{className:"rounded-xl bg-accent-10 p-6",children:u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsx("p",{className:"max-w-96 text-xs text-accent-50",children:"To communicate with the network with your personal RPC, add it here and reload the page. This is saved only in your browser, locally. Remove RPCs if you want to use the default options."}),u.jsx("h2",{className:"pt-6 text-sm font-bold text-accent-50",children:"Custom RPCs"}),u.jsxs("form",{className:"flex flex-wrap items-center gap-3",onSubmit:d,children:[o.length>1&&u.jsx("div",{className:"flex-shrink-0",children:u.jsx(xhe,{onSelect:h=>s(h),includeExternalChains:!0})}),u.jsx("div",{className:"min-w-0 flex-auto",children:u.jsx(gh,{type:"url",value:n,onChange:h=>r(h.target.value),icon:Ure,placeholder:"RPC URL"})}),u.jsx("div",{className:"w-full sm:w-auto",children:u.jsx(wn,{type:"submit",size:"lg",className:"w-full sm:w-auto",children:"Add"})})]}),u.jsx("div",{className:"flex flex-col gap-4",children:Object.entries(e).map(([h,y])=>u.jsxs("div",{className:"flex flex-col gap-3 border-t border-accent-20 pt-4 text-xs",children:[u.jsxs("div",{className:"flex items-center gap-2 text-accent-50",children:[u.jsx(qx,{chainId:Number(h)}),u.jsx("button",{className:"text-primary hover:underline hover:underline-offset-2",onClick:()=>a(Number(h)),children:"Remove"})]}),u.jsx("div",{className:"max-w-full overflow-hidden text-ellipsis whitespace-nowrap text-accent-50",title:y,children:y})]},`custom-rpc-${h}`))})]})})}function whe({children:e,className:t}){const[n,r]=A.useState(null),i=A.useRef(null),s=A.useCallback(()=>
77{if(!i.current)return;const{scrollTop:o,clientHeight:a,scrollHeight:c}=i.current;c<=a?r(null):o===0?r("top"):o+a>=c-1?r("bottom"):r("middle")},[]);return A.useEffect(()=>{const o=en.debounce(()=>{s()},15);return i.current?.addEventListener("scroll",o,{passive:!0}),()=>{o.cancel(),i.current?.removeEventListener("scroll",o)}},[s]),A.useEffect(()=>{if(!i.current)return;const o=new ResizeObserver(()=>{s()});return o.observe(i.current),()=>{o.disconnect()}},[s]),u.jsx("div",{ref:i,className:It("-mx-4 max-h-full flex-1 overflow-y-auto px-4",n!==null&&"[mask-image:linear-gradient(0deg,transparent,black_15%,black_85%,transparent)] [mask-position:center] [mask-repeat:no-repeat] [mask-size:100%_180%]",n==="top"&&"[mask-position:bottom]",n==="middle"&&"[mask-size:100%_100%]",n==="bottom"&&"[mask-position:top]",t),children:e})}const ZF=A.createContext(void 0),Ehe=({children:e})=>{const[t,n]=yh("disabledChains",{defaultValue:[]}),r=A.useMemo(()=>Xi.map(s=>s.id).filter(s=>!t.includes(s)),[t]),i=A.useCallback(s=>{const a=Xi.map(c=>c.id).filter(c=>!s.includes(c));n(a)},[n]);return u.jsx(ZF.Provider,{value:{favoriteChains:r,setFavoriteChains:i},children:e})},_he=()=>{const e=A.useContext(ZF);if(e===void 0)throw new Error("useFavoriteChainsContext must be used within a FavoriteChainsProvider");return e};function She({closeModal:e}){const[t,n]=A.useState(""),{favoriteChains:r,setFavoriteChains:i}=_he(),[s,o]=A.useState(()=>Array.from(new Set([...r,Pt.id]))),a=JSON.stringify(r)!=JSON.stringify(s),c=s.length<Xi.length,d=Object.values(Xi).filter(_=>_.name.toLowerCase().includes(t.toLowerCase())),h=_=>{_!==Pt.id&&o(s.includes(_)?s.filter(S=>S!==_):[...s,_])},y=()=>{n(""),o(r)},g=()=>{i(s),e()},x=()=>{o(s.length===Xi.length?[Pt.id]:Object.values(Xi).map(_=>_.id))};return u.jsxs("div",{className:"flex h-full max-h-[calc(100vh-200px)] flex-col overflow-y-auto",children:[u.jsxs("div",{className:"mb-8 flex flex-col gap-1 text-sm sm:pr-12",children:[u.jsx("p",{className:"font-semibold",children:"Select the chains you want to interact with"}),u.jsx("p",{className:"text-accent-50",children:"Any network you turn off will be excluded from swaps, liquidity, voting, and stats."})]}),u.jsxs(fle,{value:t,onChange:()=>{},children:[u.jsx("div",{className:"mb-3 px-[2px]",children:u.jsx(vF,{"aria-label":"Search Chains",placeholder:"Search...",onChange:_=>n(_.target.value),value:t,icon:Lx,as:gh})}),u.jsxs("div",{className:"flex items-center justify-between py-5",children:[u.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[u.jsx("div",{className:"text-accent-50",children:"Chains"}),u.jsxs("div",{className:"rounded bg-primary/10 px-2 py-1 text-2xs font-semibold tabular-nums leading-none text-primary",children:[s.length," / ",Xi.length]})]}),u.jsx("button",{type:"button",className:"text-xs text-primary transition-opacity hover:opacity-80",onClick:x,"data-test-id":"favorite-chains-toggle-all",children:s.length===Xi.length?"Deselect all":"Select all"})]}),u.jsx(wF,{className:"flex max-h-72 min-h-32 flex-1 basis-72 flex-col overflow-hidden border-t border-accent-10",static:!0,children:u.jsx(whe,{className:"flex flex-1 flex-col",children:u.jsx("div",{className:"flex flex-1 flex-col divide-y divide-accent-10",children:d.length>0?d.map(_=>{const S=s.includes(_.id),I=_.id===Pt.id;return u.jsxs(ade,{className:"group flex w-full items-center",disabled:I,children:[u.jsxs(zv,{className:xi("flex flex-1 grow items-center gap-3 py-4 pr-2 transition-colors",!I&&"cursor-pointer"),children:[u.jsx("div",{className:"size-5",children:u.jsx(_r,{src:`/svg/chains/${_.id}.svg`,className:xi("h-auto w-full transition-opacity",!S&&"opacity-20"),"aria-hidden":"true"})}),u.jsx("span",{className:xi("text-sm font-semibold transition-opacity group-hover:opacity-80",!S&&"text-accent-40"),children:_.name})]}),u.jsx("div",{className:"py-4",children:u.jsx($ae,{checked:S,onChange:()=>h(_.id),className:xi("group block size-5 rounded p-1 ring-1 ring-inset ring-accent-30 data-[checked]:bg-primary data-[checked]:ring-primary",I&&"hidden"),"data-test-id":`favorite-chains-checkbox-${_.id}`,disabled:I,children:u.jsx(u0,{className:"hidden size-3 text-white group-data-[checked]:block"})})})]},_.id)}):u.jsx("div",{className:"flex max-w-full flex-1 items-center justify-center break-all p-8 text-center",children:u.jsxs("p",{className:"text-sm text-accent-50",children:["No results for",u.jsx("br",{}),' "',t,'"']})})})})})]}),(c||a)&&u.jsxs("div",{className:"flex flex-col gap-3 pt-4",children:[c&&u.jsx("div",{className:"col-span-2 rounded-lg bg-amber/10 p-4 text-center",children:u.jsx("p",{className:"text-balance text-xs text-amber",children:"Excluded chains will not be available in the app until they are enabled."})}),a&&u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(wn,{size:"lg",color:"secondary",onClick:y,children:"Reset"}),u.jsx(wn,{size:"lg",onClick:g,disabled:s.length===0,"data-test-id":"favorite-chains-save-changes",children:"Save changes"})]})]})]})}function rk(){return u.jsx("div",{className:"m-auto h-2 w-full animate-loop rounded bg-gradient-to-r from-background via-accent-30 to-background bg-2x"})}function The({title:e,body:t,children:n,icon:r,className:i=""}){return u.jsxs("div",{className:It("flex flex-col items-center gap-8 bg-accent-10",i),children:[u.jsx("div",{className:"rounded-full bg-accent-20 px-7 py-3",children:r}),u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"mb-2 text-lg font-semibold text-accent-50",children:e}),u.jsx("div",{className:"text-xs text-accent-50",children:t})]}),n]})}function XF({onClick:e,disabled:t=!1,children:n,className:r="",useButton:i=!1,hideLoader:s=!1,color:o="secondary",...a}){const c=y=>{y.preventDefault(),t||e?.(y)},d=i?wn:"a",h=i?r||"no-underline":r;return u.jsx(d,{href:"",onClick:c,color:o,...a,className:h||(t?"flex items-center gap-3 text-accent-40":"text-primary underline-offset-2 hover:underline"),children:u.jsxs("div",{className:"flex items-center gap-2",children:[t&&!s&&u.jsx(Pv,{size:"xs"}),n]})})}function hT({chainId:e,txid:t="",className:n="",children:r}){const{chain:i}=Rr(),o=(i?.blockExplorers||Pt.blockExplorers).default,a=BO.includes(e)?"receipt":"tx",c=`${o.url}/${a}/${t}`;return!t||!o?u.jsx("span",{className:n,children:r}):u.jsxs("a",{href:c,className:n,target:"_blank",rel:"noreferrer",children:[r," ",u.jsx(T3,{size:12,className:"inline"})]})}const Ahe=en.debounce(e=>e(),100);function QF(e,t,n=!0){const r=vd(t)==="MSIG",i=A.useRef(!1);A.useEffect(()=>{n&&!i.current&&e.canWrite&&!r&&(i.current=!0,Ahe(e.write))},[e,n])}const khe=["0x098b716b8aaf21512996dc57eb0615e2383e2f96","0xa0e1c89ef1a489c9c7de96311ed5ce5d32c20e4b","0x3cffd56b47b7b41c56258d9c7731abadc360e073","0x53b6936513e738f44fb50d2b9476730c0ab3bfc1","0x35fb6f6db4fb05e6a4ce86f2c93691425626d4b1","0xf7b31119c2682c88d88d455dbb9d5932c65cf1be","0
77x3e37627deaa754090fbfbb8bd226c1ce66d255e9","0x08723392ed15743cc38513c4925f5e6be5c17243","0x7f367cc41522ce07553e823bf3be79a889debe1b","0xd882cfc20f52f2599d84b8e8d58c7fb62cfe344b","0x901bb9583b24d97e995513c6778dc6888ab6870e","0xa7e5d5a720f06526557c513402f2e6b5fa20b008","0x8576acc5c05d6ce88f4e49bf65bdf0c62f91353c","0x1da5821544e25c636c1417ba96ade4cf6d2f9b5a","0x7db418b5d567a4e0e8c59ad71be1fce48f3e6107","0x72a5843cc08275c8171e582972aa4fda8c397b2a","0x7f19720a857f834887fc9a7bc0a0fbe7fc7f8102","0x9f4cda013e354b8fc285bf4b9a60460cee7f7ea9","0x3cbded43efdaf0fc77b9c55f6fc9988fcc9b757d","0x2f389ce8bd8ff92de3402ffce4691d17fc4f6535","0x19aa5fe80d33a56d56c78e82ea5e50e5d80b4dff","0xe7aa314c77f4233c18c6cc84384a9247c0cf367b","0x308ed4b7b49797e1a98d3818bff6fe5385410370","0x67d40ee1a85bf4a4bb7ffae16de985e8427b6b45","0x6f1ca141a28907f78ebaa64fb83a9088b02a8352","0x48549a34ae37b12f6a30566245176994e17c6b4a","0x5512d943ed1f7c8a43f3435c85f7ab68b30121b0","0xc455f7fd3e0e12afd51fba5c106909934d8a0e4a","0xfec8a60023265364d066a1212fde3930f6ae8da7","0x7ff9cfad3877f21d41da833e2f775db0569ee3d9","0x8dce2aac0de82bdcaf6b4373b79f94331b8e4995","0xf4377eda661e04b6dda78969796ed31658d602d4","0xb338962b92cd818d6aef0a32a9ecd01212a71f33","0x57ec89a0c056163a0314e413320f9b3abe761259","0xd8500c631dc32fa18645b7436344a99e4825e10e","0x7ced75026204ac29c34bea98905d4c949f27361e","0xc2a3829f459b3edd87791c74cd45402ba0a20be3","0x3ad9db589d201a710ed237c829c7860ba86510fc","0x83e5bc4ffa856bb84bb88581f5dd62a433a25e0d","0x08b2efdcdb8822efe5ad0eae55517cf5dc544251","0x04dba1194ee10112fe6c3207c0687def0e78bacf","0x0ee5067b06776a89ccc7dc8ee369984ad7db5e06","0x502371699497d08d5339c870851898d6d72521dd","0x5a14e72060c11313e38738009254a90968f58f51","0xefe301d259f525ca1ba74a7977b80d5b060b3cca","0xd0975b32cea532eadddfc9c60481976e39db3472","0x1967d8af5bd86a497fb3dd7899a020e47560daaf","0x39d908dac893cbcb53cc86e0ecc369aa4def1a29","0x4f47bc496083c727c5fbe3ce9cdf2b0f6496270c","0xd04e33461fea8302c5e1e13895b60cee8aefda7f","0x76ea76ca4eb727f18956ab93445a94c5280412b9","0xfb3eff152ea55d1bfa04dbdd509a80fd7b72cdeb","0xfda1ec4a6178d4916b001a065422d31ebe5f62ff","0x747afb5c7a7fc34b547cd0fdebf9b91759c5a52b","0x38735f03b30fbc022ddd06abed01f0ca823c6a94","0x97b1043abd9e6fc31681635166d430a458d14f9c","0xb6f5ec1a0a9cd1526536d3f0426c429529471f40","0xe1d865c3d669dcc8c57c8d023140cb204e672ee4","0x9c2bc757b66f24d60f016b6237f8cdd414a879fa","0xdcbeffbecce100cce9e4b153c4e15cb885643193","0x5f48c2a71b2cc96e3f0ccae4e39318ff0dc375b2","0x5a7a51bfb49f190e5a6060a5bc6052ac14a3b59f","0xed6e0a7e4ac94d976eebfb82ccf777a3c6bad921","0x797d7ae72ebddcdea2a346c1834e04d1f8df102b","0x931546d9e66836abf687d2bc64b30407bac8c568","0x43fa21d92141ba9db43052492e0deee5aa5f0a93","0x6be0ae71e6c41f2f9d0d1a3b8d0f75e6f6a0b46e","0x530a64c0ce595026a4a556b703644228179e2d57","0x983a81ca6fb1e441266d2fbcb7d8e530ac2e05a2","0x961c5be54a2ffc17cf4cb021d863c42dacd47fc1","0xfac583c0cf07ea434052c49115a4682172ab6b4f","0xe950dc316b836e4eefb8308bf32bf7c72a1358ff","0x21b8d56bda776bbe68655a16895afd96f5534fed","0x175d44451403edf28469df03a9280c1197adb92c","0xf3701f445b6bdafedbca97d1e477357839e4120d","0x19f8f2b0915daa12a3f5c9cf01df9e24d53794f7","0x0931ca4d13bb4ba75d9b7132ab690265d749a5e7","0x1999ef52700c34de7ec2b68a28aafb37db0c5ade","0xd5ed34b52ac4ab84d8fa8a231a3218bbf01ed510","0x12de548f79a50d2bd05481c8515c1ef5183666a9","0xdb2720ebad55399117ddb4c4a4afd9a4ccada8fe","0xe3d35f68383732649669aa990832e017340dbca5","0x532b77b33a040587e9fd1800088225f99b8b0e8a","0x5d5b5dafecbf31bdb08bfd3edad4f2694372d0ef","0xc103b7dc095c904b92081eef0c1640081ec01c10","0xe1e4c5e5ed8f03ae61b581e2def126025f2b9401","0xb637f84b66876ebf609c2a4208905f9ddac9d075","0x95584c303fcd48af5c6b9873015f2ad0ca84eae3","0xcb74874f1e06fcf80a306e06e5379a44b488ba2d","0x0330070fd38ec3bb94f58fa55d40368271e9e54a","0x9be599d7867f5e1a2d7ec6db9710df2b98a15573","0x038989cbb1710c72b9920dc4fa529158f463e72c","0x14779cec0b117d5194c750c55ea1f42086631964","0x32da24ca413f3e7b53145d4737e172c3bdf81e3e","0xf2235d55b2950a0b1317469d72d07ae65b2e27cb","0x4f428c11dc82388fa5136d636e613ad923eb700b","0xac4cc4b68ea24bbfaac8fd127b67ed445accce22","0x1b8579cf6ab12ea6b74ac5fa41f3829a3cb61e6e","0x1cab8177ace78b1b6b1c393371f4f2dcae40cbeb","0x1d19b52b54e7ef5ea1a4b40b616165e798eac9f8","0x252a8bd2319d8a555b872990601221b3a2053bce","0x2711d73d559f62f4f855ee21f38378f528e07985","0x2c7dcd774b33e10367f7d6385479e04f97d179dc","0x4060cbf80734193f521a3cc6fd4e985df2825279","0x56de1527136f76a809e5b14ded6103eecd072ba7","0x6b0736fed0634e15e19cc57fba19cd179c13abc
77a","0x6b69e2a7545c166417a80c61a77562052bffa9c5","0x6fac4d18c912343bf86fa7049364dd4e424ab9c0","0x7f03679b56d8772530efa516b58bb83d4829e881","0x8694ed130432be2cd3efff2e4d9dc52351dc7423","0x8ac5381fcd9e7395d14e02986c344aada84b4bc6","0x8d79c73daae8630c88de372ba8f57592fa987607","0x9697749a9e8d6c119d8eeb0d6268a1b99c40684c","0x9dd7fa4b4950154f7e75bdd8a77266b99b94ec08","0xa40cfbfc8534ffc84e20a7d8bbc3729b26a35f6f","0xb5a69da691670f62510793f79a9b36c7db1a7b7c","0xbb69e01921b17cd22080968bcc96ba6115da6062","0xbd3276f265b83b5e828c05f46cde9d10a1521a24","0xd81414abc631c6cadae1c6198b0c2b15a9b4fde5","0xe05f529f5284d75624eba386cb716928c3b54a2a","0xeb507efa9ee692a4c774ad1de9f3cb26fc459da3","0xef85a6fafa5942a964dc618e94e230881d29ce2a","0xf1c4c44d2dcbcfa704349e3b57628dbd8404e597","0xf45ecc3a59c7911181c659ce9115854c6175be91"],Che=new Set(khe);function JF(){const{address:e}=Fo();return{isBlocked:!!e&&Che.has(e.toLowerCase())}}const Ihe={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_ALM_PROVIDER:"Runtime Global S.A.",VITE_ALM_TERMS:"https://runtimelabs.xyz/legal-notice",VITE_APP_NAME:"Aerodrome",VITE_APP_NAME_LOWER:"aerodrome",VITE_APP_TOKEN:"0x940181a94a35a4569e4529a3cdfb74e38fd98631",VITE_BANNER:"aero-banner.png",VITE_BASE_BUILDER_CODE:"62635f7239717a66386f700b0080218021802180218021802180218021",VITE_CHAIN_IDS:"8453",VITE_CONNECTOR_TOKENS_10:"0x9560e827af36c94d2ac33a39bce1fe78631088db,0x4200000000000000000000000000000000000042,0x4200000000000000000000000000000000000006,0x9bcef72be871e61ed4fbbc7630889bee758eb81d,0x2e3d870790dc77a83dd1d18184acc7439a53f475,0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9,0x1f32b1c2345538c0c6f582fcb022739c4a194ebb,0xbfd291da8a403daaf7e5e9dc1ec0aceacd4848b9,0xc3864f98f2a61a7caeb95b039d031b4e2f55e0e9,0x9485aca5bbbe1667ad97c7fe7c4531a624c8b1ed,0xda10009cbd5d07dd0cecc66161fc93d7c9000da1,0x73cb180bf0521828d8849bc8cf2b920918e23032,0x6806411765af15bddd26f8f544a34cc40cb9838b,0x6c2f7b6110a37b3b0fbdd811876be368df02e8b0,0xc5b001dc33727f8f26880b184090d3e252470d45,0x6c84a8f1c29108f47a79964b5fe888d4f4d0de40,0xc40f949f8a4e094d1b49a23ea9241d289b7b2819,0x94b008aa00579c1307b0ef2c499ad98a8ce58e58,0x0b2c639c533813f4aa9d7837caf62653d097ff85",VITE_CONNECTOR_TOKENS_8453:"0xfde4c96c8593536e31f229ea8f37b2ada2699bb2,0x833589fcd6edb6e08f4c7c32d4f71b54bda02913,0x940181a94a35a4569e4529a3cdfb74e38fd98631,0x50c5725949a6f0c72e6c4a641f24049a917db0cb,0x4621b7a9c75199271f773ebd9a499dbd165c3191,0x4200000000000000000000000000000000000006,0xb79dd08ea68a908a97220c76d19a6aa9cbde4376,0xcfa3ef56d303ae4faaba0592388f19d7c3399fb4,0xcb327b99ff831bf8223cced12b1338ff3aa322ff,0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22,0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452,0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42,0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca,0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf,0xdd468a1ddc392dcdbef6db6e34e89aa338f9f186,0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b",VITE_CONVERT_SUSDT_TOKENS:"8453:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913=0xe92e51d99ae33114c60d9621fb2e1ec0acea7e30",VITE_CSP_FRAME:"https://verify.walletconnect.org/",VITE_CSP_IMG:"https://raw.githubusercontent.com data: blob:",VITE_CSP_SCRIPT:"",VITE_CSP_STYLE:"",VITE_DEFAULT_SLIPPAGE:"1.0",VITE_DEFAULT_SWAP_MINUTES:"10",VITE_DEFAULT_TOKENS_8453:"0x940181a94a35a4569e4529a3cdfb74e38fd98631,eth",VITE_DEFAULT_TOKEN_ORDER:"WETH,AERO,USDC,cbBTC",VITE_ECOSYSTEM:"Base",VITE_EXPLORER_CHAIN_IDS:"",VITE_EXTERNAL_CHAIN_IDS:"10",VITE_FACTORY_ADDRESS_10:"0xF1046053aa5682b4F9a81b5481394DA16BE5FF5a",VITE_FACTORY_ADDRESS_8453:"0x420DD381b31aEf6683db6B902084cB0FFECe40Da",VITE_FC_META:"miniapp",VITE_FEATURE_FLAGS:"v2,relay,cl,vapr,alm,batched-txs,skip-batch-sim,tx-suffix",VITE_HIGHLIGHTED_POOLS:"",VITE_HL_EXPLORER:"https://explorer.hyperlane.xyz/?search=",VITE_HL_HEALTH_URL:"https://offchain-lookup.services.hyperlane.xyz/health",VITE_HL_RELAYERS:"0x74Cae0ECC47B02Ed9B9D32E000Fd70B9417970C5,0x09B96417602Ed6AC76651F7A8c4860E60e3aA6d0",VITE_HL_RELAY_URL:"https://offchain-lookup.services.hyperlane.xyz/callCommitments/calls",VITE_ICA_ADDRESS_8453:"0x44647Cd983E80558793780f9a0c7C2aa9F384D07",VITE_LABEL:"AERO",VITE_LAUNCHER_LANDING_PAGE_TOKENS:"VIRTUAL,KTA,AERO,cbBTC,cbXRP,cbDOGE,cbADA,cbLTC,GIZA,MAMO",VITE_LAUNCH_TOKENS:"",VITE_LOCKER_IMPL_ADDRESS:"0xfe678BFfC3C1c8D1De4478CC5C3e1b93EE4638aE",VITE_LP_SUGAR_ADDRESS_10:"0x347512180804A8B40AA7525AE932a31198F074aA",VITE_LP_SUGAR_ADDRESS_8453:"0x69dD9db6d8f8E7d83887A704f447b1a584b599A1",VITE_MAX_RESERVE_DEVIATION:"1000000000000000",VITE_MESSAGE_BRIDGE_ADDRESS:"0xF278761576f45472bdD721EACA19317cE159c011",VITE_MESSAGE_MODULE_ADDRESS:"0x2BbA7515F7cF114B45186274981888D8C2fBA15E",VITE_MIGRATOR_ADDRESS_8453:"0x4Ab4313D12D3c17Dd172dCd9453105EB3d775f42",VITE_MINTER_ADDRESS_10:"0x6dc9E1C04eE59ed3531d73a72256C0da46D10982",VITE_MINTER_ADDRESS_8453:"0xeB018363F0a9Af8f91F06FEe6613a751b2A33FE5",VITE_NATIVE_TOKEN_
77LOGO:"/tokens/ETH.svg",VITE_NFPM_ADDRESS_10:"0xf7f8ccce99Ca2896eC75D3A399D152dB96808399",VITE_NFPM_ADDRESS_8453:"0xe1f8cd9AC4e4A65F54f38a5CdAfCA44f6dD68b53",VITE_OLD_SLIPSTREAM_FACTORY_ADDRESS_10:"0xCc0bDDB707055e04e497aB22a59c2aF4391cd12F",VITE_OLD_SLIPSTREAM_FACTORY_ADDRESS_8453:"0x5e7BB104d84c7CB9B682AaC2F3d509f5F406809A",VITE_OPEN_USDT_TOKEN:"0x1217bfe6c773eec6cc4a38b5dc45b92292b6e189",VITE_OP_TOKEN:"0x4200000000000000000000000000000000000042",VITE_POOL_LAUNCHER_CL_ADDRESS:"0x3C890c7454C17410E49E035F6C4755c4E2012b4b",VITE_POOL_LAUNCHER_V2_ADDRESS:"0xA81eEbdEb3129bf5B89AEd89EDe9eC5fB6FDE3B3",VITE_POOL_PLACEHOLDER_TYPES:"-1,0,1,10,50,80,100,150,200,500,2000",VITE_PRICES_ADDRESS_10:"0x58238e3d556226defE35d3056335f48938707324",VITE_PRICES_ADDRESS_8453:"0xfbC91Fc9C6E70Afbea84b69FB0bF5EBa7F90aaFd",VITE_PRICE_MAPS:"10:0x4200000000000000000000000000000000000042=0xafcc6ae807187a31e84138f3860d4ce27973e01b,10:0x4200000000000000000000000000000000000042=0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca",VITE_PRICE_THRESHOLD_FILTER:"10",VITE_QUOTER_ADDRESS_10:"0xAf6EBdf4c70061C5961994Ae9c9956fBc2bCC32E",VITE_QUOTER_ADDRESS_8453:"0xCd2A7D98e82D6107eac1828ce8DeAA6acB65b555",VITE_QUOTER_STABLE_POOL_FILLER:"2097152",VITE_QUOTER_VOLATILE_POOL_FILLER:"4194304",VITE_RELAYS_HIDE_IDS:"9605,10296",VITE_RELAYS_PINNED_IDS:"10298",VITE_RELAY_SUGAR_ADDRESS_10:"0x5197Eb73253EF90E2089ad7308E572Ea6898c8D7",VITE_RELAY_SUGAR_ADDRESS_8453:"0x3dd0849D66DBd63D06f11442502e200601c50790",VITE_REWARDS_SUGAR_ADDRESS_10:"0x62CCFB2496f49A80B0184AD720379B529E9152fB",VITE_REWARDS_SUGAR_ADDRESS_8453:"0x1b121EfDaF4ABb8785a315C51D29BCE0552A7678",VITE_ROUTER_ADDRESS_10:"0xa062aE8A9c5e11aaA026fc2670B0D65cCc8B2858",VITE_ROUTER_ADDRESS_8453:"0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43",VITE_RPC_URIS_10:"https://lb.drpc.live/optimism/Avibgvi26EjPsw76UtdwmsQOcPkUJIUR8YARurWHF38a:1,https://opt-mainnet.g.alchemy.com/v2/4aBLuZOavL1N3YUWe8c9ylHandj-Ez4f:0",VITE_RPC_URIS_8453:"https://lb.drpc.live/base/Avibgvi26EjPsw76UtdwmsQOcPkUJIUR8YARurWHF38a:1,https://base-mainnet.g.alchemy.com/v2/NueAMkvMI625bpEhxN6_-:0",VITE_SAFE_PI:"3.0",VITE_SLIPSTREAM_FACTORY_ADDRESS_10:"0xe13Dd1fbA721Aa81a1826D9523AC9BC7d260c879",VITE_SLIPSTREAM_FACTORY_ADDRESS_8453:"0xf8f2eB4940CFE7d13603DDDD87f123820Fc061Ef",VITE_SLIPSTREAM_SUGAR_ADDRESS_10:"0xD45624bf2CB9f65ecbdF3067d21992b099b56202",VITE_SLIPSTREAM_SUGAR_ADDRESS_8453:"0x9c62ab10577fB3C20A22E231b7703Ed6D456CC7a",VITE_SOLANA_RPC_URL:"https://lb.drpc.live/solana/Avibgvi26EjPsw76UtdwmsQ-HuQB0FUR8K6aOmy9-kY5",VITE_STABLE_TOKEN_10:"0x7f5c764cbc14f9669b88837ca1490cca17c31607",VITE_STABLE_TOKEN_8453:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",VITE_STOCK_POOLS:"8453:0x853F5f1B92b16714Fe6CDA67CAad0856B83C7ab9,8453:0xA3b1E3f9747065e2073722Ff4c9027d3eA4994F0,8453:0xB1987CAD1682841b4b641d50E520777eC5Ab5542,8453:0xEAF57753BC382E0324a1D43F72E7027705a2273E,8453:0xe942B86f5c6d4a780fd673317Ee7E565d25aB7F3,8453:0x20E5fAd2661Ee9Eb0c04824524030AF31943B62D,8453:0x25F63549b2Bb9ffF114cDc39e8cfb16B450E2f9b,8453:0xD5B83c33A8711e727C0Abb6f72ee508755D37e10,8453:0xd03Bc8C7F2FAedCe2aac81bF0444AEA08Ea06E9b,8453:0x7103eB3c9590d1281f7dc03b2A9EE27C39dF5D54,8453:0x8b27f626ab668197000BC722A1012022CAeD10E2,8453:0x5A8236f575471e7BfCA2C8462a200c28f737246E,8453:0x0bf58fe0FAc935Ac69595c19B12Ba0d75E3F8c0E,8453:0x469337fDcc5E8f38e2E4B670B04F57865D13a7BB",VITE_STOCK_TOKENS:"8453:0xb20000000000000000000078ee7ce2fE4908108C,8453:0xb2000000000000000000008bC8786B856E61707C,8453:0xb200000000000000000000C2e324d24d7eEcd1fb,8453:0xb2000000000000000000002D0BA3164cc74f58B7,8453:0xCEF8Db49E456f872E288E1C042F916E9ceD7c781",VITE_TOKEN_ASSETS_CDN:"https://raw.githubusercontent.com/SmolDapp/tokenAssets/main/tokens",VITE_TOKEN_SYMBOL_0x102d758f688a4c1c5a80b116bd945d4455460282:"USDT0",VITE_TOKEN_SYMBOL_0x7f5c764cbc14f9669b88837ca1490cca17c31607:"USDC.e",VITE_TOKEN_SYMBOL_0xa1a0b2e02b0e6830ad5a4a7211691200945d8919:"TEA",VITE_TOKEN_SYMBOL_0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca:"OP",VITE_TOKEN_SYMBOL_0xafcc6ae807187a31e84138f3860d4ce27973e01b:"OP",VITE_TOKEN_SYMBOL_0xbce0af241a9c06778968ce1d3782c61d9a9c7c32:"METEORA",VITE_TOKEN_SYMBOL_0xde5ed76e7c05ec5e4572cfc88d1acea165109e44:"DEUS FINANCE",VITE_TOLERATED_SERVER_TIMESTAMP_DIFFERENCE:"30",VITE_TWITTER_HANDLE:"@aeroxyz",VITE_UNCLAIMABLE_TOKENS:"",VITE_UNIVERSAL_ROUTER_ADDRESS_10:"0xcAF22ce31298CF2BF1D152862F80216478ad7c67",VITE_UNIVERSAL_ROUTER_ADDRESS_8453:"0xcAF22ce31298CF2BF1D152862F80216478ad7c67",VITE_UNSAFE_PI:"3.0",VITE_UNSAFE_TOKENS_8453:"0x74ccbe53f77b08632ce0cb91d3a545bf6b8e0979,0x8901cb2e82cc95c01e42206f8d1f417fe53e7af0,0x9cbd543f1b1166b2df36b68eb6bb1dce24e6abdf,0x025f99977db78317a4eba606998258b502bb256f,0xd260115030b9fb6849da169a01ed80b6496d1e99,0
77x608d5401d377228e465ba6113517dcf9bd1f95ca,0xd260115030b9fb6849da169a01ed80b6496d1e99,0x728cda34d732a87fd6429129e23d4742d9ff0064,0x728cda34d732a87fd6429129e23d4742d9ff0064,0xac1bd2486aaf3b5c0fc3fd868558b082a531b2b4,0x0f929c29dce303f96b1d4104505f2e60ee795cac,0x47e78d664e6c339693e8638b7a7d9543abcc99d4,0xff0c532fdb8cd566ae169c1cb157ff2bdc83e105,0x373504da48418c67e6fcd071f33cb0b3b47613c7,0x0f929c29dce303f96b1d4104505f2e60ee795cac,0x628c5ba9b775dacecd14e237130c537f497d1cc7",VITE_USDT_BRIDGE_ADDRESS_8453:"0x4F0654395d621De4d1101c0F98C1Dba73ca0a61f",VITE_VE_ADDRESS_10:"0xFAf8FD17D9840595845582fCB047DF13f006787d",VITE_VE_ADDRESS_8453:"0xeBf418Fe2512e7E6bd9b87a8F0f294aCDC67e6B4",VITE_VE_SUGAR_ADDRESS_10:"0x94f913362b232e31daB49a1aFB775cfd25DaA6a1",VITE_VE_SUGAR_ADDRESS_8453:"0x4c5d3925fe65DFeB5A079485136e4De09cb664A5",VITE_VOTER_ADDRESS_10:"0x41C914ee0c7E1A5edCD0295623e6dC557B5aBf3C",VITE_VOTER_ADDRESS_8453:"0x16613524e02ad97eDfeF371bC883F2F5d6C480A5",VITE_WALLETCONNECT_PROJECT_ID:"a1ea2a919a3465f5a79109a93fa032fb",VITE_WRAPPED_NATIVE_TOKEN_10:"0x4200000000000000000000000000000000000006",VITE_WRAPPED_NATIVE_TOKEN_8453:"0x4200000000000000000000000000000000000006",VITE_XOP_BRIDGE:"0xac6A6080E002D2803959242C0FE10050C482D214",VITE_XOP_BRIDGE_V2:"0xfFCA1231d43Cf55B58d62627fD171ab1293C3050",VITE_XOP_TOKEN:"0xafcc6ae807187a31e84138f3860d4ce27973e01b",VITE_XOP_TOKEN_V2:"0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca"},Rhe=new RegExp(Ihe[`VITE_RPC_URIS_${ma[0]}`].split(",").map(e=>e.slice(0,e.lastIndexOf(":"))).flatMap(e=>{const t=e.match(/&dkey=([^&]+)/);return t||[e.slice(e.lastIndexOf("/")+1)]}).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g");function pT(e){return e=e.replace(Rhe,""),e.includes("ContractFunctionExecutionError:")&&(e=`ContractFunctionExecutionError: 
78
79Arguments:`+e.substring(e.indexOf("Contract Call")+14,e.indexOf("Docs:"))+`
80`+e.substring(e.indexOf("Raw Call Arguments"),e.indexOf("Contract Call:"))),e}function Gg(e){const t=[];return e&&t.push(e.toString()),e instanceof Error&&(t.push(e.message),e.stack&&t.push(e.stack)),t.join("-")}async function eD(e){const{chainId:t}=v3(Fc);let n=e===t;if(!n)try{(await xte(Fc,{chainId:e})).id===e&&(n=!0)}catch(r){return toast.error(r),!1}return!0}function Mhe({calls:e,query:t,chainId:n}){const r=vd(n)==="EOA",{isBlocked:i}=JF(),{address:s}=Rr(),{atomicNeedsUpgrade:o}=Zp(n),a=!!e?.length&&t?.enabled!==!1&&!i,c=A.useMemo(()=>Gp(e)+"",[e]),d=A.useMemo(()=>a?e?.map((Q,ee)=>({to:Q.address,data:ee===e.length-1?Ms(Q)+HL(n).slice(2):Ms(Q),value:Q.value})):[],[a,e,n]),{error:h,refetch:y,isSuccess:g,isPending:x}=Kr({queryKey:["simulateBatch",c],queryFn:()=>HX(hte(Fc),{traceAssetChanges:!1,traceTransfers:!1,account:s,calls:d}).then(Q=>{for(let ee=0;ee<Q.results.length;ee++){const ne=Q.results[ee];if(ne.status==="failure")throw ne.error}return Q}),...t,retry:!1,enabled:a&&!o}),{sendCallsAsync:_,error:S,isPending:I,reset:L}=Kne();A.useEffect(()=>{L(),a&&y()},[c]),A.useEffect(()=>{h&&(dr("BTCH-SIM",Gg(h)),console.warn(h))},[h]);const[D,F]=A.useState(),$=A.useCallback(async()=>{const Q=n??v3(Fc).chainId;if(!await eD(Q))throw"Invalid chain";const{id:ee}=await _({forceAtomic:!0,chainId:Q,calls:d});F(ee)},[e,n,s,F]),{data:z,isPending:V}=Xne({id:D,query:{enabled:!!D}}),K=D?V:I,te=hd.includes("skip-batch-sim")||!x&&g||o;return{write:$,canWrite:(!r||o)&&!K&&te&&a,simError:h,error:S,isPending:K,isSimPending:x,isSuccess:z?.statusCode===200,hash:z?.receipts?.at(-1)?.transactionHash}}const Nhe={error:null,simError:null,isPending:!1,isSuccess:!1,write:async()=>{throw"No call(s) provided"},canWrite:!1,hash:void 0};function jhe(e){const t=vd(e.chainId)==="MSIG",{isBlocked:n}=JF(),r=!!e&&e.query?.enabled!==!1&&!n,[i,s]=A.useState(0n),[o,a]=A.useState(0),{data:c,error:d,refetch:h}=Zne(!r||t?void 0:{...e,query:{retry:!1,...e.query}}),y=!!c?.request,g=r&&!y&&o===0,{data:x=0n}=Dne({watch:g});A.useEffect(()=>{d&&x&&!i&&s(x)},[d,x,i]),A.useEffect(()=>{i&&x>i&&o===0&&e.chainId!==O9.id&&(h(),a(K=>K+1))},[x,i,o]);const{writeContractAsync:_,error:S,isPending:I,data:L,reset:D}=Qne();A.useEffect(()=>{D(),r&&h()},[Gp(e)]);const{isPending:F,isSuccess:$}=tA({hash:L});A.useEffect(()=>{d&&(dr("SNG-SIM",Gg(d)),console.warn(d))},[d]);const z=async()=>{const K=e.chainId;if(!await eD(K))throw"Invalid chain";await _({...e,dataSuffix:HL(K,e.functionName)||void 0})},V=L?F:I;return r?{isSuccess:$,isPending:V,error:S,simError:d,write:z,canWrite:V?!1:t||y||location.href.includes("/launch"),hash:L}:Nhe}function tD(e){const t=jhe("calls"in e?{query:{enabled:!1}}:e),n=Mhe("calls"in e?e:{query:{enabled:!1}});return"calls"in e?n:t}function Fr({variant:e="button",write:t,children:n,onPendingStateChange:r,setPendingTxHash:i,onSuccess:s,onError:o,successMessage:a="Transaction confirmed",errorMessage:c="Transaction failed",hideAfterSuccess:d=!1,hideLoader:h=!1,hideToast:y=!1,simulate:g=!0,autoExecute:x=!1,enabled:_=!0,size:S="lg",...I}){const[L,D]=A.useState(t),F=L.chainId,$=tD(L),{hash:z,error:V,simError:K,isPending:te,isSuccess:Q,write:ee,canWrite:ne}=$;A.useEffect(()=>{z&&i?.(z)},[z]),A.useEffect(()=>{te||D(t)},[te,t]);const J=A.useRef(ee);A.useEffect(()=>{J.current=async()=>
80{if(dr("TXB-"+wf(n),"execute"),!L)throw"No transaction";await ee(),dr("TXB-"+wf(n),"signed")}},[L,F,ee]),A.useEffect(()=>{r?.(te)},[te]),A.useEffect(()=>{V?(o?.(V),V.toString().includes("User rejected the request")?(dr("TXB-"+wf(n),"rejected"),toast.custom("Transaction rejected")):(dr("TXB-"+wf(n),pT(Gg(V))),toast.error(u.jsx(hT,{chainId:F,txid:z,children:pT(c)})))):Q&&(dr("TXB-"+wf(n),"confirmed"),y||toast.success(u.jsx(hT,{chainId:F,txid:z,children:a})),s&&s(z))},[V,Q,y]),A.useEffect(()=>{K&&dr("TXB-"+wf(n),K.message.split("Contract Call")[0])},[K]);const M=g&&!ne||!_;return QF({...$,write:J.current},F,x&&!M),d&&Q?null:e==="button"?u.jsx(wn,{...I,disabled:M,pending:te&&!h,onClick:()=>J.current(),size:S,children:n}):u.jsx(XF,{className:I.className,useButton:e==="action-link-use-button",disabled:M,onClick:()=>J.current(),hideLoader:h,children:u.jsx("span",{className:"text-xs",children:n})})}function Xp(e,t){const{address:n,functionName:r,args:i=[],chainId:s}=e,o=["useReadContract",s,n,r,i.join(","),t.scope??""];return{...Kr({queryKey:o,queryFn:()=>zp(e),enabled:!!n&&n!==Pn&&(t?.enabled??!0),gcTime:Wr,staleTime:Wr}),queryKey:o}}function Kg(e,t){const{contracts:n,noErrors:r=!0}=e,i=["useReadContracts",Gp(n),r];return{...Kr({queryKey:i,queryFn:()=>pd(n,{noErrors:r}),enabled:n.length>0&&(t?.enabled??!0),gcTime:Wr,staleTime:Wr}),queryKey:i}}function nD({chainId:e,callback:t,overrideInterval:n}){const r=t6.find(c=>c.id===e)?.blockTime,{data:i}=Bne({chainId:e}),[s,o]=A.useState(!1),a=A.useRef(t);A.useEffect(()=>{a.current=t},[t]),A.useEffect(()=>{const c=t6.find(h=>h.id===e)?.blockTime,d=i?.timestamp;if(c&&d&&!s){const h=c-(Date.now()-Number(d)*1e3);setTimeout(()=>{t(),o(!0)},h)}},[i,s]),A.useEffect(()=>{function c(){a.current()}const d=n??r;if(d&&s){const h=setInterval(c,d);return()=>clearInterval(h)}},[r,s,n])}function rD(e={},t,n,r){const{address:i}=Rr(),[s,o]=A.useState(),{chain:a}=Zn(e?.chainId),c=L9(a,e),d=r.enabled&&!c&&!!t&&t!=Pn&&!!i,{data:h,refetch:y,isLoading:g,queryKey:x}=Xp({scopeKey:n,address:e.wrappedAddress||e.address,abi:rg,functionName:"allowance",args:[i,t],chainId:e.chainId},{enabled:d}),_=lh(),S=A.useCallback(()=>{document.visibilityState!=="visible"||!document.hasFocus()||_.isFetching({queryKey:x})||_.invalidateQueries({queryKey:x})},[c,x]);nD({chainId:e.chainId,callback:S,overrideInterval:r.fetchInterval});const I=A.useCallback(()=>{d&&y()},[d,y]);return{isNative:c,allowance:h,isLoading:g,refetchAllowance:I,approvalTxHash:s,setApprovalTxHash:o}}function ad(e,{holder:t,fetchInterval:n,backgroundFetch:r=!1,scope:i,enabled:s=!0}){const{address:o}=Rr(),a=lh(),{chain:c}=Zn(e?.chainId),d=L9(c,e),h=t??o,{data:y,isLoading:g,queryKey:x}=eA({address:h,chainId:e.chainId,query:{enabled:s&&d&&!!h&&h!==Pn}}),{data:_,queryKey:S,isLoading:I}=Xp({address:e.address,chainId:e.chainId,abi:rg,functionName:"balanceOf",args:[h]},{enabled:s&&!d&&!!h&&h!==Pn,scope:i}),L=A.useCallback(()=>{if((document.visibilityState!=="visible"||!document.hasFocus())&&!r)return;const $=d?x:S;a.isFetching({queryKey:$})||a.invalidateQueries({queryKey:$})},[d,x,S]);return nD({chainId:e.chainId,callback:L,overrideInterval:n}),{balance:A.useMemo(()=>{const F=d?y?.value:_;if(F!==void 0)return{value:F}},[d,y,_]),isLoading:d?g:I}}const Phe=Pt.id,mR={address:Pt.superchainConfig.nativeWrapped,chainId:Phe};function iD(e){const{balance:t,isLoading:n}=ad(mR,{fetchInterval:5e3}),{allowance:r,isLoading:i}=rD(mR,kO,void 0,{enabled:!0}),s=t?.value??0n,o=r??0n;return n||i?[]:[s>=e&&o>=e,o,s]}const Ohe=Pt.id,S6={address:Pt.superchainConfig.nativeWrapped,chainId:Ohe},Lhe=Cn(["function deposit() external payable"]),mT=(e,t)=>e>t?e:t;function Bhe({balance:e,gas:t}){const n=mT(t,wS)-e;return u.jsx(Fr,{color:"secondary",appearance:"outline",write:{abi:Lhe,chainId:S6.chainId,address:S6.address,functionName:"deposit",value:n},children:u.jsxs("div",{className:"px-6",children:["Wrap ",yv(n).slice(0,6)," ETH"]})})}function Fhe({gas:e}){return u.jsxs(Fr,{color:"secondary",appearance:"outline",write:{abi:rg,chainId:S6.chainId,address:S6.address,functionName:"approve",args:[kO,mT(e,wS)]},children:["Allow ",yv(mT(e,wS))," WETH"]})}function sD({gas:e}){const[t,n,r]=iD(e),[i,s]=A.useMemo(()=>
80n===void 0||r===void 0?[u.jsx("div",{className:"w-64 rounded-2xl bg-accent-0 p-1",children:u.jsx(rk,{})}),!1]:r<e?[u.jsx(Bhe,{balance:r,gas:e}),!1]:n<e?[u.jsx(Fhe,{gas:e}),!1]:[u.jsxs("div",{className:"flex text-xs text-green",children:["WETH Allowed",u.jsx(A3,{className:"ml-2 size-3 text-green"})]}),!0],[n,r]);return u.jsx("div",{className:"rounded-xl bg-accent-10 p-12",children:u.jsx(The,{title:"Superchain Gas Allowance",body:u.jsxs("div",{className:"space-y-4",children:[u.jsxs("p",{className:"max-w-96",children:["Superchain ",u.jsx("strong",{children:"actions like voting and claiming"})," of the voting rewards require a small fee to cover the transactions cost. This requires having and allowing a small amount of"," ",u.jsx("strong",{children:"wrapped Ethereum (WETH)"})," on OP to be used by the messaging bridge smart contract."]}),u.jsx("p",{className:"max-w-96 text-accent-40",children:"Note: You will see this dialog again if the allowance was consumed or the WETH balance is too low. This message and the allowance to use WETH will show up when you need to top up."})]}),icon:u.jsx(Ore,{className:`size-4 ${s?"text-green":"text-amber"}`}),children:i})})}const Dhe=Cn(["function setRecipient(uint, address) external"]);function $he({chainId:e,recipient:t,onSuccess:n,onError:r,disabled:i}){return u.jsx(Fr,{color:"secondary",size:"sm",write:{chainId:Pt.id,address:z9,abi:Dhe,functionName:"setRecipient",args:[BigInt(e),t],query:{enabled:!i&&Sr(t,{strict:!1})}},successMessage:"New recipient set!",onSuccess:n,onError:r,hideLoader:!0,children:"Save"})}function p3e(e){return e}const oD=(e={})=>{const{address:t}=Rr();return Kr({queryKey:["fetchCrossChainRecipients",t],queryFn:()=>zhe(t),...e,enabled:!!t&&(e.enabled??!0),gcTime:Wr,staleTime:Wr})},Uhe=Cn(["function recipient(address, uint) view returns (address)"]);async function zhe(e){const t=Xi.filter(r=>r.id!==Pt.id);return(await pd(t.map(r=>({chainId:Pt.id,address:z9,abi:Uhe,functionName:"recipient",args:[e,BigInt(r.id)]})),{noErrors:!0})).map((r,i)=>({chainId:t[i].id,recipient:r===Pn?void 0:r}))}function Vhe(){const[e,t]=A.useState({}),[n,r]=A.useState({}),i=A.useCallback((c,d)=>{r(h=>{const y=Object.assign({},h,{[d]:c});return delete y[d],y}),t(h=>Object.assign({},h,{[d]:c}))},[t,r]),s=A.useCallback((c,d)=>{r(h=>Object.assign({},h,{[d]:c}))},[r]),{data:o=[],refetch:a}=oD();return u.jsxs("div",{className:"space-y-8",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("h2",{className:"text-sm font-semibold text-accent-50",children:"Rewards Recipients"}),u.jsx("p",{className:"text-xs text-accent-50",children:"You are using a smart wallet or a multisig like Gnosis Safe. When using such a wallet/multisig, we need to know which address will receive the rewards if these are coming from different chains. In this screen you can provide the rewards recipient address for the chains you're voting. When claiming the rewards next time, these will arrive at the addresses you have provided for each chain."})]}),o.length===0&&u.jsx(rk,{}),u.jsx("div",{className:"flex flex-col gap-3",children:o.map(({recipient:c,chainId:d})=>{let h=u.jsx(lI,{size:13,className:"text-green"});return n[d]==="success"?h=u.jsx(lI,{size:13,className:"text-green"}):n[d]==="error"&&(h=u.jsx(jre,{size:13,className:"text-red"})),u.jsxs("div",{className:"flex gap-3",children:[u.jsx(gh,{icon:u.jsx("img",{src:`/svg/chains/${d}.svg`,className:"size-4 rounded"}),endIcon:u.jsx("div",{className:"p-3 pl-0",children:h}),iconClassName:"flex pr-3 h-full items-center border-r border-accent-20",placeholder:"0x",value:e[d]??c??"",onChange:y=>i(y.target.value,d),className:"w-full rounded-full"}),u.jsx($he,{onError:()=>s("error",d),onSuccess:()=>{a(),s("success",d)},chainId:d,recipient:e[d],disabled:!!n[d]})]},d)})})]})}function qhe(){const{data:e,chain:t,dataUpdatedAt:n}=phe(),[r,i]=A.useState(!1);if(typeof e>"u")return null;const s=Math.abs(Number(e)-Math.floor(n/1e3));return s<_J?null:u.jsxs(u.Fragment,{children:[u.jsx(mh,{isOpen:r,onClose:()=>i(!1),title:"Alert: Blockchain RPC",children:u.jsxs("div",{className:"flex flex-col gap-4 text-sm",children:[u.jsx("div",{className:"font-semibold",children:"The blockchain RP
80C block time does not match your system time"}),u.jsxs("div",{className:"text-accent-50",children:["There's a ",u.jsx("strong",{children:s})," seconds difference between the time from the ",t.name," RPC and the system time. This could lead to transaction failures and other issues. We suggest replacing the current RPC, which you can do in the settings menu, or update your system time using an NTP server."]})]})}),u.jsx("button",{onClick:()=>i(!0),className:"rounded-full bg-amber/10 p-2 transition hover:opacity-80",children:u.jsx(aA,{className:"size-4 text-amber",strokeWidth:1.5})})]})}const yR=300;function Hhe(){const[e,t]=yh("router-deadline",{defaultValue:Mg.toString()});return u.jsxs("div",{className:"space-y-5 text-sm",children:[u.jsxs("div",{className:"flex items-center justify-between font-semibold",children:["Transaction execution deadline",u.jsxs("div",{className:"text-primary",children:[e," ",Number(e)>1?"minutes":"minute"]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("input",{value:e,onChange:n=>t(n.target.value),type:"range",min:"1",max:yR,step:"1",className:"h-2 w-full cursor-pointer appearance-none rounded-full bg-accent-20"}),u.jsxs("div",{className:"flex justify-between text-xs font-semibold text-accent-40",children:[u.jsx("div",{className:"",children:"1 min"}),u.jsxs("div",{className:"",children:[yR," min"]})]})]})]})}const f5=xi("group","w-full flex items-center gap-14 justify-between px-4 py-3","text-sm whitespace-nowrap hover:bg-accent-5 data-[focus]:bg-accent-5 rounded-lg","transition-colors duration-100"),K8="text-accent-50";Fc.subscribe(e=>e.status,(e,t)=>{e==="connected"&&(t==="connecting"&&dr("WLT","connected"),t==="reconnecting"&&dr("WLT","reconnected")),e==="disconnected"&&t==="connected"&&dr("WLT","disconnected")});function Whe(){const{chain:e}=Zn(Pt.id),{disconnect:t,address:n,isConnected:r}=lE(),i=vd(e.id),s=i==="MSIG";A.useEffect(()=>{i&&dr("WALLET",i)},[i]);const[o,a]=xd(),d=`${e?.blockExplorers?.default?.url}/address/${n}`,h=[{text:"Swap Settings",modalTitle:"Swap Settings",id:"swap-settings",icon:Vre},{text:"Custom RPCs",modalTitle:"Custom RPCs",id:"custom-rpcs",icon:Wre}],y=o.get("settings"),x=h.some(D=>D.id===y)?y:null,_=h.find(D=>D.id===x)?.modalTitle??"",S=D=>{D?a({settings:D},{preserveParams:!0}):(o.delete("settings"),a(Object.fromEntries(o),{preserveParams:!0}))},I=D=>{S(D)},L=({reload:D}={})=>{S(null),D&&window.location.reload()};return u.jsxs(u.Fragment,{children:[u.jsxs(mh,{isOpen:x!==null,onClose:L,title:_??"",className:x==="swap-settings"?"max-w-md":"",children:[x==="superchain-rewards"&&u.jsx(Vhe,{}),x==="favorite-chains"&&u.jsx(She,{closeModal:()=>L({reload:!0})}),x==="superchain-gas"&&u.jsx(sD,{gas:LO}),x==="custom-rpcs"&&u.jsx(vhe,{}),x==="swap-settings"&&u.jsx("div",{className:"flex flex-col gap-5 sm:gap-8",children:u.jsx(Hhe,{})})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(qhe,{}),u.jsxs(Qde,{children:[u.jsx($F,{className:"rounded-full py-2 pl-4 pr-3 outline-none hover:bg-accent-0 focus-visible:ring","data-test-id":"profile-menu-button",children:u.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:xi("size-2 rounded-full ring-4",r?"bg-green ring-green/20":"bg-amber ring-amber/20")}),r?u.jsx(Wg,{address:n,className:"font-sans"}):u.jsx("span",{children:"Connect"})]}),u.jsx(Fre,{className:"size-6",strokeWidth:1})]})}),u.jsxs(UF,{transition:!0,anchor:"bottom end",className:It("w-auto","flex flex-col gap-2 rounded-xl bg-accent-0 p-2 text-sm shadow-2xl [--anchor-gap:theme(spacing.2)] focus:outline-none","z-50 origin-top-right transition duration-100 ease-out data-[closed]:scale-95 data-[closed]:opacity-0"),children:[u.jsxs(u.Fragment,{children:[u.jsx(tx,{className:"flex min-w-64 flex-col gap-0.5 lg:hidden",children:aD.map(D=>u.jsx(ex,{children:({close:F})=>u.jsx(Bx,{href:D.href,className:f5,onClick:F,children:D.label})},`profile-link-${D.label}`))}),u.jsx(dT,{className:"h-px bg-accent-10 lg:hidden"})]}),r&&u.jsxs(u.Fragment,{children:[u.jsx(tx,{className:"flex flex-col gap-0.5",children:h.map(D=>{const F=D.icon;return!s&&D.id==="superchain-rewards"?null:u.jsx(ex,{children:u.jsxs("button",{type:"button",onClick:()=>I(D.id),className:f5,"data-test-id":`profile-menu-item-${D.id}`,children:[D.text,u.jsx(F,{size:16,strokeWidth:1.5,className:K8})]})},`profile-menu-item-${D.id}`)})}),u.jsx(dT,{className:"h-px bg-accent-10"}),u.jsxs(tx,{className:"flex flex-col gap-0.5",children:[u.jsx(ex,{children:u.jsxs("a",{href:d,target:"_blank",rel:"noreferrer",className:f5,children:[u.jsx("div",{className:"flex items-center gap-3",children:"Block Explorer"}),u.jsx(T3,{size:16,strokeWidth:1.5,className:K8})]})}),!s&&u.jsx(ex,{children:({close:D})=>u.jsxs("button",{type:"button",disabled:s,onClick:()=>{t(),D()}
80,className:f5,children:["Disconnect",u.jsx(Lre,{size:16,strokeWidth:1.5,className:K8})]})})]})]}),!r&&u.jsx(tx,{className:"p-2 text-center lg:max-w-64",children:u.jsxs("div",{className:"flex flex-col items-center gap-6",children:[u.jsxs("div",{className:"hidden flex-col items-center gap-5 pt-4 text-accent-50 lg:flex",children:[u.jsx(BL,{strokeWidth:1.5,size:20}),u.jsx("div",{className:"max-w-prose text-balance text-xs",children:u.jsx("p",{children:"This web app operates 100% onchain and allows self-custodial wallets - connect to get started."})})]}),u.jsx("div",{className:"flex w-full flex-col gap-2",children:u.jsx(qn,{href:"/connect",className:"w-full",size:"lg",useButton:!0,"data-test-id":"profile-menu-connect-link",children:"Connect"})})]})})]})]})]})]})}const aD=[{href:"/dash",label:"Dashboard"},{href:"/swap",label:"Swap"},{href:"/liquidity",label:"Liquidity",includePaths:["/pools"]},{href:"/vote",label:"Vote"},{href:"/locks",label:"Lock",includePaths:["/lock","/relay"]},{href:"/incentivize",label:"Incentivize"}];function Ghe(){const[e]=Jf(),t=A.useRef(null),[n,r]=A.useState(0),[i,s]=A.useState(0);return A.useEffect(()=>{document.body.style.setProperty("--header-height",`${i+n}px`)},[i]),A.useEffect(()=>{const o=en.debounce(()=>{t.current&&(r(t.current.offsetTop),s(t.current.offsetHeight))},25);return o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[]),u.jsx("header",{ref:t,className:"relative z-10 py-4 sm:py-6 md:pb-16",children:u.jsxs("nav",{className:"flex items-stretch justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs(Bx,{href:"/",className:"flex items-center justify-center rounded-lg outline-none focus-visible:ring",children:[u.jsxs("span",{className:"sr-only",children:[ls.appName," Finance"]}),u.jsxs("div",{className:"ml-3 sm:ml-0 sm:mr-8","aria-hidden":!0,children:[u.jsx(_r,{src:`/svg/${oo}/appLogo.svg`,className:"block h-6 sm:hidden"}),u.jsx(_r,{src:`/svg/${oo}/wordmark.svg`,className:"hidden h-8 sm:block"})]})]}),aD.map(o=>{const a=o.href===e||o.includePaths&&o.includePaths.includes(e);return u.jsx(Bx,{href:o.href,className:xi("hidden rounded-full px-3 py-1.5 text-sm text-foreground transition hover:bg-accent-5 lg:block",a&&"bg-accent-5"),children:o.label},o.href)})]}),u.jsx(Whe,{})]})})}function Xl({message:e,testId:t=""}){return u.jsx("div",{className:"flex h-72 items-center justify-center sm:h-96","data-testid":t,children:u.jsxs("div",{className:"mx-auto my-32 w-64 space-y-6 text-center",children:[u.jsx(rk,{}),u.jsx("p",{className:"text-xs text-accent-50",children:e})]})})}var Khe=e=>typeof e=="function",gR=(e,t)=>Khe(e)?e(t):e,Yhe=(()=>{let e=0;return()=>(++e).toString()})(),Zhe=20,L5=new Map,Xhe=1e3,bR=e=>{if(L5.has(e))return;let t=setTimeout(()=>{L5.delete(e),h0({type:4,toastId:e})},Xhe);L5.set(e,t)},Qhe=e=>{let t=L5.get(e);t&&clearTimeout(t)},yT=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Zhe)};case 1:return t.toast.id&&Qhe(t.toast.id),{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return e.toasts.find(s=>s.id===n.id)?yT(e,{type:1,toast:n}):yT(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?bR(r):e.toasts.forEach(s=>{bR(s.id)}),{...e,toasts:e.toasts.map(s=>
80s.id===r||r===void 0?{...s,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+i}))}}},B5=[],F5={toasts:[],pausedAt:void 0},h0=e=>{F5=yT(F5,e),B5.forEach(t=>{t(F5)})},Jhe={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},epe=(e={})=>{let[t,n]=A.useState(F5);A.useEffect(()=>(B5.push(n),()=>{let i=B5.indexOf(n);i>-1&&B5.splice(i,1)}),[t]);let r=t.toasts.map(i=>{var s,o;return{...e,...e[i.type],...i,duration:i.duration||((s=e[i.type])==null?void 0:s.duration)||e?.duration||Jhe[i.type],style:{...e.style,...(o=e[i.type])==null?void 0:o.style,...i.style}}});return{...t,toasts:r}},tpe=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:n?.id||Yhe()}),sw=e=>(t,n)=>{let r=tpe(t,e,n);return h0({type:2,toast:r}),r.id},ua=(e,t)=>sw("blank")(e,t);ua.error=sw("error");ua.success=sw("success");ua.loading=sw("loading");ua.custom=sw("custom");ua.dismiss=e=>{h0({type:3,toastId:e})};ua.remove=e=>h0({type:4,toastId:e});ua.promise=(e,t,n)=>{let r=ua.loading(t.loading,{...n,...n?.loading});return e.then(i=>(ua.success(gR(t.success,i),{id:r,...n,...n?.success}),i)).catch(i=>{ua.error(gR(t.error,i),{id:r,...n,...n?.error})}),e};var npe=(e,t)=>{h0({type:1,toast:{id:e,height:t}})},rpe=()=>{h0({type:5,time:Date.now()})},ipe=e=>{let{toasts:t,pausedAt:n}=epe(e);A.useEffect(()=>{if(n)return;let s=Date.now(),o=t.map(a=>{if(a.duration===1/0)return;let c=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(c<0){a.visible&&ua.dismiss(a.id);return}return setTimeout(()=>ua.dismiss(a.id),c)});return()=>{o.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=A.useCallback(()=>{n&&h0({type:6,time:Date.now()})},[n]),i=A.useCallback((s,o)=>{let{reverseOrder:a=!1,gutter:c=8,defaultPosition:d}=o||{},h=t.filter(x=>(x.position||d)===(s.position||d)&&x.height),y=h.findIndex(x=>x.id===s.id),g=h.filter((x,_)=>_<y&&x.visible).length;return h.filter(x=>x.visible).slice(...a?[g+1]:[0,g]).reduce((x,_)=>x+(_.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:npe,startPause:rpe,endPause:r,calculateOffset:i}}},dE=ua;const T6={default:{className:"outline-amber/50",iconClassName:"bg-amber/10 text-amber",Icon:Hre},error:{className:"outline-red/50",iconClassName:"bg-red/10 text-red",Icon:aA},success:{className:"outline-green/50",iconClassName:"bg-green/10 text-green",Icon:Nre}};function spe({toast:e,children:t}){const[n,r]=A.useState(!0),{className:i,iconClassName:s,Icon:o}=T6[e.type]||T6.default;return n?u.jsxs("div",{...e.ariaProps,className:It("flex w-full items-center gap-4 roun
80ded-xl bg-accent-0 p-4 shadow outline outline-1 last:mb-0",i),children:[u.jsx("div",{className:It("flex shrink-0 items-center justify-center rounded p-2",s),children:u.jsx(o,{className:"size-4",strokeWidth:1.5})}),u.jsxs("div",{className:"flex max-w-full grow flex-col gap-2 text-xs",children:[u.jsx("div",{className:"overflow-hidden whitespace-nowrap break-words",children:t}),e.type==="error"&&u.jsx("div",{className:"flex items-center text-2xs",children:u.jsx(B3,{text:t,label:"Copy error",showLabel:!0,tooltipDisabled:!0})})]}),u.jsx("button",{className:"shrink-0 rounded-full bg-accent-0 p-1 transition-colors hover:bg-accent-10",onClick:()=>r(!1),children:u.jsx(jg,{className:"size-4",strokeWidth:1.5})})]}):null}const cD=()=>{const{toasts:e,handlers:t}=ipe({duration:1e4}),{startPause:n,endPause:r}=t,i=e.filter(s=>s.visible).map(s=>{const o=T6[s.type]||T6.default;return{...s,style:o}});return i.length===0?null:u.jsx("div",{onMouseEnter:n,onMouseLeave:r,className:"pointer-events-none fixed bottom-0 left-0 right-0 z-50 max-h-screen overflow-y-auto p-5",children:u.jsx("div",{className:"pointer-events-auto flex w-full max-w-sm flex-col gap-3",children:i.reverse().map(s=>{const o=s.message?.reason||s.message?.message||(s.message.props?s.message:s.message.toString()),a=o?.props?.children??o;return u.jsx(spe,{toast:s,children:a},s.id)})})})},ope=dE.error,ape=e=>(console.error(e),ope(typeof e=="string"||e instanceof Error?pT(e?.toString()??"Error"):e));dE.error=ape;cD.toast=dE;window.toast=dE;async function cpe(e){if(!e.length)return[];const t=e.map(({hash:r,chainId:i})=>T5(Fc.getClient({chainId:i}),{hash:r})),n=await Promise.allSettled(t);if(n.some(r=>r.status==="rejected"))throw"Failed call";return ig(n.map(r=>r.status==="fulfilled"?r.value:void 0))}function upe(e,t={}){return Kr({queryKey:["getAllReceipts",e.join(",")],queryFn:()=>cpe(e),gcTime:sg,staleTime:sg,...t,enabled:!!e.length&&(t.enabled??!0)})}async function lpe(e){if(!e.length)return[];const t=e.map(({hash:r,chainId:i})=>P9(Fc.getClient({chainId:i}),{hash:r})),n=await Promise.allSettled(t);if(n.some(r=>r.status==="rejected"))throw"Failed call";return ig(n.map(r=>r.status==="fulfilled"?r.value:void 0))}function dpe(e,t={}){return Kr({queryKey:["getAllTransactions",e.join(",")],queryFn:()=>lpe(e),gcTime:sg,staleTime:sg,...t,enabled:!!e.length&&(t.enabled??!0)})}async function fpe({calls:e,originDomain:t,salt:n,commitmentDispatchTx:r,chain:i}){const s=JSON.stringify({commitmentDispatchTx:r,originDomain:t,calls:e,relayers:jO,salt:n});console.log("body:"),console.log(s);try{const o=await fetch(NO,{method:"POST",headers:{"Content-Type":"application/json"},body:s});if(o.ok)return dr("SUP-Y",r),{chain:i};{const a=await o.text();toast.error(`Failed to share calls with relayer: ${o.status} ${a}`),xR({calls:e,originDomain:t,salt:n,commitmentDispatchTx:r,chain:i})}}catch(o){xR({calls:e,originDomain:t,salt:n,commitmentDispatchTx:r,chain:i});const a=`Relay call error: ${o?.toString()}`;dr("SUP-F",a),toast.error(a)}}async function hpe({calls:e,originDomain:t,destinationDomain:n,originRouter:r,salt:i,chain:s,userSalt:o}){const a=JSON.stringify({calls:e,relayers:jO,salt:i,originDomain:t,destinationDomain:n,owner:r,userSalt:o});try{console.log("body:"),console.log(a);const c=await fetch(NO,{method:"POST",headers:{"Content-Type":"application/json"},body:a});if(c.ok)return dr("SUP-Y",`pre-tx:${i}`),{chain:s};{const d=await c.text(),h=`Failed to share calls with relayer: ${c.status} ${d}`;return dr("SUP-F",`pre-tx:${i} — ${c.status}`),{error:h}}}catch(c){const d=`Relay call error: ${c?.toString()}`;return dr("SUP-F",d),{error:d}}}function xR(e){console.log("Debug logs:"),console.log(e),dr("SUP-F",e.commitmentDispatchTx)}function ppe(){const[e,t]=A.useState([]),[n,r]=A.useState([]),{data:i=[],refetch:s}=upe(e,{refetchInterval:sd}),{data:o=[],refetch:a}=dpe(e,{refetchInterval:sd}),c=A.useCallback(()=>{const x=ype(),_=gpe();JSON.stringify(e)!==JSON.stringify(x)&&t(x),JSON.stringify(n)!==JSON.stringify(_)&&r(_)},[e,n]),d=A.useCallback(()=>{dr("AUTR-0",""),c(),s(),a()},[s,a,c]);A.useEffect(()=>{},[c]);const h=A.useMemo(()=>
80{if(!o.length||!i.length)return[];const _=o.filter(S=>i.some(I=>I.transactionHash.toLowerCase()===S.hash.toLowerCase()&&I.status==="success")).map(S=>{const I=n.find(L=>L.commitmentHash&&S.input.includes(L.commitmentHash.replace("0x","")));if(!I){dr("AUTR-1",S.hash);return}return dr("AUTR-2",S.hash),{...I,commitmentDispatchTx:S.hash}});return ig(_)},[n,o,i]),{mutate:y,isPending:g}=a0({mutationFn:()=>mpe({txsToRelay:h})});return A.useEffect(()=>{h.length&&!g&&y()},[h,g]),{onSuperSwapTx:d}}function mpe({txsToRelay:e}){return Promise.allSettled(e.map(fpe)).then(t=>(t.forEach(n=>{if(n.status==="fulfilled"&&n.value?.chain){const r=`superswap-tx-${n.value.chain}`;localStorage.removeItem(r),uD(n.value.chain).forEach(s=>localStorage.removeItem(s))}}),t.map(n=>{const r=n.status==="fulfilled"?n.value?.chain:void 0;return{chain:r,success:!!r}})))}function ype(){const e=[];for(const t of ma){const n=`superswap-tx-${t}`,r=localStorage.getItem(n);r&&e.push({hash:r,chainId:t})}return e}function gpe(){const e=[];for(const t of ma){const r=uD(t).map(i=>JSON.parse(localStorage.getItem(i)??""));e.push(...r)}return e}function uD(e){const t=`superswap-data-${e}-0x`;return Object.keys(localStorage).filter(n=>n.startsWith(t))}async function bpe(e){const t=await Promise.allSettled(Vp("hooks:token:fetchOnchainTokenPrices",en.uniq($O.superchainKeys).map(i=>{const[s,o]=i.split(":"),a=Zu(Number(s),!0).chain;return[[{address:a.superchainConfig.stable,decimals:6},{address:a.superchainConfig.weth||a.superchainConfig.nativeWrapped,decimals:18},{address:o,decimals:18}],a]}))),n=t.every(i=>i.status==="fulfilled");n||toast.error("Failed to fetch custom prices");const r=n?t.map(i=>i.value):[];return Hg("Tokens","hooks:token:fetchTokenPricesAndBalances",i=>{const s=xpe(i);return[i,s,e,en.merge({},...r)]},"hooks:token:mergeTokens")}function xpe(e){const t=pO("customTokenAddresses",e,YF(e.id)),n=JSON.parse(localStorage.getItem(t)||"[]"),r=n.filter(i=>!TJ[e.id]?.includes(i));if(r.length!==n.length)try{localStorage.setItem(t,JSON.stringify(r))}catch{console.error("Failed to clean custom tokens")}return r}function ys(e=null,t={}){const{address:n,isConnected:r,isDisconnected:i}=Rr(),s=r||i,o=e??n;return Kr({queryKey:["fetchTokenPricesAndBalances",o],queryFn:()=>bpe(o),...t,gcTime:Wr,staleTime:Wr,enabled:(t?.enabled??!0)&&s})}function vpe(e,t){return A.useMemo(()=>{if(UO&&t===Ja.id)return e.native[o0.id];const n=og[t].superchainConfig.nativeERC20;return n?e[`${t}:${n}`]:e.native[t]},[e,t])}const wpe=()=>{const[e]=Jf();A.useEffect(()=>{const t=window.location.hash.substring(1);if(!t)return;let n=0;const r=20;function i(){const s=document.getElementById(t);if(s){s.scrollIntoView({behavior:"smooth"});return}n<r&&(n+=1,setTimeout(i,50))}i()},[e])};async function Epe(e,t){const n=(await Hg("Pools","hooks:pair:fetchLps",s=>[s,t])).flat(),r=await Promise.all(Vp("hooks:pair:processPools",en.chunk(n,Math.ceil(n.length/b3)).map(s=>[s,e])));return await Vp("hooks:pair:mergePools",[[r]])[0]}function Yg(e,t={}){const n=!!e,r=lh(),i=A.useMemo(()=>r.getQueryData(["fetchPools",e?.sorted?.length,!0])?!0:t?.allPools??!0,[t?.allPools,r,e?.sorted?.length]);return Kr({queryKey:["fetchPools",e?.sorted?.length,i],queryFn:()=>Epe(e,i),...t,enabled:n,gcTime:Wr,staleTime:Wr,refetchInterval:Wr})}async function ik(){const[e,t,n,r,i]=await pd([{chainId:Pt.id,address:Qf,abi:Cn(["function totalSupply() view returns (uint)"]),functionName:"totalSupply"},{chainId:Pt.id,address:Sf,abi:Cn(["function tailEmissionRate() view returns (uint)"]),functionName:"tailEmissionRate"},{chainId:Pt.id,address:Sf,abi:Cn(["function MAX_BPS() view returns (uint)"]),functionName:"MAX_BPS"},{chainId:Pt.id,address:Wf,abi:Cn(["function supply() view returns (uint)"]),functionName:"supply"},{chainId:Pt.id,address:Wf,abi:Cn(["function decimals() view returns (uint)"]),functionName:"decimals"}],{noErrors:!0});if(r===0n)return 0n;const s=Number(i),o=await zp({chainId:Pt.id,address:Sf,abi:Cn(["function calculateGrowth(uint) view returns (uint)"]),functionName:"calculateGrowth",args:[e*t/n]}),a=Is(o,pa("52",s),s);return D9(r,a,s)}async function _pe(e,t,n,r){const i=e.filter(c=>c.managed_id===0n);if(en.isEmpty(i)||en.isEmpty(t[n.id]))return{payload:[],hasOOG:!1};const s=en.chunk(t[n.id],r);let o=!1;return{payload:await Promise.all(i.map(async c=>{const d=(await pd(s.map((h,y)=>({chainId:n.id,address:n.superchainConfig.rewardsSugar,abi:_O,functionName:"rewards",args:[BigInt(h.length),BigInt(r*y),c.id]})),{noErrors:!1})).map(h=>(h[1]==="oog"&&(o=!0),(h[0]||[]).map(y=>({...y,pair:t[n.id].find(g=>g.superchainKey===`${n.id}:${y.lp.toLowerCase()}`),chainId:n.id}))));return{...c,rewards:en.flattenDeep(d).filter(h=>!en.isEmpty(h))}})),hasOOG:o}}function Spe(e){const t=en.groupBy(e.flat(),"id"),n=[];for(const r in t){const i=t[r],s=i.reduce((o,a)=>[...o,...a.rewards],[]);n.push({...i[0],rewards:s})}return n}const m3e=Object.freeze(Object.defineProperty({__proto__:null,fetchRewards:_pe,fetchVeAPR:ik,mergeRewards:Spe},Symbol.toStringTag,{value:"Module"})),Y8=Cn(["function totalSupply() view returns (uint)","function token() view returns (address)","function decimals() view returns (uint8)"]),Db=Cn(["function activePeriod() view returns (uint)","function weekly() view returns (uint)","function tailEmissionRate() view returns (uint)","function MAX_BPS() view returns (uint)","function TAIL_START() view returns (uint)"]);async function sk(){const[e,t,n,r,i,s,o,a,c]=await pd([{chainId:Pt.id,address:Qf,abi:Cn(["function totalSupply() view returns (uint)"]),functionName:"totalSupply"},{chainId:Pt.id,address:Wf,abi:Y8,functionName:"totalSupply"},{chainId:Pt.id,address:Wf,abi:Y8,functionName:"token"},{chainId:Pt.id,address:Wf,abi:Y8,functionName:"decimals"},{chainId:Pt.id,address:Sf,abi:Db,functionName:"activePeriod"},{chainId:Pt.id,address:Sf,abi:Db,functionName:"weekly"},{chainId:Pt.id,address:Sf,abi:Db,functionName:"tailEmissionRate"},{chainId:Pt.id,address:Sf,abi:Db,functionName:"MAX_BPS"},{chainId:Pt.id,address:Sf,abi:Db,functionName:"TAIL_START"}],{noErrors:!0});let d;return s<c?d=e*o/a:d=s,{totalVotes:t,token:n,decimals:r,epochStartedAt:i,epochEndsAt:Number(i)+vO-3600,emissions:d}}async function Tpe(e){const[t,n]=await pd([{chainId:Pt.id,address:Wf,abi:Cn(["function distributor() view returns (address)"]),functionName:"distributor"},{chainId:Pt.id,address:SO,abi:TO,functionName:"byId",args:[e]}],{noErrors:!0}),r=await ik(),{totalVotes:i,epochStartedAt:s,epochEndsAt:o}=await sk(),a=n.permanent?Hp().add(4,"year"):Hp.unix(Number(n.expires_at));return{...n,expiresAt:a.unix(),apr:r,totalVotes:i,epochStartedAt:s,epochEndsAt:o,rewards_distributor:t,canXChainIncrease:fD(n)}}async function Ape(e){if(!e)return[];const[t,n]=await pd([{chainId:Pt.id,address:Wf,abi:Cn(["function distributor() view returns (address)"]),functionName:"distributor"},{chainId:Pt.id,address:SO,abi:TO,functionName:"byAccount",args:[e]}],{noErrors:!0}),r=await ik(),{totalVotes:i,epochStartedAt:s,epochEndsAt:o}=await sk();return(n||[]).map(a=>{const c=a.permanent?Hp.unix(Number(s)).add(4,"year"):Hp.unix(Number(a.expires_at));return{...a,expiresAt:c.unix(),apr:r,totalVotes:i,epochStartedAt:s,epochEndsAt:o,rewards_distributor:t,canXChainIncrease:fD(a)}})}function kpe(e=[],t,n,r){return e.length?Hg("Rewards","hooks:ve:fetchRewards",i=>[e,t,i,n],"hooks:ve:mergeRewards",void 0,void 0,void 0,r):Promise.resolve([])}function Cpe(e={}){return Kr({queryKey:["fetchVeStats"],queryFn:()=>sk(),...e})}function y3e(e,t={}){return Kr({queryKey:["fetchVenft",e?.toString()],queryFn:()=>Tpe(e),...t,enabled:e!==void 0&&(t.enabled??!0)})}function lD(e,t={}){return Kr({queryKey:["fetchVenfts",e],queryFn:()=>Ape(e),...t,enabled:!!e&&(t.enabled??!0),gcTime:Wr,staleTime:Wr})}function dD(e,t,n={}){const r=(e||[]).map(d=>d.id.toString()),i=(e||[]).map(d=>d.rebase_amount.toString()),[s,o]=A.useState(!1),a=s?10:50,c=!en.isEmpty(t?.all);return{...Kr({queryKey:["fetchRewards",r,i,t?.all.length,a],queryFn:()=>kpe(e,t,a,()=>o(!0)),enabled:c,...n,gcTime:sg,staleTime:sg}),enabled:c}}function fD({managed_id:e,amount:t,expires_at:n}){return!1}const hD=A.createContext(void 0);function pD({children:e}){const{address:t}=Rr(),{data:n,isLoading:r,error:i}=Cpe(),s=Number(n?.epochStartedAt),o=n?.epochEndsAt,{data:a,error:c,isLoading:d}=ys(),[h,y]=A.useState(!1),{data:g,isLoading:x,error:_,refetch:S}=lD(t,{refetchInterval:h}),{data:I,isLoading:L,error:D}=Yg(a),{data:F,isLoading:$,refetch:z,error:V}=dD(g,I),K=A.useMemo(()=>a?.[`${Pt.id}:${Qf}`],[a]);return u.jsx(hD.Provider,{value:{appToken:K,venfts:g,venftsWithRewards:F,tokens:a,veStats:n,epochStartedAt:s,epochEndsAt:o,isLoading:r||d||x||L||$,errors:{veStats:i,tokens:c,venfts:_,pools:D,rewards:V},refetch:S,refetchRewards:z,setVenftsRefetchInterval:y},children:e})}function mD(){const e=A.useContext(hD);if(e===void 0)throw new Error("useLocksContext must be used within a LocksContextProvider");return e}const yD=A.createContext(void 0);function gD({children:e}){const[t,n]=A.useState(),[r,i]=A.useState(),[s,o]=A.useState({form:"INCREASE",state:"INITIAL",amount:0n}),{epochStartedAt:a,venftsWithRewards:c}=mD(),d=A.useMemo(()=>
80{if(!t)return!1;const _=Hp().unix(),I=(a??_)+lJ;return Math.max(0,I-t.expiresAt)<vO},[t,a]),h=A.useMemo(()=>c?.find(_=>_.id===t?.id)?.rewards??[],[c,t]),y=t&&t.voted_at>0n,g=t&&t.epochStartedAt<=t.voted_at,x=t&&t.rebase_amount>0n;return u.jsx(yD.Provider,{value:{formState:s,setFormState:o,venft:t,setVenft:n,tx:r,setTx:i,error:null,isVenftMaxLocked:d,availableRewards:h,hasVoted:!!y,hasVotedThisEpoch:!!g,hasRebases:!!x},children:e})}function g3e(){const e=A.useContext(yD);if(e===void 0)throw new Error("useLockContext must be used within a LockContextProvider");return e}const b3e={CREATE:"Create new lock",INCREASE:"Increase amount set",EXTEND:"New unlock time",MERGE:"Merging locks",TRANSFER:"Transferring lock"};function x3e(e){switch(e){case"CREATE":return{form:"CREATE",state:"INITIAL",amount:0n,ts:0n};case"INCREASE":return{form:"INCREASE",state:"INITIAL",amount:0n};case"EXTEND":return{form:"EXTEND",state:"INITIAL",amount:0n,ts:0n,permanent:!1};case"MERGE":return{form:"MERGE",state:"INITIAL",fromVenft:0n,toVenft:0n};case"TRANSFER":return{form:"TRANSFER",state:"INITIAL",to:""};default:return{form:"INCREASE",state:"INITIAL",amount:0n}}}function Z8({children:e}){return u.jsx(pD,{children:u.jsx(gD,{children:u.jsx(A.Suspense,{fallback:u.jsx(Xl,{message:"Loading..."}),children:e})})})}const Ipe={neutral:{solid:"bg-accent-10 text-accent-50",outline:"border-accent-30 text-accent-50"},primary:{solid:"bg-primary/10 text-primary",outline:"border-primary/30 text-primary"},error:{solid:"bg-red/10 text-red",outline:"border-red/30 text-red"},success:{solid:"bg-green/10 text-green",outline:"border-green/30 text-green"},warning:{solid:"bg-amber/10 text-amber",outline:"border-amber/30 text-amber"}},Rpe={xs:"px-1 py-px text-2xs gap-0.5 uppercase",sm:"px-1.5 py-0.5 text-xs gap-1"};function Qp({children:e,className:t,color:n="neutral",appearance:r="solid",size:i="xs",tooltip:s}){return u.jsx(jr,{content:s,disabled:!s,children:u.jsx("div",{className:It("inline-flex cursor-default items-center justify-center rounded-full border border-transparent bg-transparent font-semibold",Ipe[n][r],Rpe[i],t),children:e})})}const bD=A.memo(function({error:t}){const{logs:n,formatLogs:r}=l0(),[i,s]=A.useState(!1),[o,a]=A.useState(!1),c=()=>{navigator.clipboard.writeText(r()),a(!0),setTimeout(()=>a(!1),1e3)};return u.jsxs("div",{className:"mx-auto flex min-h-[75vh] max-w-screen-sm flex-col items-center justify-center",children:[u.jsxs("div",{className:"mx-auto flex max-w-xs flex-col items-center gap-8 p-8",children:[u.jsxs("div",{className:"flex flex-col items-center gap-5",children:[u.jsx("div",{className:"rounded-full bg-red/10 p-5 text-red",children:u.jsx(aA,{className:"size-6",strokeWidth:1.5})}),t?u.jsxs("h1",{className:"text-center text-sm",children:[u.jsx("span",{className:"font-semibold",children:"Something went wrong."})," If reloading the page doesn't work, please ask for help in our Discord."]}):u.jsxs("h1",{className:"text-center text-sm",children:[u.jsx("span",{className:"font-semibold",children:"Something went wrong."})," The page you are looking for does not exist."]})]}),t?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsxs(wn,{color:"secondary",onClick:()=>s(!0),children:[u.jsx(Bre,{className:"size-3"}),"Show logs"]}),u.jsxs(wn,{onClick:()=>c(),children:[o?u.jsx(u0,{className:"size-3"}):u.jsx(RL,{className:"size-3"}),o?"Copied":"Copy logs"]})]}),u.jsxs("a",{href:ku.discord,target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-1.5 text-xs text-primary underline-offset-2 hover:underline",children:[u.jsx(T3,{className:"size-3"}),ls.appName," Discord"]})]}):u.jsxs(wn,{href:"/",color:"secondary",children:[u.jsx(oA,{className:"size-3"}),"Back to home"]})]}),u.jsxs(mh,{isOpen:i,onClose:()=>s(!1),title:"Session logs",className:"max-w-lg",padded:!1,children:[u.jsx("div",{className:"max-h-[75dvh] overflow-y-auto sm:max-h-[50dvh]",children:u.jsx("div",{className:"flex flex-col divide-y divide-accent-10 p-5 text-xs sm:p-8",children:n.map((d,h)=>u.jsxs("div",{className:"flex items-center gap-5 py-3 first:pt-0 last:pb-0",children:[u.jsx("div",{className:"grow truncate",children:d[1]}),u.jsx(Qp,{color:d[0].split("-")[0]==="ERR"?"error":"neutral",children:d[0].split("-")[0]})]},h))})}),u.jsxs("div",{className:"flex items-center gap-4 border-t border-accent-10 p-5 [&>*]:flex-1",children:[u.jsx(wn,{color:"secondary",onClick:()=>s(!1),children:"Close"}),u.jsx(wn,{onClick:()=>c(),children:o?"Copied":"Copy session logs"})]})]})]})}),xD=Be.createContext({});function wi(e){const t=Be.useContext(xD);return Be.useMemo(()=>typeof e=="function"?e(t):{...t,...e},[t,e])}const Mpe={};function ok({components:e,children:t,disableParentContext:n}){let r;return n?r=typeof e=="function"?e({}):e||Mpe:r=wi(e),Be.createElement(xD.Provider,{value:r},t)}function vR(e){const t=Object.assign({h1:"h1",p:"p",h2:"h2",h3:"h3",ol:"ol",li:"li",strong:"strong",ul:"ul",blockquote:"blockquote",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td"},wi(),e.components);return u.jsxs(u.Fragment,{children:[u.jsx(t.h1,{children:"About Aerodrome"}),`
81`,u.jsx(t.p,{children:"Aerodrome is the trading and liquidity hub of Base. As the network's leading decentralized exchange (DEX), Aerodrome provides high-efficiency execution for traders, sustainable rewards for liquidity providers, and the most effective infrastructure for bootstrapping and growing liquid markets onchain."}),`
82`,u.jsx(t.p,{children:"Aerodrome launched on August 28, 2023, without VC backing or token sales. The protocol operates as a zero-leak economy: 100% of the revenue it generates is distributed to the participants who power it."}),`
83`,u.jsx(t.p,{children:"Aerodrome has no centralized servers or dependencies and runs on immutable smart contracts that were audited by Spearbit and ChainSecurity teams."}),`
84`,u.jsx(t.p,{children:"In 2026, Aerodrome will merge with Velodrome—the leading DEX on the Optimism Superchain—to become Aero: the unified liquidity layer for all of Ethereum operating on MetaDEX03."}),`
85`,u.jsx("div",{id:"economics-overview"}),`
86`,u.jsx(t.h2,{children:"Economics Overview"}),`
87`,u.jsx(t.h3,{children:"AERO"}),`
88`,u.jsx(t.p,{children:"Aerodrome is built around a native token, AERO, that serves two functions:"}),`
89`,u.jsxs(t.ol,{children:[`
90`,u.jsxs(t.li,{children:[u.jsx(t.strong,{children:"AERO"})," (liquid form) is distributed as rewards to liquidity providers"]}),`
91`,u.jsxs(t.li,{children:[u.jsx(t.strong,{children:"veAERO"})," (locked form) directs AERO rewards and represents a claim on future exchange revenue"]}),`
92`]}),`
93`,u.jsx(t.p,{children:u.jsx(t.strong,{children:"How the system works, at a glance:"})}),`
94`,u.jsxs(t.ul,{children:[`
95`,u.jsx(t.li,{children:"AERO tokens are minted each week"}),`
96`,u.jsx(t.li,{children:"These tokens are streamed to liquidity pools to compensate LPs who prefer a more predictable stream of AERO rewards over a volatile stream of swap fees"}),`
97`,u.jsx(t.li,{children:"The amount of AERO streaming to each pool is determined by veAERO holders (token operators) who vote for the pools based upon the fees that accrued to the pools over the course of the prior week"}),`
98`,u.jsx(t.li,{children:"In return for their votes, veAERO token operators earn a share of exchange revenue that’s accrued to the pools they vote for"}),`
99`,u.jsx(t.li,{children:"Additionally, to attract votes toward specific pools, any user can deposit voting incentives that are paid to token operators who vote for those pools (a key ingredient in bootstrapping liquidity for new tokens)"}),`
100`,u.jsx(t.li,{children:"Anyone can become a token operator by “locking” their AERO to create veAERO"}),`
101`]}),`
102`,u.jsx(t.h3,{children:"System Participants"}),`
103`,u.jsx(t.p,{children:"Aerodrome is a decentralized protocol. This means that anyone can participate in its core functions."}),`
104`,u.jsxs(t.ul,{children:[`
105`,u.jsxs(t.li,{children:[u.jsx(t.strong,{children:"Traders"})," swap tokens on Aerodrome, paying fees on each trade. These fees are the primary source of revenue for the exchange. Traders benefit from deep, productive liquidity that delivers reliable exchange rates and efficient execution."]}),`
106`,u.jsxs(t.li,{children:[u.jsx(t.strong,{children:"Liquidity providers (LPs)"})," deposit tokens into pools. In return, LPs earn AERO emissions, a rewards stream decoupled from point-in-time trading fees. Alternatively, LPs can choose to earn swap fees directly."]}),`
107`,u.jsxs(t.li,{children:[u.jsx(t.strong,{children:"Asset issuers"})," launch pools and grow liquidity for new and existing tokens, providing liquidity and/or depositing incentives to attract emissions that draw other LPs."]}),`
108`,u.jsxs(t.li,{children:[u.jsx(t.strong,{children:"veAERO holders (token operators)"})," vote each week to direct AERO Rewards toward pools. In return for coordinating the network, they earn voting rewards (exchange revenue captured by the pools they vote for)."]}),`
109`]}),`
110`,u.jsx(t.h3,{children:"Value Distribution"}),`
111`,u.jsx(t.p,{children:"On Aerodrome, all value generated by the protocol is distributed to participants:"}),`
112`,u.jsxs(t.ul,{children:[`
113`,u.jsxs(t.li,{children:[u.jsx(t.strong,{children:"Token operators"})," earn 100% of exchange revenue"]}),`
114`,u.jsxs(t.li,{children:[u.jsx(t.strong,{children:"Liquidity providers"})," earn AERO rewards (if staked) or swap fees (if unstaked)"]}),`
115`]}),`
116`,u.jsx(t.p,{children:"Exchange revenue is composed of 100% of swap fees from staked liquidity, all voting incentives, and (by default) a small percentage of swap fees generated by unstaked liquidity in certain emissions-eligible pools."}),`
117`,u.jsx(t.h3,{children:"Economic Engine"}),`
118`,u.jsx(t.p,{children:"At the core of Aerodrome's design is an economic flywheel:"}),`
119`,u.jsxs(t.ol,{children:[`
120`,u.jsx(t.li,{children:"Pools that generate the most revenue attract the most votes from token operators"}),`
121`,u.jsx(t.li,{children:"Votes direct AERO emissions toward the pool, drawing in LPs who deepen liquidity"}),`
122`,u.jsx(t.li,{children:"A deeper pool executes trades more efficiently, handling higher volume at tighter spreads"}),`
123`,u.jsx(t.li,{children:"Higher volume generates more fees, pulling in more votes and repeating the cycle"}),`
124`]}),`
125`,u.jsx(t.p,{children:"As the flywheel spins, the most productive pools grow deeper, execute better, and generate more revenue with every turn."}),`
126`,u.jsx(t.h3,{children:"Track Record"}),`
127`,u.jsx(t.p,{children:"As of April 2026, Aerodrome has processed over $185 billion in cumulative trading volume, generated over $270 million in swap fees, and distributed approximately $450+ million in total revenue to token operators."}),`
128`,u.jsx(t.p,{children:"In 2025, a position of 10,000 veAERO, voted at average efficiency, earned approximately $2,470 in rewards for the year."}),`
129`,u.jsxs(t.blockquote,{children:[`
130`,u.jsx(t.p,{children:"2025 veAERO revenue figures reflect the results of a position voted at average efficiency. Actual results may vary. Past results are not an indicator of future performance."}),`
131`]}),`
132`,u.jsx(t.h3,{children:"AERO Emissions at a Glance"}),`
133`,u.jsx(t.p,{children:"For Aerodrome to operate, new AERO emissions are distributed each week as LP rewards."}),`
134`,u.jsx(t.p,{children:"As of April 2026, the current rate of AERO emissions is approximately 10.9% annualized."}),`
135`,u.jsx(t.p,{children:"veAERO holders determine how AERO emissions are distributed by voting every seven days to allocate across pools."}),`
136`,u.jsx(t.p,{children:u.jsx(t.strong,{children:"Annualized Inflation (%)"})}),`
137`,u.jsx($f,{src:"/svg/AERO/annualized-inflation.svg",className:"w-full",preserveAspectRatio:"xMidYMid meet"}),`
138`,u.jsx(t.p,{children:u.jsx(t.strong,{children:"Other key figures as of April 2026:"})}),`
139`,u.jsxs(t.ul,{children:[`
140`,u.jsx(t.li,{children:"Total supply: 1.88B AERO"}),`
141`,u.jsx(t.li,{children:"veAERO locked: ~51% of supply (~958M)"}),`
142`,u.jsx(t.li,{children:"Avg lock time: ~3.7 years"}),`
143`]}),`
144`,u.jsx("div",{id:"protocol-details"}),`
145`,u.jsx(t.h2,{children:"Protocol Details"}),`
146`,u.jsx(t.p,{children:"Aerodrome is a decentralized exchange. This means that the liquidity powering trades is provided by users who deposit assets into liquidity pools of paired tokens."}),`
147`,u.jsx(t.p,{children:"Exchange rates are not managed by a central order book. Instead, they are determined algorithmically by the ratio of the two assets in each pool. These underlying algorithms are called AMMs (Automated Market Makers). Aerodrome includes a constant product AMM and a concentrated liquidity AMM design called Slipstream."}),`
148`,u.jsx(t.p,{children:"Aerodrome is powered by MetaDEX02, the next-generation “DEX OS” (decentralized exchange operating system) designed and engineered by Dromos Labs. It combines industry leading AMMs and innovative integrated functions, with a unified zero-leak economic system that delivers maximum value to all participants."}),`
149`,u.jsx(t.p,{children:"MetaDEX03 will be released alongside the forthcoming exchange, Aero."}),`
150`,u.jsx(t.h3,{children:"Epochs: The Timeline"}),`
151`,u.jsx(t.p,{children:"Aerodrome operates on seven-day cycles called epochs."}),`
152`,u.jsx(t.p,{children:"An epoch starts every Thursday at 00:00 UTC and ends Wednesday at 23:59 UTC. Votes, emissions, fees, and incentives are calculated for each epoch."}),`
153`,u.jsx(t.p,{children:"Each epoch begins with two things happening simultaneously: accrued exchange revenue from the previous epoch is distributed to token operators as voting rewards, and the rate of AERO emissions to liquidity pools resets."}),`
154`,u.jsx(t.p,{children:"Throughout an epoch, token operators can cast their votes. All votes must be submitted by Wednesday at 23:00 UTC, one hour before the epoch ends. Votes do not affect the current epoch's emissions, but determine how emissions are distributed in the following epoch."}),`
155`,u.jsx(t.p,{children:"Each epoch ends with votes being tallied and the per-pool emission rates for the next epoch being set accordingly."}),`
156`,u.jsx(t.h3,{children:"Background"}),`
157`,u.jsx(t.p,{children:"The core historical challenge for decentralized exchanges has been attracting and retaining deep enough liquidity to provide a good trading experience for users."}),`
158`,u.jsx(t.p,{children:"Liquidity providers face significant risk—largely related to price movements—and must be compensated accordingly. Early exchanges operated as two-sided marketplaces where LPs earned only the fees their liquidity generated."}),`
159`,u.jsx(t.p,{children:"These systems proved fragile: when trading slowed, fees dropped to a level that couldn’t support the risk of providing liquidity, and LPs withdrew."}),`
160`,u.jsx(t.p,{children:"First-generation exchanges were also poor at bootstrapping markets for new tokens, because without a reliable return, LPs would often not take on the risk of market making highly volatile assets."}),`
161`,u.jsx(t.p,{children:"To mature as a product category, DEXs needed to establish a more predictable return profile for LPs, and to decompose risks in a way that each participant is only asked to absorb risks best suited to their role."}),`
162`,u.jsx(t.p,{children:"Aerodrome was part of a new era of exchanges built to solve these unique problems by:"}),`
163`,u.jsxs(t.ol,{children:[`
164`,u.jsx(t.li,{children:"Decoupling LP compensation from point-in-time fees, creating a more knowable return rate which keeps liquidity deep and sticky across market conditions"}),`
165`,u.jsx(t.li,{children:"Creating a dedicated stakeholder group—token operators—directly responsible for directing the network’s liquidity to where it is needed, so LPs are not asked to absorb risk unfit for their role"}),`
166`]}),`
167`,u.jsx(t.p,{children:"To make this possible, Aerodrome is built around a native token (AERO) that in its liquid form is distributed as LP rewards and that, when locked, grants voting rights and a claim on future exchange revenue."}),`
168`,u.jsx(t.h3,{children:"Aerodrome Economy"}),`
169`,u.jsx(t.p,{children:"Aerodrome operates as a zero-leak economy: 100% of value generated by the protocol is distributed to participants: token operators, who coordinate the flow of liquidity, earn all exchange revenue. Liquidity providers, who make efficient trades possible, earn AERO emissions (or can choose to earn swap fees directly)."}),`
170`,u.jsx(t.p,{children:"All token operators participate on equal footing, earning according to their participation."}),`
171`,u.jsx(t.p,{children:"The Aerodrome Foundation, the protocol's neutral steward, and Dromos Labs, its core development team, both earn revenue through participation in this same system. The Aerodrome Foundation uses its share to promote protocol health and growth, including through token buybacks. Dromos Labs uses its share to fund ongoing protocol development."}),`
172`,u.jsx(t.p,{children:"Through its economic design, Aerodrome aligns the interests of all stakeholders who are often at odds in incumbent systems. This alignment exists because everyone earns the same way through the same mechanisms, and earnings are tied directly to protocol performance. When the protocol generates value, everyone earns in proportion to their participation."}),`
173`,u.jsx(t.p,{children:"To support ongoing development, 5% of weekly emissions are allocated to the Dromos Labs team address where it is compounded into a max-locked veAERO position."}),`
174`,u.jsx(t.h3,{children:"Exchange Revenue"}),`
175`,u.jsx(t.p,{children:"100% of exchange revenue is distributed weekly to token operators as voting rewards."}),`
176`,u.jsx(t.p,{children:"Current revenue sources:"}),`
177`,u.jsxs(t.ul,{children:[`
178`,u.jsx(t.li,{children:"100% of swap fees generated by staked liquidity"}),`
179`,u.jsx(t.li,{children:"A percentage of swap fees generated by unstaked liquidity"}),`
180`,u.jsx(t.li,{children:"100% of voting incentives deposited by third parties"}),`
181`,u.jsx(t.li,{children:"100% of launch payments (voting incentives deposited as part of Ignition launches)"}),`
182`]}),`
183`,u.jsx(t.h3,{children:"Voting Incentives"}),`
184`,u.jsx(t.p,{children:"Aerodrome enables projects to deposit voting incentives. These incentives are processed as exchange revenue and paid to veAERO holders who vote for the pool."}),`
185`,u.jsxs(t.ul,{children:[`
186`,u.jsx(t.li,{children:"A token issuer deposits a share of supply as voting incentives for their token's pool"}),`
187`,u.jsx(t.li,{children:"Token operators vote to direct AERO emissions to the pool, capturing a share of those incentives in return"}),`
188`,u.jsx(t.li,{children:"AERO emissions then flow to the pool, incentivizing liquidity providers to deposit the deep, productive liquidity required to provide efficient execution for traders"}),`
189`,u.jsx(t.li,{children:"Better trading conditions drive higher volume, which generates organic fee revenue"}),`
190`,u.jsx(t.li,{children:"As fee revenue accrues, it attracts future votes from token operators seeking to capture it"}),`
191`]}),`
192`,u.jsxs(t.blockquote,{children:[`
193`,u.jsxs(t.p,{children:[u.jsx(t.strong,{children:"Note:"})," Exchange revenue from swap fees operates on a one-week delay. Swap fees accrue over a seven-day period and are distributed as voting rewards at the end of the following seven-day period, not the one in which they were generated. Voting incentives, however, are distributed to token operators at the end of the seven-day period in which they are deposited."]}),`
194`]}),`
195`,u.jsx(t.h3,{children:"Token Listing and Liquidity Staking"}),`
196`,u.jsx(t.p,{children:"Not all pools participate in the above system. Due to the permissionless and anonymous nature of DeFi, to prevent abuse and protect users, tokens must be listed before the pools they are in can qualify to receive votes or emissions. In order to receive votes and receive/distribute AERO emissions, a pool must have a gauge: a special smart contract connected to a liquidity pool that coordinates the distribution of emissions, votes, and rewards. When token operators vote for a pool, they are directing emissions toward its gauge. The more votes a gauge receives relative to all other gauges, the larger its share of that week's emissions."}),`
197`,u.jsx(t.p,{children:u.jsx(t.strong,{children:"Permissionless Pools"})}),`
198`,u.jsx(t.p,{children:"Aerodrome allows anyone to create a pool for any supported token. LPs in pools that are not emissions-eligible earn 100% of swap fees directly."}),`
199`,u.jsx(t.p,{children:u.jsx(t.strong,{children:"Unstaked Liquidity"})}),`
200`,u.jsx(t.p,{children:"LPs always have the option to leave their deposits unstaked, or to unstake already staked deposits. Unstaked deposits earn swap fees instead of AERO emissions, similar to the legacy model on other DEXs. Offering this flexibility to LPs helps attract liquidity from other venues."}),`
201`,u.jsx(t.p,{children:"No deposit can earn both swap fees and AERO concurrently."}),`
202`,u.jsxs(t.blockquote,{children:[`
203`,u.jsxs(t.p,{children:[u.jsx(t.strong,{children:"Note:"})," Aerodrome has the ability to process a percentage of fees generated by unstaked liquidity as exchange revenue. The current default protocol fee take is 10% in emissions-eligible Slipstream (concentrated liquidity) pools."]}),`
204`]}),`
205`,u.jsx("div",{id:"public-good-of-base"}),`
206`,u.jsx(t.h2,{children:"Public Good for Base"}),`
207`,u.jsx(t.p,{children:"The launch of Aerodrome included the creation and initial funding of three ecosystem wallets. Each of these wallets were designed to serve a discrete role to help grow Aerodrome and serve the Base ecosystem. Two of these wallets are managed by the Aerodrome Foundation. The other is managed by Dromos Labs."}),`
208`,u.jsx(t.p,{children:"The veAERO in these wallets are max-locked. None of the underlying AERO has ever been sold."}),`
209`,u.jsx(t.h3,{children:"Wallets"}),`
210`,u.jsx(t.p,{children:u.jsx(t.strong,{children:"Flight School"})}),`
211`,u.jsx(t.p,{children:"The Flight School wallet was created to grow the network of token operators by incentivizing new locks. Each week, it would vote and earn revenue which would then be used to buy liquid tokens off the market. All of those tokens would then be locked and distributed as a bonus to wallets that locked >2500 veAERO within a four-week period (“class”). Flight School formally concluded April, 2026."}),`
212`,u.jsx(t.p,{children:"After the conclusion of the Flight School program, the voting power was integrated into the Public Goods Fund."}),`
213`,u.jsx(t.p,{children:u.jsx(t.strong,{children:"Development"})}),`
214`,u.jsx(t.p,{children:"The development wallet is managed by Dromos Labs. It actively participates in weekly voting and uses earned rewards to fund ongoing development and R&D. This wallet also receives a small percent of weekly emissions (which is also compounded into the max-locked position)."}),`
215`,u.jsx(t.h3,{children:"Buybacks"}),`
216`,u.jsx(t.p,{children:"Over 184M AERO has been acquired and locked to date via the PGF, Flight School, and other initiatives."}),`
217`,u.jsx(t.h3,{children:"The Momentum Fund"}),`
218`,u.jsxs(t.p,{children:["With the launch of Aero, PGF will be reconstituted as the Momentum Fund. 100% of revenue generated by the Momentum Fund goes to supporting the Aerodrome Protocol via buybacks, grants to contributors and other ecosystem support measures such as strategic partnerships. More on this update from the Aerodrome Foundation ",u.jsx("a",{href:"https://paragraph.com/@aerodrome-foundation/the-future-of-flight-school",target:"_blank",children:"here"}),"."]}),`
219`,u.jsx("div",{id:"ignition"}),`
220`,u.jsx(t.h2,{children:"Ignition"}),`
221`,u.jsx(t.p,{children:"Ignition is Aerodrome's liquidity launch program, designed to activate the flywheel for new projects at or around their token generation event (TGE)."}),`
222`,u.jsx(t.p,{children:"With Ignition, a project deposits a portion of its token supply as voting incentives for its pool on Aerodrome. Token operators then vote for the pool to capture those incentives, directing AERO emissions that begin streaming the following epoch. Those same token operators receive their incentive rewards, and LPs—which can include the token operators themselves—deposit two-sided liquidity to earn the incoming AERO stream."}),`
223`,u.jsx(t.p,{children:"As liquidity deepens, the pool becomes capable of supporting trading volume with increased efficiency. Volume generates revenue from swap fees, which attracts further votes and sustains the cycle."}),`
224`,u.jsx(t.p,{children:"With sufficient depth and distribution through Aerodrome, price discovery frequently occurs onchain—on Aerodrome—even when running alongside concurrent centralized exchange listings."}),`
225`,u.jsx(t.p,{children:"Launch payments deposited through Ignition are treated as exchange revenue and distributed to token operators."}),`
226`,u.jsx("div",{id:"locking-and-voting"}),`
227`,u.jsx(t.h2,{children:"Locking and Voting"}),`
228`,u.jsx(t.p,{children:'Anyone can become a token operator on Aerodrome by locking AERO (a process also called "vote-escrowing.") A particularly powerful version of Aerodrome’s flywheel comes when LPs earn AERO for providing liquidity, lock that AERO as veAERO, and then earn exchange revenue for directing additional AERO rewards to the pool that they are already LPing.'}),`
229`,u.jsx(t.p,{children:"Locking AERO generates veAERO, an NFT that represents a locked position and carries voting rights. When locking, tokenholders choose a duration of at least one week and up to four years. The longer the lock, the more voting power is granted."}),`
230`,u.jsx(t.h3,{children:"Voting Power"}),`
231`,u.jsx(t.p,{children:"Voting power is determined by two factors: how much AERO is locked, and how much of the lock duration remains."}),`
232`,u.jsx(t.p,{children:"At a four-year lock, you receive the full 1:1 ratio. With two years remaining, you receive half. The same logic applies along the scale."}),`
233`,u.jsx(t.p,{children:"Same amount locked, different durations | 1,000 AERO:"}),`
234`,u.jsxs(t.table,{className:"min-w-full w-full divide-y divide-accent-10 rounded-xl overflow-hidden bg-accent-0 mb-12 font-mono",children:[u.jsx(t.thead,{children:u.jsxs(t.tr,{children:[u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50 w-2/3",children:"Lock Duration"}),u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50",children:"Voting Power"})]})}),u.jsxs(t.tbody,{className:"divide-y divide-accent-10",children:[u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"4 years"}),u.jsx(t.td,{className:"px-6 py-4",children:"1,000 veAERO"})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"3 years"}),u.jsx(t.td,{className:"px-6 py-4",children:"750 veAERO"})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"2 years"}),u.jsx(t.td,{className:"px-6 py-4",children:"500 veAERO"})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"1 year"}),u.jsx(t.td,{className:"px-6 py-4",children:"250 veAERO"})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"6 months"}),u.jsx(t.td,{className:"px-6 py-4",children:"125 veAERO"})]})]})]}),`
235`,u.jsx(t.p,{children:"Same duration, different amounts | locked at 4 years:"}),`
236`,u.jsxs(t.table,{className:"min-w-full w-full divide-y divide-accent-10 rounded-xl overflow-hidden bg-accent-0 mb-12 font-mono",children:[u.jsx(t.thead,{children:u.jsxs(t.tr,{children:[u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50 w-2/3",children:"Lock Duration"}),u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50",children:"Voting Power"})]})}),u.jsxs(t.tbody,{className:"divide-y divide-accent-10",children:[u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"10,000 AERO"}),u.jsx(t.td,{className:"px-6 py-4",children:"10,000 veAERO"})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"5,000 AERO"}),u.jsx(t.td,{className:"px-6 py-4",children:"5,000 veAERO"})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"1,000 AERO"}),u.jsx(t.td,{className:"px-6 py-4",children:"1,000 veAERO"})]})]})]}),`
237`,u.jsx(t.h3,{children:"Auto-Max Lock"}),`
238`,u.jsx(t.p,{children:"Locks can be set to Auto-Max Lock, which keeps the duration fixed at four years and prevents voting power from decaying. This feature can be enabled or disabled for each individual Lock. If disabled, the Lock duration begins to shorten each week."}),`
239`,u.jsx(t.h3,{children:"Lock Expiry"}),`
240`,u.jsx(t.p,{children:"When a lock reaches the end of its duration, voting power drops to zero and the underlying AERO becomes available to withdraw. The veAERO NFT remains in your wallet until you take action. It does not burn automatically. To recover the locked AERO, the holder must manually withdraw through the protocol interface. An expired Lock holds no voting power and earns no rewards."}),`
241`,u.jsx(t.h3,{children:"Decay"}),`
242`,u.jsx(t.p,{children:"Voting power decays linearly as time passes. If you locked 1,000 AERO for four years and do nothing, after one year you will have three years remaining and your voting power will have dropped from 1,000 to 750, continuing to fall each week until expiry. Auto-Max Lock stops this by freezing the duration at four years."}),`
243`,u.jsx(t.h3,{children:"Locking Details"}),`
244`,u.jsxs(t.ul,{children:[`
245`,u.jsx(t.li,{children:"Lock durations can be extended"}),`
246`,u.jsx(t.li,{children:"Additional AERO can be added to an existing Lock"}),`
247`,u.jsx(t.li,{children:"Once locked, AERO cannot be withdrawn early, but the veAERO NFT itself is liquid and can be transferred"}),`
248`,u.jsx(t.li,{children:"veAERO cannot be transferred during any epoch in which it has already actively voted"}),`
249`]}),`
250`,u.jsx(t.h3,{children:"Voting"}),`
251`,u.jsx(t.p,{children:"Each epoch, token operators allocate their voting power across any number of pools/gauges in whatever proportion they choose. A token operator can put 100% of their weight behind a single pool, or split it across many."}),`
252`,u.jsx(t.p,{children:"Votes are not automatically reset each epoch. If a token operator does not manually recast their votes, their previous allocation carries forward unchanged. Once votes are submitted, they cannot be changed mid-epoch."}),`
253`,u.jsx(t.p,{children:"Per-pool exchange revenue earned by voters is proportional to their share of votes directed to the pool. What matters is not how much voting power you hold in total, but what percentage of a given gauge's votes you represent."}),`
254`,u.jsx(t.h3,{children:"vAPR"}),`
255`,u.jsx(t.p,{children:"Voting APR (vAPR) measures the annualized return a veAERO holder can expect to earn by allocating their votes to a specific liquidity pool."}),`
256`,u.jsxs(t.p,{children:[u.jsx(t.strong,{children:"Formula:"})," vAPR = (Weekly Voting Rewards / Value of Voted veAERO) × 52"]}),`
257`,u.jsx(t.p,{children:u.jsx(t.strong,{children:"Where:"})}),`
258`,u.jsxs(t.ul,{children:[`
259`,u.jsx(t.li,{children:"Weekly Voting Rewards: The total USD value of the voting rewards to voters for the current weekly epoch. This is the sum of the trading fees accrued by the pool and any external incentives (bribes) deposited for voters."}),`
260`,u.jsx(t.li,{children:"Value of Voted veAERO: The total voting weight directed to the pool, expressed in USD. This is calculated by multiplying the total number of veAERO votes cast for the pool by the current market price of the AERO token."}),`
261`,u.jsx(t.li,{children:"Annualization: Because rewards are distributed in weekly epochs, the base return is multiplied by 52 to project an annualized rate."}),`
262`]}),`
263`,u.jsxs(t.blockquote,{children:[`
264`,u.jsxs(t.p,{children:[u.jsx(t.strong,{children:"Note:"})," vAPR is calculated dynamically based on the current market price of AERO and the current number of votes assigned to a pool and will continually shift before finalizing at the epoch's close."]}),`
265`]}),`
266`,u.jsx(t.h3,{children:"Anti-Dilution Protection"}),`
267`,u.jsx(t.p,{children:"veAERO holders receive a weekly rebase (veAERO reward) to reduce the dilutive impact of new AERO emissions. Rebases must be manually claimed."}),`
268`,u.jsx(t.p,{children:"The rebase is calculated as:"}),`
269`,u.jsx($f,{src:"/svg/AERO/formula.svg",className:"w-full",preserveAspectRatio:"xMidYMid meet"}),`
270`,u.jsx(t.p,{children:"The rebase amount increases when the overall percentage of locked AERO is low. This protects current voters while incentivizing new users to lock their tokens."}),`
271`,u.jsx(t.h3,{children:"Relay: Automated Compounding"}),`
272`,u.jsx(t.p,{children:"Token operators can choose to configure their position in Relay, an auto-voter built into the Aerodrome interface. Relay casts votes each epoch on the operator's behalf and compounds earned rewards back into their locked position, increasing both their underlying AERO balance and their veAERO voting power over time."}),`
273`,u.jsx(t.p,{children:"Relay is designed for token operators who want to maximize long-term compounding without actively managing their position epoch to epoch."}),`
274`,u.jsx("div",{id:"aero-and-veaero"}),`
275`,u.jsx(t.h2,{children:"AERO and veAERO"}),`
276`,u.jsx(t.p,{children:"Aerodrome Finance uses two tokens to manage its utility and governance:"}),`
277`,u.jsx(t.p,{children:"AERO — ERC-20 utility token of the protocol"}),`
278`,u.jsx(t.p,{children:"veAERO — ERC-721 governance token in the form of an NFT (non-fungible token)"}),`
279`,u.jsxs(t.table,{className:"min-w-full w-full divide-y divide-accent-10 rounded-xl overflow-hidden bg-accent-0 mb-12",children:[u.jsx(t.thead,{children:u.jsxs(t.tr,{children:[u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50 w-2/3",children:"AERO"}),u.jsx(t.th,{className:"px-6 py-3 text-right font-medium uppercase text-xs text-accent-50",children:"Amount"}),u.jsx(t.th,{className:"px-6 py-3 text-right font-medium uppercase text-xs text-accent-50",children:"Percentage"})]})}),u.jsxs(t.tbody,{className:"divide-y divide-accent-10",children:[u.jsxs(t.tr,{className:"bg-accent-5",children:[u.jsx(t.td,{className:"px-6 py-4",children:"Voter Incentives"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"40M"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"8%"})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"Genesis Liquidity Incentives"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"10M"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"2%"})]})]})]}),`
280`,u.jsxs(t.table,{className:"min-w-full w-full divide-y divide-accent-10 rounded-xl overflow-hidden bg-accent-0 mb-12",children:[u.jsx(t.thead,{children:u.jsxs(t.tr,{children:[u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50 w-2/3",children:"veAERO"}),u.jsx(t.th,{className:"px-6 py-3 text-right font-medium uppercase text-xs text-accent-50",children:"Amount"}),u.jsx(t.th,{className:"px-6 py-3 text-right font-medium uppercase text-xs text-accent-50",children:"Percentage"})]})}),u.jsxs(t.tbody,{className:"divide-y divide-accent-10",children:[u.jsxs(t.tr,{className:"bg-accent-5",children:[u.jsx(t.td,{className:"px-6 py-4",children:"Airdrop for veVELO Lockers"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"200M"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"40%"})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"Public Goods Fund (Auto Max-Locked)"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"105M"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"21%"})]}),u.jsxs(t.tr,{className:"bg-accent-5",children:[u.jsx(t.td,{className:"px-6 py-4",children:"Development Team Funding (Auto Max-Locked)"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"95M"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"19%"})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"Flight School (Auto Max-Locked)"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"50M"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"10%"})]})]})]}),`
281`,u.jsx("div",{id:"emissions"}),`
282`,u.jsx(t.h2,{children:"Emissions"}),`
283`,u.jsx(t.p,{children:"The initial supply of AERO was 500M, with 450M distributed as vote-locked (veAERO) tokens."}),`
284`,u.jsx(t.p,{children:"Weekly emissions began at 10M $AERO (2% of the initial supply) before tapering off to more sustainable levels once Aerodrome’s initial rapid ramp up and growth phase had passed."}),`
285`,u.jsx(t.p,{children:"While the Aerodrome Foundation’s initial intent was to eventually turn emissions rate decisions over to token operators, the Foundation eventually determined it made more sense to hold emissions stable at approximately 10.92% per year heading into the launch of Aero."}),`
286`,u.jsx(t.p,{children:"With gauge caps and predictive allocation, the economics of the forthcoming Aero will be optimized for protocol sustainability. As a result, the realized rate of emissions will be structurally limited and, while no final decisions have been made, voter participation may not be required if emissions decisions can be automated."}),`
287`,u.jsx(t.p,{children:"Further details of how the AERO Fed will operate with Aero are still to come."}),`
288`,u.jsx(t.p,{children:"Emissions charts:"}),`
289`,u.jsx(t.h3,{children:"Aerodrome Emissions Path"}),`
290`,u.jsx($f,{src:"/svg/AERO/emissions-path.svg",className:"w-full",preserveAspectRatio:"xMidYMid meet"}),`
291`,u.jsx(t.h3,{children:"Aerodrome Total Supply"}),`
292`,u.jsx($f,{src:"/svg/AERO/total-supply.svg",className:"w-full",preserveAspectRatio:"xMidYMid meet"})]})}function Npe(e={}){const{wrapper:t}=Object.assign({},wi(),e.components);return t?u.jsx(t,Object.assign({},e,{children:u.jsx(vR,e)})):vR(e)}function wR(e){const t=Object.assign({h1:"h1",h2:"h2",p:"p",code:"code",em:"em",ul:"ul",li:"li"},wi(),e.components);return u.jsxs(u.Fragment,{children:[u.jsx(t.h1,{children:"Voter Rewards"}),`
293`,u.jsx(t.h2,{children:"Fees"}),`
294`,u.jsx(t.p,{children:"Token pairs capture fees from the volume enabled by the liquidity in each pool."}),`
295`,u.jsx(t.p,{children:`The fees collected by staked LPs the previous epoch are deposited as incentives
296for the current voting epoch.`}),`
297`,u.jsxs(t.p,{children:[`Fee rewards are distributed in the same tokens as the liquidity pool tokens
298these originate from (e.g., if the pool is `,u.jsx(t.code,{children:"vAMM-AERO/USDC"}),` the distributed
299tokens are `,u.jsx(t.code,{children:"$AERO"})," and ",u.jsx(t.code,{children:"$USDC"}),")."]}),`
300`,u.jsxs(t.p,{children:["Fee rewards are distributed as accrued and can be claimed at any time. Fee rewards deposited as voter incentives are available for claim after the epoch changes (Thursday 00:00 UTC), and are distributed proportionally to the voting power cast by a voter (",u.jsx(t.code,{children:"$veAERO"}),")."]}),`
301`,u.jsx(t.h2,{children:"Incentives"}),`
302`,u.jsxs(t.p,{children:["In addition to fee rewards, liquidity pools can receive external voter rewards from protocols or other participants (known as ",u.jsx(t.em,{children:"incentives"}),"). Incentives can be deposited for ",u.jsx(t.em,{children:"whitelisted"})," tokens and are distributed ",u.jsx(t.em,{children:"only"})," to voters on that pool, proportionally to their share of pool votes."]}),`
303`,u.jsxs(t.p,{children:["These rewards are available for claim after the epoch changes (Thursday 00:00 UTC), and are distributed proportionally to the voting power cast by a voter (",u.jsx(t.code,{children:"$veAERO"}),")."]}),`
304`,u.jsx(t.h2,{children:"Rewards claim"}),`
305`,u.jsx(t.p,{children:"Rebase rewards are claimable after a new epoch has started (Thursday 00:00 UTC)."}),`
306`,u.jsx(t.p,{children:"An example of incentives, voting, and rewards claim timeline:"}),`
307`,u.jsxs(t.ul,{children:[`
308`,u.jsx(t.li,{children:"A new epoch starts Thursday (00:00 UTC)"}),`
309`,u.jsx(t.li,{children:"Incentives are deposited at any point in the epoch"}),`
310`,u.jsx(t.li,{children:"Voters vote for their preferred pools"}),`
311`,u.jsx(t.li,{children:"Once the next epoch arrives (the following Thursday), users are able to claim rewards"}),`
312`]}),`
313`,u.jsx($f,{src:"/svg/docs/chart-feesbribes.svg",className:"w-full max-w-full h-auto mt-4"})]})}function jpe(e={}){const{wrapper:t}=Object.assign({},wi(),e.components);return t?u.jsx(t,Object.assign({},e,{children:u.jsx(wR,e)})):wR(e)}function ER(e){const t=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",h2:"h2"},wi(),e.components);return u.jsxs(u.Fragment,{children:[u.jsx(t.h1,{children:"Launcher"}),`
314`,u.jsx(t.p,{children:`Aero Launch is the easiest way for anybody to set up a liquidity market for
315their token.`}),`
316`,u.jsx(t.p,{children:"The flow guides through every step of"}),`
317`,u.jsxs(t.ul,{children:[`
318`,u.jsx(t.li,{children:"creating the right pool type"}),`
319`,u.jsx(t.li,{children:"pairing with curated tokens for the best distribution"}),`
320`,u.jsx(t.li,{children:"pricing and setting up the correct price range"}),`
321`,u.jsx(t.li,{children:"understanding the impact of price and supply on market cap"}),`
322`,u.jsx(t.li,{children:"locking liquidity and staking"}),`
323`]}),`
324`,u.jsx("div",{id:"locking"}),`
325`,u.jsx(t.h2,{children:"Locking"}),`
326`,u.jsx(t.p,{children:`Liquidity launched and locked with Aero Launch will display on the dashboard
327like any other deposit.`}),`
328`,u.jsx(t.p,{children:`Locked deposits allow for additional liquidity to be added, but do not allow
329changes to the price range or withdrawals.`}),`
330`,u.jsx(t.p,{children:"Locked deposits can be staked and unstaked if staking rewards are available."}),`
331`,u.jsx(t.p,{children:`Locked deposits allow a share of the accrued fees or rewards to be used for
332incentives. The owner of the deposit will see an option to incentivize with
333these from their dashboard. These incentives can be added only to the liquidity
334pool where the fees or rewards come from.`}),`
335`,u.jsx(t.p,{children:`Once the expiration date is reached, the deposit can be unlocked by the owner
336and managed just like a regular deposit.`}),`
337`,u.jsx("div",{id:"emerging-liquidity"}),`
338`,u.jsx(t.h2,{children:"Emerging Liquidity"}),`
339`,u.jsx(t.p,{children:`New launches may appear as "emerging." This highlight is discretionary and helps
340differentiate these launches from other pools and tokens.`}),`
341`,u.jsx(t.p,{children:`Emerging tokens will display differently with a unique indicator for those who swap, vote and generally interact
342across the liquidity screens.`}),`
343`,u.jsx(t.p,{children:`Emerging tokens can graduate seamlessly to receive staking rewards without any
344additional migration.`}),`
345`,u.jsx(t.p,{children:`Graduation to staking rewards does not unlock or change
346any underlying deposits.`}),`
347`,u.jsx("div",{id:"fees"}),`
348`,u.jsx(t.h2,{children:"Fees"}),`
349`,u.jsx(t.p,{children:"Aero Launch charges no fees and is completely permissionless."}),`
350`,u.jsx(t.p,{children:`Other products launching and locking liquidity on behalf of a deposit owner
351can designate a referral/beneficiary to receive a share of fees or staking
352rewards.`}),`
353`,u.jsx(t.p,{children:`The fees or staking rewards can be claimed any time as soon as they accrue.
354If there's a referral/beneficiary share set, the fees or staking rewards will be calculated and
355redirected at claim time automatically.`})]})}function Ppe(e={}){const{wrapper:t}=Object.assign({},wi(),e.components);return t?u.jsx(t,Object.assign({},e,{children:u.jsx(ER,e)})):ER(e)}function _R(e){const t=Object.assign({h1:"h1",p:"p",em:"em",ul:"ul",li:"li",h2:"h2",h3:"h3",ol:"ol",strong:"strong",a:"a"},wi(),e.components);return u.jsxs(u.Fragment,{children:[u.jsx(t.h1,{children:"Legal Disclaimer"}),`
356`,u.jsx(t.p,{children:u.jsx(t.em,{children:"Last updated on July 28, 2026"})}),`
357`,u.jsx(t.p,{children:'Please read this disclaimer carefully before using https://aerodrome.finance or any website mirrors, such as https://aerodrome.box, https://aero.drome.eth, https://aero.drome.eth.limo, and https://aero.drome.eth.link (hereinafter referred to as the "Website", and the services offered therein as "Our Services").'}),`
358`,u.jsx(t.p,{children:'The terms of use of the Website contained herein (the "Terms of Use") are entered into by and between the Website user ("You") and Aerodrome Foundation (hereinafter referred to as the "Foundation" or "We/Our/Us"). These Terms of Use explain the terms and conditions by which you may access and use Our Services.'}),`
359`,u.jsx(t.p,{children:"By using the Website and clicking past this legal disclaimer page, You confirm that You accept this legal disclaimer and the Terms of Use, and agree to comply with both (the “Agreement”). If You do not agree, You must not use the Website or Our Services."}),`
360`,u.jsx(t.p,{children:"You further represent and warrant that You:"}),`
361`,u.jsxs(t.ul,{children:[`
362`,u.jsx(t.li,{children:"(a) are of legal age to form a binding contract;"}),`
363`,u.jsx(t.li,{children:"(b) have not been previously suspended or removed from using Our Services; and"}),`
364`,u.jsx(t.li,{children:"(c) have full power and authority to enter into this Agreement with Foundation, and in doing so will not violate any other agreement to which You are a party."}),`
365`]}),`
366`,u.jsx(t.p,{children:"If You are registering to use Our Services on behalf of a legal entity, You further represent and warrant that:"}),`
367`,u.jsxs(t.ul,{children:[`
368`,u.jsx(t.li,{children:"(a) such legal entity is duly organized and validly existing under the applicable laws of the jurisdiction of its organization, and"}),`
369`,u.jsx(t.li,{children:"(b) You are duly authorized by such legal entity to act on its behalf."}),`
370`]}),`
371`,u.jsx(t.p,{children:"You further represent and warrant that You will fully comply with all applicable laws and regulations, and that You will not access or use any of Our Services or Our Website to conduct, promote, or otherwise facilitate any illegal activity."}),`
372`,u.jsx(t.p,{children:"NOTICE: This Agreement contains important information, including a binding arbitration provision and a class action waiver, both of which impact your rights as to how disputes are resolved, and the applicability and legality of which will be determined by an arbitrator in the first instance. Our Services and Our Website are only available to You — and You should only access any of Our Services or Our Website if You agree completely with these terms."}),`
373`,u.jsx(t.h2,{children:"Our Services"}),`
374`,u.jsx(t.p,{children:'Our Website (and Our Services) provides a web or mobile-based means of access to a decentralized protocol on various public blockchains, including but not limited to Ethereum and Layer 2 blockchains built on top of Ethereum, that allows users to trade certain compatible digital assets (the "Protocol").'}),`
375`,u.jsx(t.p,{children:"Our Website and Our Services are distinct from the Protocol and are one, but not the exclusive, means of accessing the Protocol. The Protocol itself is comprised of self-executing smart contracts that are deployed on various public blockchains, such as Ethereum and Layer 2 blockchains built on top of Ethereum. We do not control or operate the Protocol. It is impossible for anyone to control or operate the immutable smart contracts that make up core aspects of the Protocol. By using the Website or Our Services, you understand that you are not buying or selling digital assets from Us and that We do not operate any liquidity pools on the Protocol or control trade execution on the Protocol. When traders pay fees for trades, those fees accrue to voters and/or liquidity providers. In addition, We are not a liquidity provider into Protocol liquidity pools and liquidity providers are independent third parties. We are not a party to any transactions undertaken by you using the Protocol and We never take possession, custody or control over your digital assets."}),`
376`,u.jsx(t.p,{children:"We may modify, substitute, discontinue, or add to Our Website, Our Services, and the activities we undertake in connection with the Protocol and its underlying self-executing smart contracts from time to time, for any reason, in Our sole discretion and without notice to You. Under this Agreement, You acknowledge Our right to modify, substitute, discontinue, or add to Our Website, Our Services, and the activities we undertake in connection with the Protocol and its underlying self-executing smart contracts, and acknowledge that We have no obligation to maintain or support Our Website, Our Services, or the Protocol in their current or any past state."}),`
377`,u.jsx(t.p,{children:"We reserve the right, with or without notice to you, to modify, substitute, eliminate, or add to any of Our Services."}),`
378`,u.jsx(t.p,{children:"To access Our Services, you must use a non-custodial wallet software, which allows you to interact with public blockchains. Your relationship with that non-custodial wallet provider is governed by the applicable terms of service. We do not have custody or control over the contents of your wallet and have no ability to retrieve or transfer its contents. By connecting your wallet to Our Services, you agree to be bound by this Agreement and all of the terms incorporated herein by reference."}),`
379`,u.jsx(t.h2,{children:"Information Published is Not Advice"}),`
380`,u.jsx(t.p,{children:"The information provided on the Website is for informational purposes and does not constitute investment, financial, legal, regulatory, accounting, tax or similar advice, and You should not treat any of the Website's content as such."}),`
381`,u.jsx(t.p,{children:"Further, nothing on this Website should be construed as a recommendation, by Us, Our affiliates, or any third party, to acquire or dispose of any investment, or to engage in any investment strategy or transaction. You should consult your own investment, legal, tax and/or similar professionals regarding your specific situation and any specific decisions."}),`
382`,u.jsx(t.p,{children:"Our team provides the Website as a service to the public, and is not responsible for, and expressly disclaims all liability for, damages of any kind arising out of use, reference to, or reliance on any information contained within the Website. While the information contained within the Website is periodically updated, no guarantee is given that the information provided in the Website is correct, complete, and up-to-date."}),`
383`,u.jsx(t.h2,{children:"Usage Restrictions"}),`
384`,u.jsx(t.p,{children:"By accessing or using the Website or Our Services, You hereby confirm and agree that:"}),`
385`,u.jsxs(t.ul,{children:[`
386`,u.jsx(t.li,{children:"(a) You are not currently residing in Afghanistan, Belarus, Bosnia and Herzegovina, Burundi, Central African Republic, China, Democratic Republic of Congo, Cuba, Ethiopia, Guinea, Guinea-Bissau, Haiti, Iran, Iraq, North Korea, Lebanon, Libya, Mali, Moldova, Montenegro, Myanmar, Nicaragua, Niger, Russia, Serbia, Somalia, South Sudan, Sudan, Syria, Tunisia, Turkey, Ukraine, Venezuela, Yemen, Zimbabwe, or any other specifically designated OFAC sanctions listed jurisdiction; and"}),`
387`,u.jsx(t.li,{children:"(b) Your access to and use of the Website and Our Services is lawful in your country of residence in the way You access and use them. You agree not to evade any geofencing or usage restrictions on the Website."}),`
388`,u.jsx(t.li,{children:"(c) Securities may be listed on the Website. You may only access those securities if it is legal for you to do so in your country of residence. You are responsible for researching whether it is legal for you to access any token on the Website. However, if you are a resident of the United States or United States person you may not access any unregistered security or security registered under a registration intended only for non-United States persons such as Reg S. Residents of Australia, Singapore, the United Kingdom or Canada also may not access securities."}),`
389`]}),`
390`,u.jsx(t.h2,{children:"Usage Risks"}),`
391`,u.jsx(t.p,{children:"The Website will not be responsible for any losses, damages, or claims arising from events falling within the scope of events including, but not limited to: mistakes made by the user (e.g., payments sent to wrong addresses), software problems of the Website or any related software or service (e.g., malware or unsafe cryptographic libraries), technical failures (e.g., hardware wallets malfunction), security problems experienced by the user (e.g., unauthorized access to wallets), actions or inactions of third parties (e.g., bankruptcy of service providers, information security attacks on service providers, and fraud conducted by third parties)."}),`
392`,u.jsx(t.p,{children:`To access the Website or some of the resources it offers, You may be asked to provide an Ethereum wallet address "Wallet". Our Website does not collect, or store this information.
393By using this Website and Our Services, You may gain access to and use various smart contracts that allow peer to peer transactions utilizing digital assets. We do not control any such smart contracts and have no liability or responsibility for the results of any such interactions, which occur entirely at Your own risk.`}),`
394`,u.jsx(t.h3,{children:"Securities"}),`
395`,u.jsx(t.p,{children:"We (including any affiliates) do not offer, solicit, recommend or provide investment advice with regards to any tokenized securities. Nevertheless, tokenized securities may appear on the Website. It is important that users understand that tokenized securities are still securities subject to the same laws, regulations and restrictions as non-tokenized securities. As a result, We (including any affiliates) do not issue, underwrite, custody, price, recommend, solicit, execute, settle, or determine the registration or exemption status of tokenized securities."}),`
396`,u.jsx(t.p,{children:"You must also understand that because We are not the issuers of tokenized securities, and as a result an asset may have prohibited or restricted jurisdictions and transfer restrictions that are determined by that asset's issuer. If a specific asset is not available in your region, it may be because the issuer does not allow that asset to be traded in your region. For more information, we suggest contacting the issuer of the asset. You are responsible for researching and complying with issuer restrictions. If you violate issuer restrictions, the issuer may not recognize your ownership of the underlying tokenized security."}),`
397`,u.jsx(t.p,{children:"Further, We do not offer investment advice and Our contracts are immutable and permissionless. As a result, You are responsible for doing your own due diligence and understanding that tokenized securities come in many different forms with different legal rights and regulatory structures that may impact their holders. For example, fully backed tokenized securities are distinguishable from linked securities, which are different from tokens that offer synthetic exposure to securities, or tokens that constitute security-based swaps."}),`
398`,u.jsx(t.h2,{children:"Investment Risks"}),`
399`,u.jsx(t.p,{children:"Investment in cryptocurrencies involves a high degree of risk and price fluctuation, and can lead to loss of money. The information published on the Website cannot and does not guarantee that amounts invested will not be lost."}),`
400`,u.jsx(t.p,{children:"You are responsible for understanding all risks, doing your own due diligence, and making your own decision on how to interface with the Website and Our Services. If you interface with the Website and Our Services, you do so understanding that the Protocol is made up of immutable smart contracts that We do not control, that liquidity pools are permissionless to create, that We do not supply liquidity or operate liquidity pools, and that, as a result, when you interact with tokens on the Protocol you are interacting with and relying on third parties who do supply liquidity and operate liquidity pools. You also acknowledge that the Protocol may change over time and may be disabled, disrupted, or adversely impacted as a result of a variety of factors including sophisticated cyber-attacks, surges in activity levels, declines in activity levels, code vulnerabilities, and/or other operational or technical challenges, among other things. We disclaim any ongoing obligation to notify you of all the potential risks of using and accessing our Services or the Protocol. You agree to accept these risks and agree that you will not seek to hold Us or any Indemnified Party responsible for any consequent losses."}),`
401`,u.jsx(t.p,{children:"You are also responsible for understanding and accepting all risks related to Our role on the Protocol, which may include (but is not limited to) setting fees, may involve conflicts of interest, may involve soliciting venue integrations. You are also responsible for understanding and accepting all risks related to the limitation of Our role in the Protocol, which may include (but is not limited to) limitations in our ability to interact with the Protocol, limitations in Our ability to set objective parameters around and within the Protocol, limitations in our ability to institute adequate cybersecurity controls, limitations in our ability to alleviate MEV-related risks, and limitations in our ability to protect Your information."}),`
402`,u.jsx(t.h2,{children:"Compliance with Tax Obligations"}),`
403`,u.jsx(t.p,{children:"The users of the Website are solely responsible for determining what, if any, taxes apply to their cryptocurrency holdings. The owners of, or contributors to, the Website are NOT responsible for determining the taxes that apply to user transactions."}),`
404`,u.jsx(t.h2,{children:"No Warranties"}),`
405`,u.jsx(t.p,{children:'The Website is provided on an "as is" basis without any warranties of any kind, either express or implied, including, without limitation, implied warranties of merchantability, fitness for a particular purpose, non-infringement, or that availability, accessibility, or use of the Website and/or any content, data, materials or services provided hereon will be uninterrupted or error-free.'}),`
406`,u.jsx(t.p,{children:"Website functionality is not guaranteed and could be disabled fully or in part without prior notice."}),`
407`,u.jsx(t.p,{children:"You agree and understand that: (a) all trades You submit through any of Our Services or the Website are considered unsolicited, which means that they are solely initiated by You; (b) You have not received any investment advice from Us in connection with any transactions; and (c) We do not conduct a suitability review of any transactions."}),`
408`,u.jsx(t.h2,{children:"Security"}),`
409`,u.jsx(t.p,{children:"Security audits don't eliminate risks completely. The Website and Our Services are not guaranteed to be secure or free from bugs or viruses."}),`
410`,u.jsx(t.p,{children:"Our Services and the Website are purely non-custodial, meaning We do not ever have custody, possession, or control of your digital assets at any time. It further means You are solely responsible for the custody of the cryptographic private keys to the digital asset wallets You hold and You should never share your wallet credentials or seed phrase with anyone. We accept no responsibility for, or liability to You, in connection with Your use of a wallet and make no representations or warranties regarding how any of Our Products will operate with any specific wallet. Likewise, You are solely responsible for any associated wallet and We are not liable for any acts or omissions by You in connection with or as a result of Your wallet being compromised."}),`
411`,u.jsx(t.h2,{children:"Prohibited Activities"}),`
412`,u.jsx(t.p,{children:"You agree not to engage in, or attempt to engage in, any of the following categories of prohibited activity in relation to Your use of Our Services or Website:"}),`
413`,u.jsxs(t.ul,{children:[`
414`,u.jsx(t.li,{children:"Intellectual Property Infringement. Activity that infringes on or violates any copyright, trademark, service mark, patent, right of publicity, right of privacy, or other proprietary or intellectual property rights under the law."}),`
415`,u.jsx(t.li,{children:"Cyberattack. Activity that seeks to interfere with or compromise the integrity, security, or proper functioning of any computer, server, network, personal device, or other information technology system, including, but not limited to, the deployment of viruses and denial of service attacks."}),`
416`,u.jsx(t.li,{children:"Fraud and Misrepresentation. Activity that seeks to defraud us or any other person or entity, including, but not limited to, providing any false, inaccurate, or misleading information in order to unlawfully obtain the property of another."}),`
417`,u.jsx(t.li,{children:'Market Manipulation. Activity that violates any applicable law, rule, or regulation concerning the integrity of trading markets, including, but not limited to, the manipulative tactics commonly known as "rug pulls", pumping and dumping, and wash trading.'}),`
418`,u.jsx(t.li,{children:"Securities and Derivatives Violations. Activity that violates any applicable law, rule, or regulation concerning the trading of securities or derivatives, including, but not limited to, the unregistered offering of securities and the offering of leveraged and margined commodity products to retail customers in the United States."}),`
419`,u.jsx(t.li,{children:"Sale of Stolen Property. Buying, selling, or transferring of stolen items, fraudulently obtained items, items taken without authorization, and/or any other illegally obtained items."}),`
420`,u.jsx(t.li,{children:"Data Mining or Scraping. Activity that involves data mining, robots, scraping, or similar data gathering or extraction methods of content or information from any of our Products."}),`
421`,u.jsx(t.li,{children:"Any Other Unlawful Conduct. Activity that violates any applicable law, rule, or regulation of the United States or another relevant jurisdiction, including, but not limited to, the restrictions and regulatory requirements imposed by U.S. law."}),`
422`]}),`
423`,u.jsx(t.h2,{children:"Limitation of Liability"}),`
424`,u.jsxs(t.ol,{children:[`
425`,u.jsx(t.li,{children:"As far as the law allows, neither We nor Our affiliates or service providers will be liable to You for any: (1) financial losses; (2) loss of use, data, business or profits; or (3) indirect, special, consequential, exemplary, punitive, or any other damages arising out of or relating to the Services or these Terms of Use."}),`
426`,u.jsx(t.li,{children:"You acknowledge that the limitations of liability in this section are material provisions of these Terms of Use, and that absent those limitations of liability, We would have declined to enter into the Terms of Use on the economic and other terms stated in it."}),`
427`,u.jsxs(t.li,{children:["To the extent not expressly prohibited by law, You knowingly, voluntarily, intentionally, permanently, and irrevocably:",`
428`,u.jsxs(t.ol,{children:[`
429`,u.jsx(t.li,{children:"AGREE that the rights and obligations that arise out of or relate to the Services, or any transaction or relationship resulting from the Services or these Terms of Use, are to be defined solely under the law of contract in accordance with the express provisions of these Terms of Use;"}),`
430`,u.jsx(t.li,{children:"AGREE that neither We nor Our affiliates or service providers owe any obligations under these Terms of Use that are not expressly stated in these Terms of Use, and WAIVE any claim based on any obligation allegedly owed by Us or Our affiliates or service providers that is not expressly stated in these Terms of Use, whether those obligations are alleged to arise in (for example) quasi-contract, quantum merit, unjust enrichment, promissory estoppel, tort, strict liability, or otherwise, or under any constitution, statute, or regulation;"}),`
431`,u.jsx(t.li,{children:"WAIVE any objections to or claims arising out of any modification of Our Website, Our Services, or the Protocol and its underlying self-executing smart contracts, whether those objections or claims are alleged to arise in (for example) quasi-contract, quantum merit, unjust enrichment, promissory estoppel, tort, strict liability, or otherwise, or under any constitution, statute, or regulation."}),`
432`]}),`
433`]}),`
434`,u.jsxs(t.li,{children:["You specifically agree that each limitation of liability in this section is to apply:",`
435`,u.jsxs(t.ol,{children:[`
436`,u.jsx(t.li,{children:"to You and to any of Your affiliates, agents, and associated individuals;"}),`
437`,u.jsx(t.li,{children:"to all claims for damages or other monetary relief, whether alleged to arise in contract, tort (including for example negligence, gross negligence, or willful misconduct), or otherwise;"}),`
438`,u.jsx(t.li,{children:"regardless of whether the damages are alleged to arise in contract, negligence, gross negligence, other tort, willful misconduct, or otherwise;"}),`
439`,u.jsx(t.li,{children:"even if the allegedly-liable party was advised, knew, or had reason to know of the possibility of excluded damages and/or of damages in excess of the relevant damages cap, if any; and"}),`
440`,u.jsx(t.li,{children:"even if one or more limited remedies fail of their respective essential purposes."}),`
441`]}),`
442`]}),`
443`,u.jsx(t.li,{children:"Except as expressly stated otherwise in the Agreement: Our and Our affiliates or service providers cumulative total liability to You for any action arising out of use of Our Services or the Website is not to exceed one hundred US Dollars ($100.00 USD)."}),`
444`,u.jsx(t.li,{children:"You expressly agree not to seek damages in excess of any applicable limitation of liability stated in these Terms of Use."}),`
445`,u.jsx(t.li,{children:"You acknowledge that some jurisdictions might not permit limitation or exclusion of remedies under some circumstances, in which case some or all of the limitations of liability stated in this section might not apply; this sentence, though, is not to be taken as a concession that any particular limitation or exclusion should not apply. In the event any limitation of liability is found not to apply it shall be severed and the other limitations of liability shall still apply."}),`
446`,u.jsx(t.li,{children:"You agree that You will defend, indemnify and hold harmless Us and Our affiliates, licensors and service providers, and Our and their respective officers, directors, employees, contractors, agents, licensors, suppliers, successors and assigns from and against any claims, liabilities, damages, judgments, awards, losses, costs, expenses or fees (including reasonable attorneys’ fees) arising out of or relating to Your violation of these Terms or Your use of the Services."}),`
447`,u.jsx(t.li,{children:"You agree that this Agreement is not intended to, and does not, create or impose any fiduciary duties on Us. To the fullest extent permitted by law, You acknowledge and agree that We owe no fiduciary duties or liabilities to You or any other party, and that to the extent any such duties or liabilities may exist at law or in equity, those duties and liabilities are hereby irrevocably disclaimed, waived, and eliminated. You further agree that the only duties and obligations that We owe You are those set out expressly in this Agreement."}),`
448`]}),`
449`,u.jsx(t.h2,{children:"Arbitration"}),`
450`,u.jsx(t.p,{children:"Except for disputes related to copyrights, logos, trademarks, trade names, trade secrets or patents, any dispute, controversy or claim, whether brought by You or Us, arising out of, relating to, or in connection with your use of the Website or Our Services, or in connection with these Terms of Use, including disputes arising from or concerning their interpretation, violation, invalidity, non-performance, or termination, shall be finally resolved by binding arbitration by the Judicial Arbitration and Mediation Services (JAMS) pursuant to its Comprehensive Arbitration Rules and Procedures. The tribunal shall have the power to rule on any challenge to its own jurisdiction or to the validity or enforceability of any portion of the agreement to arbitrate."}),`
451`,u.jsx(t.p,{children:u.jsx(t.strong,{children:"The parties agree to arbitrate solely on an individual basis, and that these Terms of Use do not permit class arbitration or any claims brought as a plaintiff or class member in any class or representative arbitration proceeding."})}),`
452`,u.jsx(t.p,{children:"The arbitral tribunal may not consolidate more than one person’s claims and may not otherwise preside over any form of a representative or class proceeding. In the event the prohibition on class arbitration is deemed invalid or unenforceable, then the remaining portions of this agreement to arbitrate will remain in force."}),`
453`,u.jsx(t.h2,{children:"Changes"}),`
454`,u.jsx(t.p,{children:"We may revise and update the Terms of Use in this Legal Disclaimer from time to time in Our sole discretion and without notice. All changes are effective immediately when We post them and apply to all access to and use of the Website thereafter. Your continued use of the Website following the posting of revised Terms of Use means that You accept and agree to the changes. You are expected to check this page from time to time so You are aware of any changes, as they are binding on You."}),`
455`,u.jsx(t.h2,{children:"Third-Party Services and Content"}),`
456`,u.jsx(t.p,{children:'In using this Website, You may view content or utilize services provided by third parties ("Third Parties"), including links to Web pages and services of such parties ("Third-Party Content"). We do not control, endorse, or adopt any Third-Party Content and will have no responsibility for Third-Party Content, including, without limitation, material that may be misleading, incomplete, erroneous, offensive, indecent, or otherwise objectionable in your jurisdiction. Your business dealings and/or correspondence with such Third Parties is a matter solely between You and the Third Parties. We are not liable or responsible for any loss or damage of any sort incurred as a result of such dealings and You understand that Your use of Third-Party Content, and your interactions with Third Parties, including, but not limited to wallet providers and automated liquidity management providers, is at your own risk.'}),`
457`,u.jsx(t.p,{children:"You may have questions regarding Wallet integration with Our Services:"}),`
458`,u.jsxs(t.ul,{children:[`
459`,u.jsxs(t.li,{children:["For WalletConnect, please consult ",u.jsx(t.a,{href:"https://walletconnect.com/privacy",children:"their privacy policy"})]}),`
460`,u.jsxs(t.li,{children:["For Coinbase Wallet, please consult ",u.jsx(t.a,{href:"https://www.coinbase.com/legal/",children:"their legal agreements"})]}),`
461`,u.jsxs(t.li,{children:["For (Gnosis) Safe, please consult ",u.jsx(t.a,{href:"https://safe.global/privacy",children:"their privacy policy"})]}),`
462`]}),`
463`,u.jsx(t.h2,{children:"Intellectual Property Rights"}),`
464`,u.jsx(t.p,{children:"The Website and its entire contents, features, and functionality (including but not limited to all information, software, text, displays, images, video, and audio, and the design, selection, and arrangement thereof) are owned by the Foundation and its licensors and affiliates, and are protected by United States and international copyright, trademark, trade dress, patent, trade secret, and other intellectual property or proprietary rights laws."}),`
465`,u.jsx(t.p,{children:"The Foundation name and all related names, logos, product and service names, designs, and slogans are trademarks of the Foundation or its licensors or affiliates. Moreover, all intellectual property rights associated with Third Parties and Third-Party Content referenced on or offered through the Website are owned by the respective entities offering such services."}),`
466`,u.jsx(t.p,{children:"You agree not to use any Foundation or Third Party intellectual property without prior written permission from Foundation or such Third Party. You are herein granted a limited, revocable, and nonexclusive right to post excerpts from or create a hyperlink to the Website, provided that full and clear credit is given to Us with appropriate and specific direction to the original content, and provided such hyperlink is not related to any portrayal of the Foundation or the Website in any false, misleading, derogatory, or otherwise offensive manner."})]})}function Ope(e={}){const{wrapper:t}=Object.assign({},wi(),e.components);return t?u.jsx(t,Object.assign({},e,{children:u.jsx(_R,e)})):_R(e)}function SR(e){const t=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",em:"em",code:"code",h2:"h2",blockquote:"blockquote",strong:"strong"},wi(),e.components);return u.jsxs(u.Fragment,{children:[u.jsx(t.h1,{children:"Liquidity Pools"}),`
467`,u.jsx(t.p,{children:`The core functionality of Aerodrome Finance is to allow users to exchange
468tokens in a secure way, with low fees and low slippage.`}),`
469`,u.jsx(t.p,{children:`Slippage is the difference between the current market price of a token and the
470price at which the actual exchange/swap is executed. This difference could
471result in a smaller amount (higher price paid) or a higher amount (smaller
472price paid) of desired tokens returned from a swap.`}),`
473`,u.jsx(t.p,{children:`To provide access to the best rates on the market, we identified two types of
474tokens:`}),`
475`,u.jsxs(t.ul,{children:[`
476`,u.jsxs(t.li,{children:["correlated - for example ",u.jsx(t.em,{children:"stable coins"})," (",u.jsx(t.code,{children:"$USDC"}),", ",u.jsx(t.code,{children:"$DAI"}),", etc.)"]}),`
477`,u.jsxs(t.li,{children:["uncorrelated - for example ",u.jsx(t.code,{children:"$AERO"})," and ",u.jsx(t.code,{children:"$BTC"})]}),`
478`]}),`
479`,u.jsxs(t.p,{children:["Aerodrome Finance offers two different liquidity pool types based on token pair needs, ",u.jsx(t.em,{children:`Stable
480Pools`})," and ",u.jsx(t.em,{children:"Volatile Pools"}),". Aerodrome supports custom factories, so that new pool types can always be integrated."]}),`
481`,u.jsxs(t.p,{children:[`The protocol router evaluates both pool types to determine the most efficient price quotation
482and trade execution route available. To protect against flashloan attacks, the router will use
48330-minute TWAPs (time-weighted average prices). The router doesn't require `,u.jsx(t.em,{children:"upkeep"})," (external maintenance)."]}),`
484`,u.jsxs(t.p,{children:["The ",u.jsx(t.em,{children:"deeper"})," the liquidity of a given pool (higher value locked), the smaller the slippage it will offer."]}),`
485`,u.jsx(t.h2,{children:"Stable Pools"}),`
486`,u.jsx(t.p,{children:`Stable pools are designed for tokens which have little to no
487volatility. This means that the formula used for pricing the tokens allows for
488low slippage even on large traded volumes.`}),`
489`,u.jsxs(t.blockquote,{children:[`
490`,u.jsx(t.p,{children:"x³y + y³x ≥ k"}),`
491`]}),`
492`,u.jsx(t.h2,{children:"Volatile Pools"}),`
493`,u.jsx(t.p,{children:`Volatile pools are designed for tokens with high price volatility.
494These pools use a generic AMM formula.`}),`
495`,u.jsxs(t.blockquote,{children:[`
496`,u.jsx(t.p,{children:"x × y ≥ k"}),`
497`]}),`
498`,u.jsx(t.h2,{children:"A visual representation of the formulas"}),`
499`,u.jsx(t.p,{children:"The mathematical formulas are used to keep the total pool liquidity the same at all times."}),`
500`,u.jsx(t.p,{children:`Below, you can find a visual comparison between the stable (red) and volatile (blue)
501AMM pricing equations, where:`}),`
502`,u.jsxs(t.ul,{children:[`
503`,u.jsxs(t.li,{children:[u.jsx(t.code,{children:"x"})," is the amount of first token in the pool"]}),`
504`,u.jsxs(t.li,{children:[u.jsx(t.code,{children:"y"})," is the amount of second token in the same pool"]}),`
505`,u.jsxs(t.li,{children:[u.jsx(t.code,{children:"k"})," is a fixed constant"]}),`
506`]}),`
507`,u.jsx($f,{src:"/svg/docs/graph-liquidity.svg",className:"w-full max-w-full h-auto mt-4"}),`
508`,u.jsx(t.h2,{children:"Concentrated Pools"}),`
509`,u.jsx(t.p,{children:`Concentrated liquidity pools require the liquidity
510to be deposited within a specific price range and uses ticks (equally
511spaced price points) to define the range boundaries. The identifiers
512for these pools reflect their tick space. These pools require
513maintenance or automated liquidity management (ALM).`}),`
514`,u.jsx(t.h2,{children:"Concentrated Liquidity Tick Spacing"}),`
515`,u.jsxs(t.p,{children:["In Aerodrome's concentrated liquidity pools, the concept of ",u.jsx(t.strong,{children:"tick spacing"}),` is used.
516This refers to the minimum price movement between liquidity ranges.`]}),`
517`,u.jsx(t.p,{children:"Stable token pools use a price range boundary of 0.5% (tick space 50) for tokens like USDC, DAI, LUSD."}),`
518`,u.jsx(t.p,{children:"Volatile token pools use a price range boundary of 2% (tick space 200) for tokens like OP and WETH."}),`
519`,u.jsx(t.p,{children:`For highly correlated tokens like stable coins and liquid staked tokens,
520a price range boundary of 0.01% (tick space 1) is available.`}),`
521`,u.jsx(t.p,{children:`For emerging tokens like AERO and VELO, a price range boundary of 20% (tick space 2000)
522is available to reduce liquidity pool re-balance needs.`}),`
523`,u.jsx(t.p,{children:"Concentrated liquidity pools explain what they are in their symbol:"}),`
524`,u.jsxs(t.blockquote,{children:[`
525`,u.jsx(t.p,{children:"CL1-wstETH/WETH"}),`
526`]}),`
527`,u.jsx(t.p,{children:`CL1 says that this is a concentrated pool with 1 tick spacing,
528suggesting the pool token prices are closely correlated.`}),`
529`,u.jsx(t.h2,{children:"Concentrated Liquidity Pool Fees"}),`
530`,u.jsx(t.p,{children:`Pool swap fees are redesigned to be adjusted independently from the pool type.
531Fees can now reflect partner protocols needs and can be adjusted based on the market's volatility.
532To reduce operational overhead, we are working on a dynamic fee module that will adjust itself on demand.`}),`
533`,u.jsx(t.h2,{children:"Staking APRs"}),`
534`,u.jsx(t.p,{children:`The Annual Percentage Rate (APR) for liquidity pools is calculated
535differently for basic and concentrated pools when staking is available.`}),`
536`,u.jsx(t.p,{children:"For basic pools, the APR is calculated using the total staked liquidity."}),`
537`,u.jsx(t.p,{children:`For concentrated pools, the APR is calculated using the total staked liquidity
538within the pool current price range (active tick) and the surrounding (above
539and below) price ranges (+/-1 tick from current tick).`}),`
540`,u.jsx(t.h2,{children:"Fee APRs"}),`
541`,u.jsx(t.p,{children:`Fee APRs for pools with staking available are based on the accrued swap fee
542amounts for the ongoing epoch (7 days).`}),`
543`,u.jsx(t.p,{children:`For the pools where staking is not available, the APRs are calculated as
544averages for the entire pool lifetime and total accrued swap fees in the same
545time.`})]})}function Lpe(e={}){const{wrapper:t}=Object.assign({},wi(),e.components);return t?u.jsx(t,Object.assign({},e,{children:u.jsx(SR,e)})):SR(e)}function TR(e){const t=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",div:"div",h3:"h3",strong:"strong"},wi(),e.components);return u.jsxs(u.Fragment,{children:[u.jsx(t.h1,{children:"Relay"}),`
546`,u.jsx(t.p,{children:"Relay was designed to automate the process of managing veNFTs:"}),`
547`,u.jsxs(t.ul,{children:[`
548`,u.jsx(t.li,{children:"users deposit their veNFTs into the available Relay strategy"}),`
549`,u.jsx(t.li,{children:"all the voting and claiming is optimally done by the strategy automation"}),`
550`,u.jsx(t.li,{children:`rewards are converted into the strategy asset or compounded back increasing
551the deposited veNFT balance, all as part of the automation!`}),`
552`]}),`
553`,u.jsx(t.div,{className:"text-amber bg-amber/10 p-4 rounded-xl",children:"Depositing into a strategy will extend your veNFT unlock date to maximum!"}),`
554`,u.jsx(t.p,{children:`Withdrawal of the veNFTs is possible only after the first week. Please make
555sure the automation was run before you withdraw, the latest update date
556should be recent.`}),`
557`,u.jsx(t.h3,{children:"Compounders"}),`
558`,u.jsx(t.p,{children:`Compounding strategies are designed to claim all the rebase and the voting
559rewards. The rewards are converted and locked back into the veNFT balances.`}),`
560`,u.jsx(t.p,{children:"This strategy was designed for users who want to increase their voting power!"}),`
561`,u.jsx(t.h3,{children:"Convertors"}),`
562`,u.jsx(t.p,{children:`Convertor strategies are designed to claim all the rebases and the voting
563rewards. While the rebases are compounded back into the veNFTs, the rewards
564are converted into the strategy asset (eg. USDC, OP, ETH) and are shown
565for every depositor when available for claiming.`}),`
566`,u.jsx(t.h3,{children:"Relays run by the Protocol"}),`
567`,u.jsxs(t.p,{children:["The ",u.jsx(t.strong,{children:"veAERO MAXI"})," Relay is a compounder strategy that does the following:"]}),`
568`,u.jsxs(t.ul,{children:[`
569`,u.jsx(t.li,{children:"Votes to optimally achieve the maximum rewards available"}),`
570`,u.jsx(t.li,{children:"Claims the rebase"}),`
571`,u.jsx(t.li,{children:"Claims & converts rewards into Aero"}),`
572`,u.jsx(t.li,{children:"Locks all converted Aero increasing the locked amount of those who deposited into the Relay"}),`
573`]}),`
574`,u.jsx(t.h3,{children:"Relays run by or for the Protocol Partners"}),`
575`,u.jsx(t.p,{children:`These Relay strategies are either run by or for the protocol partners,
576usually other protocols with the goal of supporting the partner liquidity pools.`}),`
577`,u.jsx(t.p,{children:`These strategies generally vote to support their own liquidity and
578thus those who deposit into those pools.`}),`
579`,u.jsx(t.p,{children:`In comparison to the veAERO Maxi, these relays will likely achieve smaller rewards,
580but more consistent rewards for their pools.`}),`
581`,u.jsx(t.p,{children:`Partner protocols can request a Relay strategy, this will soon require an open governance
582proposal to be voted and passed by the veAERO voters.`}),`
583`,u.jsx(t.p,{children:"Compounder strategy:"}),`
584`,u.jsxs(t.ul,{children:[`
585`,u.jsx(t.li,{children:"Votes on the partners chosen pool to direct emissions"}),`
586`,u.jsx(t.li,{children:"Claims the rebase"}),`
587`,u.jsx(t.li,{children:"Claims & converts rewards into Aero"}),`
588`,u.jsx(t.li,{children:"Locks all converted Aero increasing the locked amount of the partners veNFT Relay position"}),`
589`]}),`
590`,u.jsx(t.h3,{children:"Architecture"}),`
591`,u.jsx(t.p,{children:`The strategies are simple smart contracts that operate a specially managed
592veNFT, also known as (m)veNFT.`}),`
593`,u.jsx(t.p,{children:`The (m)veNFTs can be minted or deactivated by the protocol Governor and carry
594no voting power initially, instead, these aggregate the voting power of any
595regular deposited veNFTs. Once withdrawn, the regular veNFTs receive a share of
596the aggregated voting power and the unlock date is set to maximum.`}),`
597`,u.jsx(t.p,{children:`Owners of these (m)veNFTs can vote, claim rebases and collect rewards. That is
598why these are usually granted to protocols or managers of the Relay strategies.`}),`
599`,u.jsx(t.p,{children:`In case of an issue with one of the (m)veNFTs, these get deactivated and the
600depositors will have to withdraw safely their veNFTs.`}),`
601`,u.jsx(t.p,{children:`Relay was designed to solve the partner protocol needs and provide a flexible
602way to build strategies on top of (m)veNFTs. Relay strategies are automated and
603operated by a decentralized network, with the exception of the voting, which is
604handled by the (m)veNFT managers.`}),`
605`,u.jsx(t.h3,{children:"Governance"}),`
606`,u.jsx(t.p,{children:`The depositors are still able to exercise their governance voting power. The
607Governor will report the up-to-date locked amount of the veNFTs managed by a
608Relay strategy.`})]})}function Bpe(e={}){const{wrapper:t}=Object.assign({},wi(),e.components);return t?u.jsx(t,Object.assign({},e,{children:u.jsx(TR,e)})):TR(e)}function AR(e){const t=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",strong:"strong",code:"code",ul:"ul",li:"li",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td"},wi(),e.components);return u.jsxs(u.Fragment,{children:[u.jsx(t.h1,{children:"Security Overview"}),`
609`,u.jsx(t.p,{children:`Aerodrome Finance inherits the contract architecture and full security
610maintenance from Velodrome V2. Velodrome V2 has been audited and runs a
611bug-bounty program.`}),`
612`,u.jsxs(t.p,{children:[`To review the current state of the smart-contracts and the bug bounty program,
613please refer to the `,u.jsx(t.a,{href:"https://velodrome.finance/security",children:"Velodrome security page"}),"."]}),`
614`,u.jsxs(t.p,{children:["For security reports, please reach out to us on ",u.jsx(t.a,{href:"https://discord.gg/aerodrome",children:"Discord"}),`,
615or to the contacts provided on our Github page.`]}),`
616`,u.jsx("div",{id:"emergency"}),`
617`,u.jsx(t.h2,{children:"Emergency Council, Foundations and Public Goods Fund"}),`
618`,u.jsx(t.p,{children:`To support the health of the protocol and ecosystem, there is a Council
619consisting of members from the Aerodrome team and prominent figures from within
620the Optimism and Base community.`}),`
621`,u.jsx(t.p,{children:`The Council can be spawned in case of emergency situations or by passing
622a governance proposal that requires the council's help to be executed.`}),`
623`,u.jsxs(t.p,{children:["The Council address is at ",u.jsx(t.strong,{children:u.jsx(t.code,{children:"0x99249b10593fCa1Ae9DAE6D4819F1A6dae5C013D"})})," and it:"]}),`
624`,u.jsxs(t.ul,{children:[`
625`,u.jsxs(t.li,{children:["can set a new ",u.jsx(t.code,{children:"emergencyCouncil"})]}),`
626`,u.jsx(t.li,{children:"can kill a gauge"}),`
627`,u.jsx(t.li,{children:"can revive a gauge"}),`
628`,u.jsx(t.li,{children:"can set a custom name or symbol for a pool"}),`
629`,u.jsx(t.li,{children:"can activate or deactivate (m)veNFTs (superseded by the governance once enabled)"}),`
630`]}),`
631`,u.jsx(t.p,{children:"Important multisigs:"}),`
632`,u.jsxs(t.ul,{children:[`
633`,u.jsxs(t.li,{children:[u.jsx(t.code,{children:"0xBDE0c70BdC242577c52dFAD53389F82fd149EA5a"})," - Aerodrome Foundation and Incentives"]}),`
634`,u.jsxs(t.li,{children:[u.jsx(t.code,{children:"0x834C0DA026d5F933C2c18Fa9F8Ba7f1f792fDa52"})," - Public Goods Fund"]}),`
635`]}),`
636`,u.jsx("div",{id:"contracts"}),`
637`,u.jsx(t.h2,{children:"Contract Addresses"}),`
638`,u.jsxs(t.table,{className:"min-w-full w-full divide-y divide-accent-10 rounded-xl overflow-hidden bg-accent-0 mb-12 font-mono",children:[u.jsx(t.thead,{children:u.jsxs(t.tr,{children:[u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50 w-2/3",children:"Contract Name"}),u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50",children:"Address"})]})}),u.jsxs(t.tbody,{className:"divide-y divide-accent-10",children:[u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"AERO"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x940181a94A35A4569E4529A3CDfB74e38FD98631",target:"_blank",children:"0x940181a94A35A4569E4529A3CDfB74e38FD98631"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"AirdropDistributor"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0xE4c69af018B2EA9e575026c0472B6531A2bC382F",target:"_blank",children:"0xE4c69af018B2EA9e575026c0472B6531A2bC382F"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"ArtProxy"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0xE9992487b2EE03b7a91241695A58E0ef3654643E",target:"_blank",children:"0xE9992487b2EE03b7a91241695A58E0ef3654643E"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"FactoryRegistry"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x5C3F18F06CC09CA1910767A34a20F771039E37C0",target:"_blank",children:"0x5C3F18F06CC09CA1910767A34a20F771039E37C0"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"Forwarder"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x15e62707FCA7352fbE35F51a8D6b0F8066A05DCc",target:"_blank",children:"0x15e62707FCA7352fbE35F51a8D6b0F8066A05DCc"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"GaugeFactory"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x35f35cA5B132CaDf2916BaB57639128eAC5bbcb5",target:"_blank",children:"0x35f35cA5B132CaDf2916BaB57639128eAC5bbcb5"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"ManagedRewardsFactory"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0xFdA1fb5A2a5B23638C7017950506a36dcFD2bDC3",target:"_blank",children:"0xFdA1fb5A2a5B23638C7017950506a36dcFD2bDC3"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"Minter"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0xeB018363F0a9Af8f91F06FEe6613a751b2A33FE5",target:"_blank",children:"0xeB018363F0a9Af8f91F06FEe6613a751b2A33FE5"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"PoolFactory"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x420DD381b31aEf6683db6B902084cB0FFECe40Da",target:"_blank",children:"0x420DD381b31aEf6683db6B902084cB0FFECe40Da"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"RewardsDistributor"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x227f65131A261548b057215bB1D5Ab2997964C7d",target:"_blank",children:"0x227f65131A261548b057215bB1D5Ab2997964C7d"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"Router"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43",target:"_blank",children:"0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"Voter"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x16613524e02ad97eDfeF371bC883F2F5d6C480A5",target:"_blank",children:"0x16613524e02ad97eDfeF371bC883F2F5d6C480A5"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"VotingEscrow"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0xeBf418Fe2512e7E6bd9b87a8F0f294aCDC67e6B4",target:"_blank",children:"0xeBf418Fe2512e7E6bd9b87a8F0f294aCDC67e6B4"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"VotingRewardsFactory"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x45cA74858C579E717ee29A86042E0d53B252B504",target:"_blank",children:"0x45cA74858C579E717ee29A86042E0d53B252B504"})})]})]})]}),`
639`,u.jsxs(t.table,{className:"min-w-full w-full divide-y divide-accent-10 rounded-xl overflow-hidden bg-accent-0 mb-12 font-mono",children:[u.jsx(t.thead,{children:u.jsxs(t.tr,{children:[u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50 w-2/3",children:"Slipstream Contract Name"}),u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50",children:"Address"})]})}),u.jsxs(t.tbody,{className:"divide-y divide-accent-10",children:[u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"GaugeFactory"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0xD30677bd8dd15132F251Cb54CbDA552d2A05Fb08",target:"_blank",children:"0xD30677bd8dd15132F251Cb54CbDA552d2A05Fb08"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"GaugeImplementation"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0xF5601F95708256A118EF5971820327F362442D2d",target:"_blank",children:"0xF5601F95708256A118EF5971820327F362442D2d"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"MixedQuoter"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x0A5aA5D3a4d28014f967Bf0f29EAA3FF9807D5c6",target:"_blank",children:"0x0A5aA5D3a4d28014f967Bf0f29EAA3FF9807D5c6"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"NonfungiblePositionManager"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x827922686190790b37229fd06084350E74485b72",target:"_blank",children:"0x827922686190790b37229fd06084350E74485b72"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"NonfungibleTokenPositionDescriptor"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x01b0CaCB9A8004e08D075c919B5dF3b59FD53c55",target:"_blank",children:"0x01b0CaCB9A8004e08D075c919B5dF3b59FD53c55"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"PoolFactory"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x5e7BB104d84c7CB9B682AaC2F3d509f5F406809A",target:"_blank",children:"0x5e7BB104d84c7CB9B682AaC2F3d509f5F406809A"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"PoolImplementation"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0xeC8E5342B19977B4eF8892e02D8DAEcfa1315831",target:"_blank",children:"0xeC8E5342B19977B4eF8892e02D8DAEcfa1315831"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"Quoter"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x254cF9E1E6e233aa1AC962CB9B05b2cfeAaE15b0",target:"_blank",children:"0x254cF9E1E6e233aa1AC962CB9B05b2cfeAaE15b0"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"SwapFeeModule"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0xF4171B0953b52Fa55462E4d76ecA1845Db69af00",target:"_blank",children:"0xF4171B0953b52Fa55462E4d76ecA1845Db69af00"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"UnstakedFeeModule"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x0AD08370c76Ff426F534bb2AFFD9b5555338ee68",target:"_blank",children:"0x0AD08370c76Ff426F534bb2AFFD9b5555338ee68"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"UniversalRouter"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x6Cb442acF35158D5eDa88fe602221b67B400Be3E",target:"_blank",children:"0x6Cb442acF35158D5eDa88fe602221b67B400Be3E"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"SwapRouter"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0xBE6D8f0d05cC4be24d5167a3eF062215bE6D18a5",target:"_blank",children:"0xBE6D8f0d05cC4be24d5167a3eF062215bE6D18a5"})})]})]})]}),`
640`,u.jsxs(t.table,{className:"min-w-full w-full divide-y divide-accent-10 rounded-xl overflow-hidden bg-accent-0 font-mono",children:[u.jsx(t.thead,{children:u.jsxs(t.tr,{children:[u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50 w-2/3",children:"Misc Contract Name"}),u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50",children:"Address"})]})}),u.jsxs(t.tbody,{className:"divide-y divide-accent-10",children:[u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"Prices Oracle"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0xee717411f6E44F9feE011835C8E6FAaC5dEfF166",target:"_blank",children:"0xee717411f6E44F9feE011835C8E6FAaC5dEfF166"})})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"SlipstreamHelper"}),u.jsx(t.td,{className:"px-6 py-4",children:u.jsx(t.a,{href:"https://basescan.org/address/0x0AD09A66af0154a84e86F761313d02d0abB6edd5",target:"_blank",children:"0x0AD09A66af0154a84e86F761313d02d0abB6edd5"})})]})]})]}),`
641`,u.jsx("div",{id:"pool-launcher"}),`
642`,u.jsx(t.h2,{children:"Pool Launcher"}),`
643`,u.jsx("a",{href:"https://mixbytes.io/",target:"_blank",rel:"noopener noreferrer",children:u.jsx($f,{src:"/partners/mixbytes.svg",className:"block max-w-48 w-full my-6"})}),`
644`,u.jsxs(t.p,{children:[`Pool Launcher was audited by MixBytes. The audit took place between
645`,u.jsx(t.strong,{children:"12th of September and 3rd of October, 2025"}),"."]}),`
646`,u.jsxs(t.ul,{children:[`
647`,u.jsx(t.li,{children:u.jsx(t.a,{href:"https://github.com/mixbytes/audits_public/tree/master/Velodrome/Pool%20Launcher",children:"MixBytes Audit"})}),`
648`,u.jsx(t.li,{children:u.jsx(t.a,{href:"https://github.com/velodrome-finance/pool-launcher",children:"Pool Launcher Codebase"})}),`
649`,u.jsx(t.li,{children:u.jsx(t.a,{href:"https://github.com/velodrome-finance/pool-launcher/tree/develop/deployment-addresses",children:"Contracts"})}),`
650`]})]})}function Fpe(e={}){const{wrapper:t}=Object.assign({},wi(),e.components);return t?u.jsx(t,Object.assign({},e,{children:u.jsx(AR,e)})):AR(e)}function kR(e){const t=Object.assign({h1:"h1",p:"p"},wi(),e.components);return u.jsxs(u.Fragment,{children:[u.jsx(t.h1,{children:"Social Media Disclaimer"}),`
651`,u.jsx(t.p,{children:"This feed, and the information contained herein, has been provided to you solely for informational purposes. Neither the information, nor any opinion contained in this feed, constitutes an offer to buy or sell, or a solicitation of an offer to buy or sell, any securities or other financial instruments or to participate in any advisory services or trading strategy. Nothing contained in this feed constitutes investment, legal or tax advice. You should make your own investigations and evaluations of the information herein. Any decisions based on information contained in this feed are the sole responsibility of the viewer. None of Aerodrome nor any of its affiliates, shareholders, partners, members, directors, officers, management, employees or representatives makes any representation or warranty, express or implied, as to the accuracy or completeness of any of the information or any other information (whether communicated in written or oral form) transmitted or made available to you. Each of the aforementioned parties expressly disclaims any and all liability relating to or resulting from the use of this information. Certain information contained herein (including financial information) may have been obtained from published and non-published sources. Such information has not been independently verified. The account owner, along with Aerodrome Foundation, may hold financial interests in certain assets referenced in this feed, and may buy or sell digital assets referenced in this feed. Aerodrome Foundation regularly engages in buying digital assets for its own proprietary accounts. Any information or analysis in this feed is based on technical, fundamental, and market considerations and do not represent a formal valuation. Certain asset classes discussed, including digital assets, may be volatile and involve risk, and actual market outcomes may differ materially from perspectives expressed here. Except where otherwise indicated, the information in this feed is based on matters as they exist as of the date of preparation and not as of any future date, and will not be updated or otherwise revised to reflect information that subsequently becomes available, or circumstances existing or changes occurring after the date hereof."})]})}function Dpe(e={}){const{wrapper:t}=Object.assign({},wi(),e.components);return t?u.jsx(t,Object.assign({},e,{children:u.jsx(kR,e)})):kR(e)}function CR(e){const t=Object.assign({h1:"h1",h2:"h2",p:"p",ul:"ul",li:"li",hr:"hr",code:"code",em:"em",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td"},wi(),e.components);return u.jsxs(u.Fragment,{children:[u.jsx(t.h1,{children:"Tokenomics"}),`
652`,u.jsx(t.h2,{children:"Value Distribution"}),`
653`,u.jsx(t.p,{children:"Aerodrome operates as a zero-leak economy, where 100% of value is distributed to contributors to the system: the veAERO token operators who co
653ordinate and optimize the flow of liquidity, and the liquidity providers who make low-slippage trades possible."}),`
654`,u.jsx(t.p,{children:"The protocol has two revenue streams:"}),`
655`,u.jsxs(t.ul,{children:[`
656`,u.jsx(t.li,{children:"100% of swap fees generated by staked liquidity + a percentage of swap fees generated by unstaked liquidity in specific emissions-eligible pools"}),`
657`,u.jsx(t.li,{children:"100% of voting incentives"}),`
658`]}),`
659`,u.jsx(t.p,{children:"Liquidity providers (LPs) on Aerodrome can choose to stake their deposit in emissions-eligible pools to earn AERO (Aerodrome's native token), or leave their deposit unstaked to earn a share of trading fees."}),`
660`,u.jsx(t.p,{children:"All protocol revenue is internalized and distributed to token operators, a diverse and global stakeholder group composed of institutional investors, protocols, retail traders, and more—any and all tokenholders are on equal footing, earning according to their participation without privilege or preference. This is an open and decentralized network anyone can join by locking AERO."}),`
661`,u.jsx(t.p,{children:"The Aerodrome Foundation, the protocol’s neutral steward, and Dromos Labs, its core contributing development company, both earn revenue through participation in this system."}),`
662`,u.jsx(t.p,{children:"The Aerodrome Foundation uses its share of revenue to grow the platform with efforts like token buybacks. Dromos Labs uses its share to fund ongoing development. To ensure long-term competitiveness, Dromos Labs is also allotted a small percentage of weekly AERO emissions (100% of which is compounded into its max-locked position)."}),`
663`,u.jsx(t.p,{children:"This token-centric economic system aligns the interests of all stakeholders—LPs, traders, and tokenholders—to help Aerodrome maintain maximum efficiency and sustainability for the long term."}),`
664`,u.jsx(t.hr,{}),`
665`,u.jsx(t.p,{children:"Aerodrome Finance uses two tokens to manage its utility and governance:"}),`
666`,u.jsxs(t.ul,{children:[`
667`,u.jsxs(t.li,{children:[u.jsx(t.code,{children:"$AERO"})," — ERC-20 utility token of the protocol"]}),`
668`,u.jsxs(t.li,{children:[u.jsx(t.code,{children:"$veAERO"}),` — ERC-721 governance token in the form of an NFT
669(non-fungible token)`]}),`
670`]}),`
671`,u.jsxs(t.p,{children:[u.jsx(t.code,{children:"$AERO"})," is distributed to liquidity providers through emissions."]}),`
672`,u.jsxs(t.p,{children:[u.jsx(t.code,{children:"$veAERO"})," is used for governance. Any ",u.jsx(t.code,{children:"$AERO"}),` holder can vote-escrow their
673tokens and receive a `,u.jsx(t.code,{children:"$veAERO"}),` (also known as Lock or veNFT) in exchange.
674Additional tokens can be added to the `,u.jsx(t.code,{children:"$veAERO"})," NFT at any time."]}),`
675`,u.jsxs(t.p,{children:["The lock period (also known as vote-escrowed period, hence the ",u.jsx(t.em,{children:"ve"}),` prefix) can
676be up to 4 years, following the linear relationship shown below:`]}),`
677`,u.jsxs(t.ul,{children:[`
678`,u.jsxs(t.li,{children:["100 ",u.jsx(t.code,{children:"$AERO"})," locked for 4 years will become 100 ",u.jsx(t.code,{children:"$veAERO"})]}),`
679`,u.jsxs(t.li,{children:["100 ",u.jsx(t.code,{children:"$AERO"})," locked for 1 year will become 25 ",u.jsx(t.code,{children:"$veAERO"})]}),`
680`]}),`
681`,u.jsx(t.p,{children:`The longer the vesting time, the higher the voting power (voting weight) of the
682underlying locked balance.`}),`
683`,u.jsx(t.p,{children:`Additionally, Aerodrome Locks (veNFTs) can be set into Auto-Max Lock, which are
684treated by the protocol as being locked for the maximum duration of 4 years,
685and their voting power does not decay. The Auto-Max Lock feature can be turned
686on and off for each Lock (veNFT).`}),`
687`,u.jsx(t.h2,{children:"Initial Distribution"}),`
688`,u.jsxs(t.table,{className:"min-w-full w-full divide-y divide-accent-10 rounded-xl overflow-hidden bg-accent-0 mb-12",children:[u.jsx(t.thead,{children:u.jsxs(t.tr,{children:[u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50 w-2/3",children:"AERO"}),u.jsx(t.th,{className:"px-6 py-3 text-right font-medium uppercase text-xs text-accent-50",children:"Amount"}),u.jsx(t.th,{className:"px-6 py-3 text-right font-medium uppercase text-xs text-accent-50",children:"Percentage"})]})}),u.jsxs(t.tbody,{className:"divide-y divide-accent-10",children:[u.jsxs(t.tr,{className:"bg-accent-5",children:[u.jsx(t.td,{className:"px-6 py-4",children:"Voter Incentives"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"40M"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"8%"})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"Genesis Liquidity Incentives"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"10M"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"2%"})]})]})]}),`
689`,u.jsxs(t.table,{className:"min-w-full w-full divide-y divide-accent-10 rounded-xl overflow-hidden bg-accent-0 mb-12",children:[u.jsx(t.thead,{children:u.jsxs(t.tr,{children:[u.jsx(t.th,{className:"px-6 py-3 text-left font-medium uppercase text-xs text-accent-50 w-2/3",children:"veAERO"}),u.jsx(t.th,{className:"px-6 py-3 text-right font-medium uppercase text-xs text-accent-50",children:"Amount"}),u.jsx(t.th,{className:"px-6 py-3 text-right font-medium uppercase text-xs text-accent-50",children:"Percentage"})]})}),u.jsxs(t.tbody,{className:"divide-y divide-accent-10",children:[u.jsxs(t.tr,{className:"bg-accent-5",children:[u.jsx(t.td,{className:"px-6 py-4",children:"Airdrop for veVELO Lockers"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"200M"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"40%"})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"Public Goods Fund (Auto Max-Locked)"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"105M"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"21%"})]}),u.jsxs(t.tr,{className:"bg-accent-5",children:[u.jsx(t.td,{className:"px-6 py-4",children:"Development Team Funding (Auto Max-Locked)"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"95M"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"19%"})]}),u.jsxs(t.tr,{children:[u.jsx(t.td,{className:"px-6 py-4",children:"Flight School (Auto Max-Locked)"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"50M"}),u.jsx(t.td,{className:"px-6 py-4 text-right",children:"10%"})]})]})]})]})}function $pe(e={}){const{wrapper:t}=Object.assign({},wi(),e.components);return t?u.jsx(t,Object.assign({},e,{children:u.jsx(CR,e)})):CR(e)}function IR(e){const t=Object.assign({h1:"h1",p:"p",h2:"h2"},wi(),e.components);return u.jsxs(u.Fragment,{children:[u.jsx(t.h1,{children:"Voting"}),`
690`,u.jsx(t.p,{children:"$veAERO holders decide which liquidity pools receive $AERO emissions. In return, voters receive 100% of the trading fees and bribes collected from the liquidity pool they vote for."}),`
691`,u.jsx(t.h2,{children:"Instructions"}),`
692`,u.jsxs(t.p,{children:["Distribute 100% of your Lock's (veNFT) vote-power among your preferred pools and Cast your vote. Repeat for each of your Locks (veNFTs). Unallocated vote-power (if ","<"," 100%) will be split proportionally among the selected pools. Each Lock (veNFT) can only cast votes once per epoch."]}),`
693`,u.jsx(t.p,{children:"If you increased your Lock's (veNFT) balance during the epoch, recast your vote to allocate your vote-power in full. Unchanged votes carry over into the next epoch."}),`
694`,u.jsx(t.h2,{children:"Timeline"}),`
695`,u.jsx(t.p,{children:"Votes for the next epoch, are due by Wednesday at 23:00 UTC, 1 hour before next epoch begins. During the following two hours, no voting operations will take place as this time is reserved for protocol operations/automations."}),`
696`,u.jsx(t.h2,{children:"Rewards"}),`
697`,u.jsx(t.p,{children:"Voting rewards for a given epoch will appear in your Dashboard after the epoch change on Thursday at 00:00 UTC. Rebase rewards for new locks will appear after the second epoch change."})]})}function Upe(e={}){const{wrapper:t}=Object.assign({},wi(),e.components);return t?u.jsx(t,Object.assign({},e,{children:u.jsx(IR,e)})):IR(e)}const{LegalContent:vD,FeesAndBribesContent:zpe,LiquidityContent:wD,TokenomicsContent:Vpe,RelayContent:v3e,SecurityContent:w3e,VotingContent:E3e,LauncherContent:_3e,AboutContent:S3e,SocialMediaDisclaimerContent:T3e}={LegalContent:Ope,FeesAndBribesContent:jpe,LiquidityContent:Lpe,TokenomicsContent:$pe,RelayContent:Bpe,SecurityContent:Fpe,VotingContent:Upe,LauncherContent:Ppe,AboutContent:Npe,SocialMediaDisclaimerContent:Dpe};function ak({open:e,onClose:t,children:n,className:r,padded:i=!0}){return u.jsxs(jF,{open:e,onClose:t,children:[u.jsx(MF,{transition:!0,className:"fixed inset-0 z-40 bg-black/80 transition duration-500 data-[closed]:opacity-0",onClick:t}),u.jsx("div",{className:"fixed inset-0 z-50 flex justify-end sm:p-4",children:u.jsxs(DA,{transition:!0,className:It("relative flex h-full w-full max-w-screen-sm flex-col bg-accent-0 shadow-2xl sm:rounded-2xl","transition duration-300 data-[closed]:translate-x-full data-[closed]:opacity-0",r),children:[u.jsx("div",{className:"absolute right-6 top-6 z-10",children:u.jsx("button",{type:"button",className:"-m-1 rounded-full p-1 transition hover:bg-accent-10 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50",onClick:t,"aria-label":"Close Drawer","data-test-id":"drawer-close-button",children:u.jsx(jg,{className:"size-5"})})}),u.jsx("div",{className:It("max-h-screen overflow-auto",i?"p-8 md:p-12":""),children:n})]})})]})}const ck={h1:e=>u.jsx("h1",{className:"mb-10 text-3xl font-semibold text-foreground",...e}),h2:e=>u.jsx("h2",{className:"mb-4 mt-10 text-2xl font-semibold text-foreground",...e}),h3:e=>u.jsx("h3",{className:"mb-4 mt-10 text-xl font-semibold",...e}),h4:e=>u.jsx("h4",{className:"mb-4 mt-10 text-lg font-semibold",...e}),a:e=>u.jsx("a",{className:"text-primary no-underline underline-offset-2 hover:underline",...e}),p:e=>u.jsx("p",{className:"mb-4 mt-4",...e}),ul:e=>u.jsx("ul",{className:"mb-4 mt-4 list-inside list-disc",...e}),ol:e=>u.jsx("ol",{className:"mb-4 mt-4 list-inside list-decimal",...e}),blockquote:e=>u.jsx("blockquote",{className:"mb-4 mt-4 border-l border-primary pl-5 italic text-accent-50",...e})};function qpe(){const{isPending:e,connectors:t,connect:n}=lE(),[r,i]=A.useState(!1);return u.jsxs("div",{className:"w-full",children:[u.jsx(ak,{open:r,onClose:()=>i(!1),children:u.jsx(ok,{components:ck,children:u.jsx(vD,{})})}),u.jsxs("div",{className:"flex w-full flex-col gap-5",children:[u.jsx("h1",{className:"sr-only",children:"Connect"}),u.jsx("div",{className:"text-xs text-accent-50",children:u.jsxs("p",{children:["You'll need an"," ",u.jsx("a",{href:"https://ethereum.org/en/wallets/",target:"_blank",rel:"noreferrer",className:"text-primary underline hover:no-underline",children:"Ethereum Wallet"})," ","to continue."]})}),u.jsx("div",{className:"flex flex-col gap-2",children:t.map(s=>u.jsxs(wn,{size:"md",pending:e,onClick:()=>n({connector:s}),className:"justify-start text-sm",color:"white",children:[u.jsx(_r,{src:`/svg/icn-connect-${s.id}.svg`,className:"size-6"}),s.name]},s.id))})]})]})}function Hpe({className:e}){const{isConnected:t,address:n,isPending:r,isSigned:i,isNewSignin:s,error:o,signIn:a}=bhe(),{navigateAfterSignin:c}=nk(),d=oc(),h=vd(d,n)==="MSIG",[y,g]=A.useState(!1);return A.useEffect(()=>{(i||h)&&c()},[i,h]),A.useEffect(()=>{s?(toast.success(u.jsxs(u.Fragment,{children:[u.jsx(Wg,{address:n,className:"font-bold"})," signed-in!"]})),c()):o&&toast.error(o)},[s,o]),u.jsx("div",{className:e,children:u.jsxs("div",{className:"flex w-full flex-col gap-5",children:[u.jsx(ak,{open:y,onClose:()=>g(!1),children:u.jsx(ok,{components:ck,children:u.jsx(vD,{})})}),u.jsx("div",{className:"text-xs text-accent-50",children:u.jsxs("p",{children:["Make sure that you have read and that you agree to the"," ",u.jsx("a",{className:"inline cursor-pointer text-primary underline hover:no-underline",onClick:()=>g(!0),children:"legal disclaimer"})," ","before continuing using the web app."]})}),u.jsx(wn,{size:"md",disabled:!t,pending:r,onClick:()=>a(),children:"Sign-in"})]})})}function Wpe(){const{isConnected:e}=lE();return u.jsxs("div",{className:"full-bleed flex min-h-dvh grow overflow-hidden",children:[u.jsxs("div",{className:"relative hidden max-w-lg shrink-0 flex-col items-start gap-8 bg-primary p-16 text-white lg:flex",children:[u.jsxs("h2",{className:"text-4xl font-semibold",children:["Swap, deposit,",u.jsx("br",{}),ls.home.swapHeadline]}),u.jsxs("p",{className:"text-lg",children:[ls.appName," is a"," ",u.
697jsx("span",{className:"font-semibold",children:"decentralized exchange"})," where you can execute low-fee swaps, deposit tokens to earn rewards, and actively participate in the onchain economy."]}),u.jsxs(Bx,{href:"/",className:"group inline-flex items-center gap-1.5 font-semibold",children:[u.jsx(oA,{className:"size-4 transition-transform duration-300 group-hover:-translate-x-1"}),"Back to app"]}),u.jsx(_r,{src:`/svg/${oo}/connect.svg`,className:"pointer-events-none absolute bottom-8 right-8 w-auto"})]}),u.jsxs("div",{className:"wrapper flex grow flex-col items-center justify-center gap-8",children:[u.jsxs(Bx,{href:"/",children:[u.jsxs("span",{className:"sr-only",children:[ls.appName," Finance."]}),u.jsx(_r,{src:`/svg/${oo}/wordmark.svg`,className:"inline-flex h-auto w-52",svgAttributes:{role:"presentation"}})]}),u.jsx("div",{className:"w-full max-w-xs rounded-xl bg-accent-5 p-5",children:e?u.jsx(Hpe,{}):u.jsx(qpe,{})}),u.jsxs("footer",{className:"w-full text-center text-xs text-accent-50",children:[new Date().getFullYear()," © ",ls.appName," Finance."," ","v5.0.0+c43409"]})]})]})}function Gpe(e,t,n){return Hg("Positions","hooks:usePositions:fetchPositions",r=>[r,e,t,n])}function ED(e,t,n,r={}){const i=Kr({queryKey:["fetchPositions",e,n?.sorted.length,t?.all.length],queryFn:()=>Gpe(e,t,n),...r,enabled:!!e&&!!n&&!en.isEmpty(t?.all)&&(r.enabled??!0),refetchInterval:3e5}),s=A.useMemo(()=>{if(!(!i.data||!t))return i.data.map(o=>{const{migrator:a,slipstreamFactory:c}=Zu(o.chainId).chain.superchainConfig,d=a&&o.pool.factory!==c&&!TL(o)&&!!SL(t[o.chainId],o.pool.token0,o.pool.token1,o.pool.type,c,o.chainId)?.gauge_alive,h={...o.pool,migrate:d};return{...o,pool:h}})},[i.data,t]);return{...i,data:s}}function ow({content:e,children:t,className:n}){const[r,i]=A.useState(!1);return u.jsxs(u.Fragment,{children:[u.jsx(ak,{open:r,onClose:()=>i(!1),children:u.jsx(ok,{components:ck,children:e})}),u.jsx("button",{type:"button",onClick:()=>i(!0),className:n,children:t})]})}const $b=new Map,Kpe=Pt.nativeCurrency.symbol.toLowerCase();function Ype(e,t){const n=A.useMemo(()=>e&&t?`${t}/${e}`:void 0,[e,t]),[r,i]=A.useState(0),[s,o]=A.useState(!1),a=A.useMemo(()=>n?OJ.map(y=>[`${y}/${n}/logo.svg`,`${y}/${n}/logo-128.png`]).flat():[],[n]),c=A.useCallback(()=>{$b.has(n)||(o(!1),i(y=>y<a.length-1?y+1:-1))},[n,a]),d=A.useCallback(y=>{if(!$b.has(n)){const g=y.target.src;$b.set(n,g)}o(!0)},[n,a,r]);return{src:A.useMemo(()=>n===void 0?m7:e===Kpe?BJ:$b.has(n)?$b.get(n):r===-1?m7:a[r],[e,n,r,a]),loaded:s,handleLoad:d,handleError:c}}const Xu=A.memo(function({address:t,chainId:n,className:r}){const i=A.useMemo(()=>t?.toLowerCase(),[t]),{src:s,loaded:o,handleLoad:a,handleError:c}=Ype(i,n);return u.jsx("img",{className:It("h-9 w-9 shrink-0 rounded-full transition",!o&&"bg-accent-10",r),src:s,loading:"lazy",alt:"Token Image",onLoad:a,onError:c})}),Zpe=fd("9000"),Xpe="+9,000%",Gt=A.memo(function({amount:t,decimals:n=null,tokenAddress:r="",chainId:i=0,symbol:s=null,symbolPrefix:o="",showLogo:a=!0,showSymbol:c=!1,showValue:d=!1,plain:h=!1,roundDigits:y=null,testId:g="",displayUsdOnly:x=!1,disableTooltip:_=!1}){const{data:S}=ys(null,{refetchOnWindowFocus:!1,refetchOnMount:!1}),I=S?.all||{},L=String(r).toLowerCase(),D=I[`${i}:${L}`],F=D?.price||0n,$=n||D?.decimals||18,z=c&&!x?`${o}${s||D?.symbol||""}`:"",V=z==="%"?t:Is(t,F,$),[K,te]=A.useMemo(()=>[f3(t,$,y),Number(Ns(t,$))],[t,$]),ee=`~$${A.useMemo(()=>{const E=V<pa("10",$)?5:2;return B9(V,18,{digits:E})},[t,$])}`,ne=!_&&!x&&z!=="%"&&!h&&!d&&t>0n,J=ne?jr:A.Fragment,M=ne?{content:ee}:{};if(h)return u.jsxs(u.Fragment,{children:[a&&u.jsx(Xu,{address:L,chainId:i,className:"inline-block size-4"})," ",z=="$"&&"~$",K,z!=="$"&&u.jsx(u.Fragment,{children:z==="%"?`${z}`:` ${z}`}),d&&u.jsx("span",{className:"ml-1.5 opacity-80",children:ee})]});if(z==="%"&&t>=Zpe)return u.jsx(jr,{className:"w-36 p-0",content:u.jsxs("div",{className:"flex flex-col text-center",children:[u.jsxs("div",{className:"border-b border-accent-10 p-3 text-sm font-semibold",children:[K,"%"]}),u.jsx("div",{className:"p-3 text-xs text-accent-50",children:"Warning: High APR can be diluted"})]}),children:u.jsxs("span",{className:"flex items-center justify-end gap-1.5",children:[u.jsx(jv,{className:"size-3.5 text-amber",strokeWidth:1.5}),Xpe]})});const m=u.jsxs(u.Fragment,{children:[u.jsxs("span",{"data-testid":g,"data-test-amount":te,children:[x?ee:K,c&&u.jsx(u.Fragment,{children:z==="%"?`${z}`:u.jsxs("span",{className:"opacity-70",children:[" ",z]})})]}),d&&!x&&u.jsx("span",{className:"ml-1.5 opacity-70",children:ee})]});return a?u.jsx(J,{...M,children:u.jsxs("div",{className:"inline-flex items-center gap-1.5",children:[u.jsx(Xu,{address:L,chainId:i,className:"size-4"}),m]})}):u.jsx(J,{...M,children:m})});function Qpe(e){const t=Po.unix(e.expiresAt).isBefore(),n=e.voted_at===0n,r=e.rebase_amount>0n,i=e.rewards.length>0;if(!t)return"LOCKED";const s=r||i;return n?s?"NEEDS_CLAIM":"READY":s?"NEEDS_BOTH":"NEEDS_RESET"}function _D({venft:e,refetchData:t,children:n="Claim & lock",setTx:r,onPendingStateChange:i,onError:s,hideLoader:o=!1,variant:a="action-link",className:c}){return e.rebase_amount===0n?null:u.jsx(Fr,{write:{chainId:Pt.id,address:e.rewards_distributor,abi:Cn(["function claim(uint _tokenId) external returns (uint)"]),functionName:"
697claim",args:[e.id]},variant:a,successMessage:"Rebases claimed",onSuccess:d=>{r?.(d),t()},onPendingStateChange:i,onError:s,hideLoader:o,className:c,children:n})}const RR=Cn(["function getTokenIdByAddress(address user) view returns (uint256)","function isTokenValid(uint256 tokenId) view returns (bool)"]);async function Jpe(e){if(!e)return!1;const t=await zp({chainId:Dp.id,abi:RR,address:w7,functionName:"getTokenIdByAddress",args:[e]});return!t||t===0n?!1:await zp({chainId:Dp.id,abi:RR,address:w7,functionName:"isTokenValid",args:[t]})}function uk({enabled:e}){const{address:t}=Rr(),{data:n}=Kr({queryKey:["isSelfVerified",t],queryFn:()=>Jpe(t),enabled:!!t&&e,staleTime:sd,gcTime:sd,retry:!1});return{isVerified:!!n}}async function e0e(e){const t=await pd(e.map(s=>{const{chain:o}=Zu(Pt.id);return{chainId:o.id,address:o.superchainConfig.rewardsSugar,abi:_O,functionName:"forRoot",args:[s.root]}}),{noErrors:!0}),n={},r={},i=[];for(let s=0;s<t.length;s++){const[o,a,c]=t[s],d=e[s].root;i.push(d),n[d]=a,r[d]=c}return{feeAddrsByRoot:n,bribeAddrsByRoot:r,roots:i}}function t0e(e,t={}){const n=en.uniqBy(e.filter(i=>i.pair&&i.pair.root!==Pn).map(i=>i.pair),"root"),r=n.map(i=>i.root);return Kr({queryKey:["fetchRootRewardsAddrs",r.join(",")],queryFn:()=>e0e(n),...t,enabled:!!n.length&&(t.enabled??!0),gcTime:Wr,staleTime:Wr})}function n0e({rewards:e,rootAddrs:t}){const{isVerified:n}=uk({enabled:!1});return A.useMemo(()=>{const r=e.filter($=>{const z=RO.includes($.token.toLowerCase()),V=V9.includes($.token.toLowerCase());return!(z||V&&!n)}),i=r.filter($=>$.bribe!==Pn),s=r.filter($=>$.fee!==Pn),o=en.groupBy(i,$=>$.bribe),a=en.groupBy(s,$=>$.fee),c=r.filter($=>$.pair.root!==Pn),d=Object.keys(o),h=Object.keys(a);if(!t){const $=h.map(V=>a[V].map(K=>K.token.toLowerCase())),z=d.map(V=>o[V].map(K=>K.token.toLowerCase()));return{allFeeAddrs:h,allBribeAddrs:d,feeTokens:$,bribeTokens:z}}const y=r.filter($=>$?.pair?.root===Pn),g=y.map($=>$.fee).filter($=>$!==Pn),x=y.map($=>$.bribe).filter($=>$!==Pn),_=g.map($=>a[$].map(z=>z.token.toLowerCase())),S=x.map($=>o[$].map(z=>z.token.toLowerCase())),{nonCanonFeeTokens:I,nonCanonBribeTokens:L,nonCanonFeeContracts:D,nonCanonBribeContracts:F}=_re(t,c,PJ);return{nonCanonContracts:[...D,...F],allFeeAddrs:[...g,...D],allBribeAddrs:[...x,...F],feeTokens:[..._,...I],bribeTokens:[...S,...L]}},[e,t,n])}function A3e({ts:e,prefix:t="",pastPrefix:n="",deltaDays:r=0}){if(!e)return"";const s=(Po.isDayjs(e)?e:Po.unix(e)).add(r,"day");return(s.isBefore()?`${n} ${s.fromNow()}`:`${t} ${s.fromNow(!0)}`).trim()}function lk({ts:e,prefix:t="",pastPrefix:n="",deltaDays:r=0,tooltip:i=!0}){if(!e)return null;const o=(Po.isDayjs(e)?e:Po.unix(e)).add(r,"day"),a=u.jsx("p",{className:"w-52 text-xs sm:w-auto",children:o.toDate().toString()}),c=i?jr:"span";return o.isBefore()?u.jsxs(c,{content:a,children:[n," ",o.fromNow()]}):u.jsxs(c,{content:a,children:[t," ",o.fromNow(!0)]})}function r0e(e){const t=Hp.unix(e.epochEndsAt),n=t.add(2,"hour"),[r,i]=A.useState(!1);return A.useEffect(()=>{const s=Hp();i(s.isAfter(t)&&s.isBefore(n))},[t,n]),{isBlackoutWindow:r,blackoutEndsAt:n}}const X8={warning:{bg:"bg-amber/10",outline:"outline-amber/30",text:"text-amber"},info:{bg:"bg-primary/10",outline:"outline-primary/30",text:"text-primary"},success:{bg:"bg-green/10",outline:"outline-green/30",text:"text-green"},error:{bg:"bg-red/10",outline:"outline-red/30",text:"text-red"}};function Zg({type:e,icon:t,children:n,className:r}){return u.jsxs("div",{className:It("flex items-start gap-3 rounded-xl p-4 outline outline-1 sm:gap-3 sm:p-5",X8[e].bg,X8[e].outline,X8[e].text,r),children:[u.jsx("div",{className:"rounded-full sm:block",children:u.jsx(t,{className:"size-4 sm:size-5",strokeWidth:1.5})}),u.jsx("div",{className:"text-xs sm:text-sm",children:n})]})}function p0(e,t=Pn,n=0n,r,i,s){const{isNative:o,allowance:a,refetchAllowance:c,isLoading:d}=rD(e,t,void 0,{enabled:n>0n,fetchInterval:s}),h=o?!0:(a||0n)>=n,y=e&&dk(e,n,t),g=tD({...y,query:{enabled:!!e&&!o&&n!==0n&&t!=Pn&&!!y}}),{isPending:x,isSuccess:_}=tA({hash:r});return A.useEffect(()=>{c()},[g.isSuccess,c]),A.useEffect(()=>{h&&i?.()},[h,i]),{token:e,isLoading:d,allowance:a,approved:h,refetch:c,tx:g,needApproval:!
697h&&!d,waitingSpend:r&&x,spent:_}}function dk(e,t=0n,n=Pn){return{chainId:e.chainId,address:e.wrappedAddress||e.address,abi:rg,functionName:"approve",args:[n,t]}}function i0e({reward:e,onApproved:t}){const{data:n}=ys(null,{refetchOnWindowFocus:!1,refetchOnMount:!1}),r=n?.all||{},i=e.token.toLowerCase(),s=r[`${e.chainId}:${i}`],o=p0(s,UJ,e.amount);return A.useEffect(()=>{o.approved&&t()},[o.approved]),u.jsxs("div",{className:"flex items-center justify-between py-3 text-sm",children:[u.jsx("div",{className:"flex items-center gap-2",children:u.jsx(Gt,{amount:e.amount,tokenAddress:e.token,chainId:e.chainId,showSymbol:!0,plain:!0})}),u.jsx(wn,{type:"button",size:"sm",onClick:o.tx.write,pending:o.tx.isPending,children:"Allow"})]})}function s0e({rewards:e,skip:t}){const[n,r]=A.useState([]),i=e.filter(s=>!n.find(o=>o.token===s.token));return A.useEffect(()=>{i.length===0&&t()},[i]),u.jsxs("div",{className:"mx-auto flex max-w-md flex-col items-center justify-center gap-4 pb-4 text-center sm:pb-8 sm:pt-4",children:[u.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-green text-white",children:u.jsx(cA,{className:"size-6",strokeWidth:1.5})}),u.jsx("h3",{className:"max-w-xs px-8 text-xl font-semibold",children:"Approval is needed for verifiable rewards"}),u.jsx("div",{className:"max-w-xs px-8 text-sm",children:"Some tokens require a quick approval in order to be claimed."}),u.jsx("div",{className:"my-4 w-full divide-y divide-accent-10 rounded-lg bg-accent-5 p-3 px-6",children:i.map(s=>u.jsx(i0e,{onApproved:()=>r([...n,s]),reward:s},s.token))})]})}function o0e({rewards:e,skip:t}){return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mx-auto flex max-w-md flex-col items-center justify-center gap-4 pb-4 text-center sm:pb-8 sm:pt-4",children:[u.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-green text-white",children:u.jsx(cA,{className:"size-6",strokeWidth:1.5})}),u.jsx("h3",{className:"max-w-xs px-8 text-xl font-semibold",children:"Wallet verification is needed for some rewards"}),u.jsx("div",{className:"max-w-xs px-8 text-sm",children:"Some tokens require a quick human verification in order to be claimed."}),u.jsx("div",{className:"my-4 w-full divide-y divide-accent-10 rounded-lg bg-accent-5 p-3 px-6",children:e.map(n=>u.jsx("div",{children:u.jsxs("div",{className:"flex items-center justify-between py-3 text-sm",children:[u.jsx("div",{className:"flex items-center gap-2",children:u.jsx(Gt,{amount:n.amount,tokenAddress:n.token,chainId:n.chainId,showSymbol:!0,plain:!0})}),u.jsx(Gt,{amount:n.amount,tokenAddress:n.token,chainId:n.chainId,showSymbol:!1,showLogo:!1,displayUsdOnly:!0})]})},n.token))}),u.jsxs("div",{className:"flex items-start gap-1.5 text-xs text-accent-50",children:[u.jsx("a",{href:VJ,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-primary underline-offset-2 hover:underline",children:"Self.xyz"})," ","provides secure and private ZK verification"]})]}),u.jsxs("div",{className:"flex items-center gap-4 [&>*]:flex-1",children:[u.jsx(wn,{color:"secondary",size:"lg",onClick:()=>t(),children:"Skip & claim remaining"}),u.jsx(wn,{href:zJ,target:"_blank",rel:"noopener noreferrer",size:"lg",children:"Prove you're human"})]})]})}function a0e({crosschainCalls:e,children:t,buttonText:n="Claim",useButton:r=!1,rewards:i}){const s=vd(Pt.id)==="MSIG",[o,a]=A.useState(!1),c=LO*e,[d]=iD(c),{isVerified:h}=uk({enabled:!1}),[y,g]=A.useState(!1),[x,_]=A.useState(!1),S=i.filter(F=>V9.includes(F.token.toLowerCase())),I=S.length>0&&!h,[L,D]=A.useMemo(()=>I&&!y?[u.jsx(o0e,{rewards:S,skip:()=>g(!0)}),!1]:S.length>0&&h&&!x?[u.jsx(s0e,{rewards:S,skip:()=>_(!0)}),!1]:s?[u.jsx(Zg,{type:"warning",icon:dh,children:"When executing a Superchain claim or vote transaction, the multisig's sponsored gas feature must be used."}),!0]:d===void 0?[u.jsx(Xl,{message:"Checking gas..."}),!1]:[u.jsx(sD,{gas:c}),d],[d,s,I,y,S,x,h]);return u.jsxs(u.Fragment,{children:[u.jsx(XF,{onClick:()=>a(!0),useButton:r,size:"lg",color:"primary",children:n}),u.jsx(mh,{isOpen:o,onClose:()=>a(!1),title:"Superchain Rewards Claim",children:u.jsxs("div",{className:"space-y-4",children:[L,D&&u.jsxs("div",{className:"flex items-center gap-4 [&>*]:flex-1",children:[u.jsx(wn,{color:"secondary",size:"lg",onClick:()=>a(!1),children:"Cancel"}),A.cloneElement(t,{variant:"button",color:"primary",size:"lg"})]})]})})]})}function fk({venft:e,rewards:t,refetchData:n,children:r="Claim",setTx:i,onPendingStateChange:s,onError:o,hideLoader:a=!1,variant:c="action-link"}){const{tokens:d}=mD(),{isBlackoutWindow:h,blackoutEndsAt:y}=r0e(e),{data:g,isFetching:x}=t0e(t,{enabled:!1}),_=r,S=t.filter(ne=>!RO.includes(ne.token.toLowerCase())),{allBribeAddrs:I,bribeTokens:L,allFeeAddrs:D,feeTokens:F,nonCanonContracts:$}=n0e({rewards:t,rootAddrs:g}),{address:z}=Fo(),V=vd(Pt.id)==="7702",{data:K}=oD(),te=A.useMemo(()=>
697{const ne={...{chainId:Pt.id,address:U9,abi:$9,functionName:"claimBribes",args:[[...I,...D],[...L,...F],e.id]},query:{enabled:!x}},J=Array.from(new Set(t.map(m=>m.chainId))),M=K?.filter(m=>!m.recipient&&J.includes(m.chainId));return!V||!M?.length?ne:{calls:[...M.map(m=>({address:z9,abi:Cn(["function setRecipient(uint, address) external"]),functionName:"setRecipient",args:[BigInt(m.chainId),z],chainId:Pt.id})),ne],chainId:Pt.id}},[K,t,e.id,x,V,I,D,L,F]);if(S.length==0)return null;const Q=en.uniqBy(S,ne=>`${ne.chainId}:${ne.bribe}`).map(({chainId:ne,token:J})=>d?.[`${ne}:${J.toLowerCase()}`]?.symbol),ee=u.jsx(Fr,{variant:c,write:te,successMessage:u.jsxs(u.Fragment,{children:["Claimed rewards for ",u.jsxs("strong",{children:[Q.join(", ")," "]})]}),onSuccess:ne=>{i?.(ne),n()},onPendingStateChange:s,onError:o,hideLoader:a,children:r});return h?u.jsx(jr,{content:u.jsxs("div",{className:"max-w-xs text-center",children:["During the two hours after the epoch ends, rewards cannot be claimed."," ",u.jsx(lk,{ts:y.unix(),prefix:"Starts again in"}),"."]}),children:u.jsxs("div",{className:"flex items-center gap-1 text-accent-50",children:[u.jsx(dh,{className:"size-3"})," Claiming rewards paused"]})}):g?u.jsx(a0e,{crosschainCalls:BigInt($?.length??0),buttonText:_,useButton:c==="button",rewards:t,children:ee}):ee}function c0e({venft:e,refetchData:t,setTx:n,useButton:r=!1,tooltip:i=!1}){const s=e.voted_at===0n||Po.unix(e.expiresAt).isBefore();if(s)return null;const o=u.jsx(Fr,{write:{chainId:Pt.id,address:U9,abi:$9,functionName:"poke",args:[e.id],query:{enabled:!s}},variant:r?"action-link-use-button":"action-link",successMessage:"Lock poked",onSuccess:a=>{t(),n?.(a)},children:"Poke"});return i?u.jsx(jr,{className:"w-64",content:"Poke will sync up the new voting power with the existing lock votes.",children:o}):o}function Q8({venft:e,refetchData:t,setTx:n,useButton:r=!1,onPendingStateChange:i,onError:s,hideLoader:o}){return!(e.epochStartedAt<=e.voted_at)&&e.voted_at!==0n?u.jsx(Fr,{write:{chainId:Pt.id,address:U9,abi:$9,functionName:"reset",args:[e.id]},variant:r?"button":"action-link",successMessage:"Reset submitted",onSuccess:d=>{t(),n?.(d)},onPendingStateChange:i,onError:s,hideLoader:o,children:"Reset"}):null}function u0e({venft:e,refetchData:t}){const n=e.voted_at===0n;return Po.unix(e.expiresAt).isAfter()||!n?null:u.jsx(Fr,{write:{chainId:Pt.id,address:Wf,abi:Cn(["function withdraw(uint256) external"]),functionName:"withdraw",args:[e.id]},successMessage:"Withdraw submitted",onSuccess:()=>{t()},variant:"action-link",children:"Withdraw"})}const MR=({venft:e,refetchData:t})=>u.jsxs(u.Fragment,{children:[e.rebase_amount>0n&&u.jsx(_D,{venft:e,refetchData:t,children:"Claim Rebases"}),e.rewards.length>0&&u.jsx(fk,{venft:e,rewards:e.rewards,refetchData:t,children:"Claim Rewards"})]});function SD({venft:e,refetchData:t,isFullSize:n=!0}){const r=Qpe(e),i=xi("text-xs text-accent-50",n?"w-full":"w-full md:w-auto");return u.jsxs("div",{className:"flex flex-wrap items-center gap-3 gap-y-1",children:[r==="READY"&&u.jsxs(u.Fragment,{children:[u.jsx(u0e,{venft:e,refetchData:t}),u.jsx("span",{className:"text-accent-40 last:hidden",children:"·"})]}),r==="NEEDS_CLAIM"&&u.jsxs(u.Fragment,{children:[u.jsx("p",{className:i,children:"To withdraw, first claim rewards."}),u.jsx(MR,{venft:e,refetchData:t})]}),r==="NEEDS_RESET"&&u.jsxs(u.Fragment,{children:[u.jsx("p",{className:i,children:"To withdraw, first reset."}),u.jsx(Q8,{venft:e,refetchData:t})]}),r==="NEEDS_BOTH"&&u.jsxs(u.Fragment,{children:[u.jsx("p",{className:i,children:"To withdraw, first reset and claim rewards."}),u.jsx(Q8,{venft:e,refetchData:t}),u.jsx(MR,{venft:e,refetchData:t})]}),r==="LOCKED"&&u.jsxs(u.Fragment,{children:[u.jsx(qn,{href:`/lock/${e.id}?manage=increase`,className:"text-xs text-primary underline-offset-2 hover:underline",children:"Increase"}),u.jsx(qn,{href:`/lock/${e.id}?manage=extend`,className:"text-xs text-primary underline-offset-2 hover:underline",children:"Extend"}),u.jsx(qn,{href:`/lock/${e.id}?manage=merge`,className:"text-xs text-primary underline-offset-2 hover:underline",children:"Merge"}),n&&u.jsxs(u.Fragment,{children:[u.jsx(qn,{href:`/lock/${e.id}?manage=transfer`,className:"text-xs text-primary underline-offset-2 hover:underline",children:"Transfer"}),u.jsx(c0e,{venft:e,refetchData:t,tooltip:!0})]}),u.jsx(Q8,{venft:e,refetchData:t})]})]})}var TD=Symbol.for("immer-nothing"),NR=Symbol.for("immer-draftable"),ga=Symbol.for("immer-state");function jc(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var mg=Object.getPrototypeOf;function yg(e){return!!e&&!!e[ga]}function Jp(e){return e?AD(e)||Array.isArray(e)||!!e[NR]||!!e.constructor?.[NR]||hE(e)||pE(e):!1}
697var l0e=Object.prototype.constructor.toString();function AD(e){if(!e||typeof e!="object")return!1;const t=mg(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===l0e}function Hx(e,t){fE(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function fE(e){const t=e[ga];return t?t.type_:Array.isArray(e)?1:hE(e)?2:pE(e)?3:0}function gT(e,t){return fE(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function kD(e,t,n){const r=fE(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function d0e(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function hE(e){return e instanceof Map}function pE(e){return e instanceof Set}function up(e){return e.copy_||e.base_}function bT(e,t){if(hE(e))return new Map(e);if(pE(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&AD(e))return mg(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[ga];let r=Reflect.ownKeys(n);for(let i=0;i<r.length;i++){const s=r[i],o=n[s];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(n[s]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[s]})}return Object.create(mg(e),n)}function hk(e,t=!1){return mE(e)||yg(e)||!Jp(e)||(fE(e)>1&&(e.set=e.add=e.clear=e.delete=f0e),Object.freeze(e),t&&Hx(e,(n,r)=>hk(r,!0))),e}function f0e(){jc(2)}function mE(e){return Object.isFrozen(e)}var h0e={};function e0(e){const t=h0e[e];return t||jc(0,e),t}var Wx;function CD(){return Wx}function p0e(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function jR(e,t){t&&(e0("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function xT(e){vT(e),e.drafts_.forEach(m0e),e.drafts_=null}function vT(e){e===Wx&&(Wx=e.parent_)}function PR(e){return Wx=p0e(Wx,e)}function m0e(e){const t=e[ga];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function OR(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ga].modified_&&(xT(t),jc(4)),Jp(e)&&(e=A6(t,e),t.parent_||k6(t,e)),t.patches_&&e0("Patches").generateReplacementPatches_(n[ga].base_,e,t.patches_,t.inversePatches_)):e=A6(t,n,[]),xT(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==TD?e:void 0}function A6(e,t,n){if(mE(t))return t;const r=t[ga];if(!r)return Hx(t,(i,s)=>LR(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return k6(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,o=!1;r.type_===3&&(s=new Set(i),i.clear(),o=!0),Hx(s,(a,c)=>LR(e,r,i,a,c,n,o)),k6(e,i,!1),n&&e.patches_&&e0("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function LR(e,t,n,r,i,s,o){if(yg(i)){const a=s&&t&&t.type_!==3&&!gT(t.assigned_,r)?s.concat(r):void 0,c=A6(e,i,a);if(kD(n,r,c),yg(c))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(Jp(i)&&!mE(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;A6(e,i),(!t||!t.scope_.parent_)&&k6(e,i)}}function k6(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hk(t,n)}function y0e(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:CD(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=pk;n&&(i=[r],s=Gx);const{revoke:o,proxy:a}=Proxy.revocable(i,s);return r.draft_=a,r.revoke_=o,a}var pk={get(e,t){if(t===ga)return e;const n=up(e);if(!gT(n,t))return g0e(e,n,t);const r=n[t];return e.finalized_||!Jp(r)?r:r===J8(e.base_,t)?(e_(e),e.copy_[t]=ET(r,e)):r},has(e,t){return t in up(e)},ownKeys(e){return Reflect.ownKeys(up(e))},set(e,t,n){const r=ID(up(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=J8(up(e),t),s=i?.[ga];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(d0e(n,i)&&(n!==void 0||gT(e.base_,t)))return!0;e_(e),wT(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return J8(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,e_(e),wT(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=up(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){jc(11)},getPrototypeOf(e){return mg(e.base_)},setPrototypeOf(){jc(12)}},Gx={};Hx(pk,(e,t)=>{Gx[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Gx.deleteProperty=function(e,t){return Gx.set.call(this,e,t,void 0)};Gx.set=function(e,t,n){return pk.set.call(this,e[0],t,n,e[0])};function J8(e,t){const n=e[ga];return(n?up(n):e)[t]}function g0e(e,t,n){const r=ID(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function ID(e,t){if(!(t in e))return;let n=mg(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=mg(n)}}function wT(e){e.modified_||(e.modified_=!0,e.parent_&&wT(e.parent_))}function e_(e){e.copy_||(e.copy_=bT(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var b0e=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const o=this;return function(c=s,...d){return o.produce(c,h=>n.call(this,h,...d))}}typeof n!="function"&&jc(6),r!==void 0&&typeof r!="function"&&jc(7);let i;if(Jp(t)){const s=PR(this),o=ET(t,void 0);let a=!0;try{i=n(o),a=!1}finally{a?xT(s):vT(s)}return jR(s,r),OR(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===TD&&(i=void 0),this.autoFreeze_&&hk(i,!0),r){const s=[],o=[];e0("Patches").generateReplacementPatches_(t,i,s,o),r(s,o)}return i}else jc(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let r,i;return[this.produce(t,n,(o,a)=>{r=o,i=a}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jp(e)||jc(8),yg(e)&&(e=x0e(e));const t=PR(this),n=ET(e,void 0);return n[ga].isManual_=!0,vT(t),n}finishDraft(e,t){const n=e&&e[ga];(!n||!n.isManual_)&&jc(9);const{scope_:r}=n;return jR(r,t),OR(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>
697-1&&(t=t.slice(n+1));const r=e0("Patches").applyPatches_;return yg(e)?r(e,t):this.produce(e,i=>r(i,t))}};function ET(e,t){const n=hE(e)?e0("MapSet").proxyMap_(e,t):pE(e)?e0("MapSet").proxySet_(e,t):y0e(e,t);return(t?t.scope_:CD()).drafts_.push(n),n}function x0e(e){return yg(e)||jc(10,e),RD(e)}function RD(e){if(!Jp(e)||mE(e))return e;const t=e[ga];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=bT(e,t.scope_.immer_.useStrictShallowCopy_)}else n=bT(e,!0);return Hx(n,(r,i)=>{kD(n,r,RD(i))}),t&&(t.finalized_=!1),n}var ba=new b0e,MD=ba.produce;ba.produceWithPatches.bind(ba);ba.setAutoFreeze.bind(ba);ba.setUseStrictShallowCopy.bind(ba);ba.applyPatches.bind(ba);ba.createDraft.bind(ba);ba.finishDraft.bind(ba);function k3e(e,t){return e.map(n=>n.votes.map(r=>{const i=t.find(o=>o.address.toLowerCase()===r.lp.toLowerCase()||o.root.toLowerCase()===r.lp.toLowerCase());if(!i)return null;let s=r.weight;return s>pa("100",n.decimals)&&(s=D9(n.voting_amount,s,n.decimals)),{venft:n,pair:i,weight:s,votedWeight:Zf(n.voting_amount,n.decimals,"0",Ns(s,n.decimals)),venftId:n.id,pairSuperchainKey:i.superchainKey,pairAddress:i.address.toLowerCase(),rootPoolAddress:i.root===Pn?i.address:i.root}})).flat().filter(n=>!!n)}function C3e(e,t,n,r){return e.flatMap(i=>{const s=t.find(F=>F.superchainKey==`${i.chainId}:${i.lp.toLowerCase()}`),{bribes:o,emissions:a,fees:c,vapr:d,tbv:h,tfv:y,tvv:g,votes:x,veAPR:_,emissionsTokenDecimals:S,emissionsTokenSymbol:I}=i,D=qJ.map(([F])=>F).includes(s.address)&&x>0n?[...o].sort((F,$)=>Q4.some(z=>z.address===F.token.toLowerCase())?-1:Q4.some(z=>z.address===$.token.toLowerCase())?1:0).map(F=>{const $=Q4.find(ne=>ne.address.toLowerCase()===F.token.toLowerCase())?.supply;if(!$)return F;const z=10n**18n,V=z*x/n.totalVotes,ee=r/(z-V)*z*x/n.totalVotes*(10000n/$)/z;return{...F,fdv:ee}}):o;return{...s,bribes:D,emissions:a,fees:c,vapr:d,tbv:h,tfv:y,tvv:g,votes:x,veAPR:_,emissionsTokenDecimals:S,emissionsTokenSymbol:I}})}function I3e(e,t,n=!1){return MD(r=>{const i=r.find(s=>s.venftId===e.id&&s.pairSuperchainKey===t.superchainKey);i&&n?r.splice(r.indexOf(i),1):i||r.push({venft:e,pair:t,weight:pa("0",e.decimals),votedWeight:pa("0",e.decimals),venftId:e.id,pairSuperchainKey:t.superchainKey,pairAddress:t.address.toLowerCase(),rootPoolAddress:t.root===Pn?t.address:t.root})})}function R3e(e,t,n){return MD(r=>{const i=r.filter(h=>h.venftId==e.id),s=i.find(h=>h.pairSuperchainKey==t.superchainKey);if(!s)return;const o=String(Number(n)||0),a=pa(o,e.decimals),c=pa("100",e.decimals),d=i.reduce((h,y)=>h-y.weight,c)+s.weight;s.weight=a<=d?a:d})}const _T=e=>!!e?.relay,v0e=({voter:e,beforeId:t="#"})=>u.jsxs(u.Fragment,{children:[_T(e)?"Relay":"Lock"," ",t,String(e.id)]});function ND({venft:e,expTooltip:t=!0,avatar:n=!0,maxLocked:r=!1}){return e?u.jsxs("div",{id:"ve-nft-avatar",className:"flex items-center gap-4",children:[n&&u.jsx("div",{className:"shrink-0",children:u.jsx("div",{className:"flex size-11 items-center justify-center rounded-xl bg-accent-10",children:u.jsx(_r,{src:`/svg/${oo}/appLogo.svg`,className:"size-5"})})}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[u.jsx(v0e,{voter:e}),_T(e)&&u.jsx(OL,{size:12}),!_T(e)&&(Po.unix(e.expiresAt).isBefore()?u.jsx(A3,{size:12}):u.jsx(k3,{size:12})),e.permanent&&u.jsx(jr,{content:"Auto Max-Lock On",children:u.jsx("div",{className:"cursor-pointer pr-1 text-green",children:u.jsx(PL,{size:12})})})]}),u.jsxs("div",{className:"pt-1 text-xs text-accent-50",children:[u.jsx(Gt,{amount:e.amount,tokenAddress:e.token,chainId:Pt.id,showLogo:!1,showSymbol:!0,plain:!0})," ",r?u.jsx(u.Fragment,{children:"locked for 4 years"}):u.jsx(lk,{ts:e.expiresAt,prefix:"locked for",pastPrefix:"unlocked",tooltip:t})]})]})]}):u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Pv,{size:"sm"}),u.jsx("div",{className:"text-xs text-accent-50",children:"Loading Lock..."})]})}function w0e({venft:e,refetchData:t}){const n=Po.unix(e.expiresAt).isBefore();return u.jsxs("div",{className:"justify-between rounded-xl bg-accent-0 p-5 text-sm lg:flex",children:[u.jsxs("div",{className:"flex flex-col gap-5",children:[u.jsx(ND,{venft:e}),u.jsx("div",{className:"border-t border-accent-10 py-4 lg:border-t-0 lg:py-0",children:u.jsx(SD,{venft:e,refetchData:t,is
697FullSize:!1})})]}),u.jsxs("div",{className:"flex flex-col lg:flex-row lg:justify-between lg:gap-4",children:[u.jsxs("div",{className:"flex justify-between border-t border-accent-10 py-4 lg:w-32 lg:flex-col lg:justify-normal lg:border-t-0 lg:py-0",children:[u.jsx("div",{className:"text-xs text-accent-50 lg:pb-1.5 lg:text-right",children:u.jsx(jr,{content:u.jsx("span",{className:"normal-case",children:"Annualized rewards for current epoch."}),children:"Rebase APR"})}),u.jsx("div",{className:"text-right text-xs text-foreground lg:text-sm",children:u.jsx(Gt,{amount:n?0n:e.apr,tokenAddress:e.token,chainId:Pt.id,showLogo:!1,showSymbol:!0,symbol:"%",plain:!0})})]}),u.jsxs("div",{className:"flex justify-between border-t border-accent-10 pt-4 lg:min-w-52 lg:flex-col lg:items-end lg:justify-normal lg:border-t-0 lg:pt-0",children:[u.jsx("div",{className:"pb-1.5 text-right text-xs text-accent-50",children:"Rebases"}),u.jsxs("div",{className:"flex items-center gap-5 lg:flex-col lg:items-end lg:text-right",children:[u.jsx("div",{className:"text-right text-xs text-foreground lg:mb-1 lg:text-sm",children:u.jsx(Gt,{amount:e.rebase_amount,showLogo:!1,showSymbol:!0,tokenAddress:e.token,chainId:Pt.id})}),u.jsx(_D,{venft:e,refetchData:t})]})]})]})]})}function E0e({venft:e,refetchData:t}){const n=Po.unix(e.expiresAt).isBefore();return e.amount===0n?null:u.jsxs("div",{"data-testid":"venft-lock",className:"flex flex-col justify-between gap-4 rounded-xl bg-accent-0 p-5 xl:flex-row xl:gap-4",children:[u.jsx("div",{children:u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:"shrink-0",children:u.jsx("div",{className:"flex size-11 items-center justify-center rounded-xl bg-accent-10",children:u.jsx(_r,{src:`/svg/${oo}/appLogo.svg`,className:"size-5"})})}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("div",{className:"text-sm font-semibold",children:["Lock #",String(e.id)]}),n?u.jsx(A3,{size:12}):u.jsx(k3,{size:12}),e.permanent&&u.jsx(jr,{content:"Auto Max-Lock Enabled",children:u.jsx("div",{className:"cursor-pointer pr-1 text-green",children:u.jsx(PL,{size:12})})})]}),u.jsx("div",{className:"pt-1",children:u.jsx(SD,{venft:e,refetchData:t})})]})]})}),u.jsxs("div",{className:"flex flex-col justify-between gap-3 border-t border-accent-10 pt-3 md:flex-row md:gap-12 xl:border-none xl:pt-0",children:[u.jsxs("div",{className:"flex flex-row items-center justify-between text-sm md:w-32 md:flex-col md:items-start md:gap-1 xl:items-end",children:[u.jsx("div",{className:"text-xs text-accent-50",children:u.jsx(jr,{content:u.jsx("span",{children:"Annualized rewards for current epoch."}),children:"Rebase APR"})}),u.jsx("div",{className:"text-xs md:text-sm",children:u.jsx(Gt,{amount:n?0n:e.apr,tokenAddress:e.token,chainId:Pt.id,showLogo:!1,showSymbol:!0,symbol:"%",plain:!0})})]}),u.jsxs("div",{className:"flex flex-row items-center justify-between border-t border-accent-10 pt-3 text-sm md:w-32 md:flex-col md:items-end md:gap-1 md:border-none md:pt-0",children:[u.jsx("div",{className:"pb-1 text-xs text-accent-50 md:pb-0 xl:text-right",children:"Locked Amount"}),u.jsx("div",{className:"text-xs md:text-sm xl:text-right",children:u.jsx(Gt,{amount:e.amount,tokenAddress:e.token,chainId:Pt.id,showLogo:!1,showSymbol:!0,plain:!0})})]}),u.jsxs("div",{className:"flex flex-row items-center justify-between border-t border-accent-10 pt-3 text-sm md:w-48 md:flex-col md:items-end md:gap-1 md:border-none md:pt-0",children:[u.jsx("div",{className:"text-xs text-accent-50",children:"Voting Power"}),u.jsx("div",{className:"text-xs md:text-sm",children:u.jsx(Gt,{amount:e.voting_amount,tokenAddress:e.token,chainId:Pt.id,showLogo:!1,showSymbol:!0,plain:!0,symbolPrefix:"ve"})})]}),u.jsxs("div",{className:"flex flex-row items-center justify-between border-t border-accent-10 pt-3 text-sm md:w-48 md:flex-col md:items-end md:gap-1 md:border-none md:pt-0",children:[u.jsx("div",{className:"text-xs text-accent-50",children:"Unlock Date"}),u.jsx("div",{className:"text-xs md:text-sm",children:u.jsx(lk,{ts:e.expiresAt,prefix:"locked for",pastPrefix:"unlocked"})})]})]})]})}function _0e({venfts:e,refetch:t,relays:n=[],showRelayPlaceholder:r=!1,isFullSize:i=!0}){const s=n.map(o=>o.account_venfts.length).reduce((o,a)=>o+a,0);return u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{className:"mt-12",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("h2",{className:"text-xl",children:"Locks"}),u.jsx(ow,{content:u.jsx(Vpe,{}),children:u.jsx(S3,{size:18,strokeWidth:1.5,className:"cursor-pointer text-accent-40 hover:text-accent-50"})})]})}),u.jsx("div",{children:u.jsx("div",{className:"flex flex-col gap-1.5",children:!e||e.length===0?u.jsx("div",{className:"rounded-xl bg-accent-0 p-6","data-testid":"locks-empty-state",children:u.jsx("div",{className:"text-sm text-accent-50",children:"To receive incentives and fees create a lock and vote with it."})}):u.jsxs(u.Fragment,{children:[s===e.length&&u.jsx("div",{className:"rounded-xl bg-accent-0 p-6",children:u.jsx("div",{className:"text-sm text-accent-50",children:"All your Locks are using Relay."})}),e.map(o=>o.amount!==0n&&(i?u.jsx(E0e,{venft:o,refetchData:t},String(o.id)):u.jsx(w0e,{venft:o,refetchData:t},String(o.id)))),r&&u.jsxs("a",{href:"/locks",className:"hidden items-center justify-between gap-3 rounded-xl bg-accent-0 p-5 hover:bg-opacity-90 sm:gap-4 md:flex",children:[u.jsx("div",{className:"flex items-center gap-4",children:u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:"flex size-11 shrink-0 items-center justify-center rounded-xl bg-accent-10",children:u.jsx(OL,{size:20,strokeWidth:1,absoluteStrokeWidth:!0})}),u.jsxs("p",{className:"max-w-96 text-sm text-accent-50",children:["You can deposit your locks into a Relay strategy",u.jsx("br",{})," if you want to maximize your voting power."]})]})}),u.jsx("div",{className:"text-accent-50",children:u.jsx(CL,{size:24,strokeWidth:1})})]})]})})})]})}function jD(e,t){return String(e.wrappedAddress||e.address).toLowerCase()>String(t.wrappedAddress||t.address).toLowerCase()}function M3e(e,t){return jD(e,t)?[t,e]:[e,t]}function sh(e){const t="inRange"in e,n=e.alm!==Pn;return t?n:n&&hd.includes("alm")}function PD({tooltip:e="Autopilot is available for pool deposits",className:t}){return u.jsx(jr,{content:e,disabled:!e,children:u.jsx("span",{className:It("w-3 cursor-default bg-primary text-center text-[8px] font-semibold leading-3 text-white",t),children:"A"})})}function S0e({pair:e}){return u.jsxs("div",{className:"divide-y divide-accent-10 px-2 text-xs",children:[u.jsx(BR,{address:e.address,name:"Pool Address"}),e.gauge!==Pn&&u.jsx(BR,{address:e.gauge,name:"Gauge Address"}),!1]})}function BR({address:e,name:t}){return u.jsxs("div",{className:"flex items-center justify-between gap-6 py-3",children:[u.jsx("div",{className:"text-accent-50",children:t}),u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(Wg,{address:e}),u.jsx(B3,{text:e,tooltipDisabled:!0})]})]})}function T0e({type:e}){return u.jsxs(u.Fragment,{children:[e===0&&"Basic Stable",e===-1&&"Basic Volatile",e>0&&`Concentrated ${e}`]})}function A0e({addresses:e,maxTokens:t=4,className:n=""}){const r=e.slice(0,t),i=e.length-t,s=n||"w-9 h-9";
697return u.jsxs("div",{className:"flex -space-x-2",children:[r.map(([o,a])=>u.jsx(Xu,{chainId:o,address:a,className:s},`token-avatar-${a}`)),i>0&&u.jsxs("div",{className:`${s} relative flex items-center justify-center rounded-full bg-accent-10 text-[9px] text-xs text-accent-50`,children:["+",i]})]})}function aw({pair:e}){const{data:t}=ys(),n=A.useMemo(()=>!e||!t?!1:t.all[`${e.chainId}:${e.token0.toLowerCase()}`]?.listed&&t.all[`${e.chainId}:${e.token1.toLowerCase()}`]?.listed,[e,t]);return e?u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(A0e,{className:"size-10",addresses:[[e.chainId,e.token0],[e.chainId,e.token1]]}),u.jsxs("div",{className:"space-y-1",children:[u.jsxs("div",{className:"mb-1 flex items-center gap-1.5",children:[u.jsx("div",{className:"whitespace-nowrap text-sm font-semibold",children:e?.symbol?.split("-").slice(1).join("-").replace(/\//g," / ")}),n&&!e.highlighted&&u.jsx(jr,{content:"Pool with listed tokens",children:u.jsx(_r,{className:"mx-0.5 size-3.5",src:`/svg/${oo}/listed.svg`})}),!!e.emerging&&!n&&u.jsx(jr,{content:"Pool with emerging token",children:u.jsx(_r,{className:"mx-0.5 size-3.5",src:"/svg/emerging.svg"})}),u.jsx(Qp,{tooltip:"Pool trading fee",children:u.jsx(Gt,{amount:e.poolFee,symbol:"%",showLogo:!1,showSymbol:!0,plain:!0})}),e?.address&&u.jsx(jr,{content:u.jsx(S0e,{pair:e}),children:u.jsx("span",{className:"rounded-full p-0.5 text-accent-50 transition hover:bg-accent-5 hover:text-foreground",children:u.jsx(ML,{className:"size-3",strokeWidth:2})})})]}),u.jsxs("div",{className:"flex items-center gap-1.5",children:[e?.address&&sh(e)&&u.jsx(PD,{}),u.jsx("span",{className:"text-xs font-semibold text-primary",children:u.jsx(T0e,{type:e.type})}),e.oldCL&&u.jsxs(Qp,{className:"bg-transparent",tooltip:"Pools eligible for or in the process of migration to MEV-resistant gauges ahead of Aero launch",children:[u.jsx(Pre,{className:"-ml-4 -mr-2 size-7"}),"Migrating"]})]})]})]}):null}function k0e(e){const{children:t,className:n="",anchor:r="bottom end",testId:i,size:s="sm"}=e,o=e.type==="button",a=s==="xs"?"px-2.5 py-1.5":"px-4 py-2.5",c="w-full text-left block text-xs px-3 py-2.5 whitespace-nowrap first:border-none hover:bg-accent-5 transition rounded-lg";return u.jsxs(sE,{children:[u.jsx(rw,{"data-testid":i,className:It("group flex h-min items-center justify-center gap-2 whitespace-nowrap rounded-xl border border-accent-30 bg-transparent text-xs font-semibold text-foreground outline-none","hover:opacity-80 focus:z-10 focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/30",a,n),children:t}),u.jsxs(iw,{transition:!0,anchor:r,className:xi("z-30 rounded-xl border border-accent-10 bg-accent-0 p-3 shadow-2xl [--anchor-gap:theme(spacing.2)]","transition duration-100 ease-out data-[closed]:scale-95 data-[closed]:opacity-0"),children:[o&&e.options.map(d=>u.jsx(pg,{value:d.name,as:"button",className:c,"data-testid":`dropdown-option-${d.name}`,onClick:()=>{e.onChange(d.name)},children:d.elem??d.name},d.name)),!o&&e.links.map(d=>u.jsx(pg,{value:d.name,as:qn,className:It(c,d.className),href:d.link,children:d.name},d.name))]})]})}const C0e=A.memo(k0e);function I0e({venfts:e,withRewardsByPair:t,refetchData:n}){if(en.isEmpty(e)||t.length==0)return null;const r=e.filter(i=>!en.isEmpty(i.rewards));return u.jsxs(C0e,{type:"button",size:"sm",options:r.map((i,s)=>({name:s,elem:u.jsxs("div",{className:"flex w-full flex-col gap-4 p-1",children:[u.jsx(ND,{venft:i,expTooltip:!1}),u.jsx("div",{className:"flex w-full items-center gap-2 border-t border-accent-10 px-2 pb-1 pt-4 text-xs",children:u.jsx(fk,{venft:i,rewards:i.rewards,refetchData:n})})]})})),onChange:en.noop,className:"flex items-center justify-between pl-2.5 pr-2",children:[u.jsx("div",{children:"Claim All"}),u.jsx(Ju,{size:14})]})}function R0e({token:e,className:t}){const{isVerified:n}=uk({enabled:!1});return!V9.includes(e.toLowerCase())||n?null:u.jsx(jr,{content:"This reward needs identity verification in order to be claimed",children:u.jsx("span",{className:"flex rounded-full p-0.5 text-green transition hover:bg-green/10",children:u.jsx(cA,{className:It("size-3",t)})})})}function M0e({venfts:e,refetch:t}){const n=e.filter(r=>!en.isEmpty(r.rewards)).map(r=>{if(hd.includes("disable-fees"))return{...r,rewardsByPair:[]};const i=Object.values(en.groupBy(r.rewards,s=>s.pair?.superchainKey));return{...r,rewardsByPair:i}});return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"mt-12 flex items-center justify-between",children:[u.jsxs("div",{className:"flex w-2/4 items-center gap-2",children:[u.jsx("h2",{id:"voting-rewards",className:"text-xl",children:"Voting Rewards"}),u.jsx(ow,{content:u.jsx(zpe,{}),children:u.jsx(S3,{size:18,strokeWidth:1.5,className:"cursor-pointer text-accent-40 hover:text-accent-50"})})]}),u.jsx("div",{className:"flex w-2/4 justify-end",children:u.jsx(I0e,{venfts:e,withRewardsByPair:n,refetchData:t})})]}),u.jsx("div",{children:u.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.length==0&&u.jsx("div",{className:"rounded-xl bg-accent-0 p-6",children:u.jsx("div",{className:"text-sm text-accent-50",children:"No rewards foun
697d."})}),n.map(r=>[...r.rewardsByPair].map((i,s)=>u.jsxs("div",{className:"flex flex-col flex-wrap rounded-xl bg-accent-0 p-5 text-sm sm:flex-row",children:[u.jsxs("div",{className:"mb-4 mr-5 flex w-full flex-col gap-5 border-b border-accent-10 pb-4 lg:mb-0 lg:w-80 lg:border-b-0 lg:border-r lg:pb-0",children:[u.jsx(aw,{pair:i[0].pair}),i[0].pair&&!1]}),u.jsxs("div",{className:"mb-4 w-full border-b border-accent-10 pb-4 sm:mb-0 sm:w-auto sm:grow sm:border-b-0 sm:pb-0 lg:mb-auto",children:[u.jsxs("div",{className:"flex items-center gap-2 pb-1",children:[u.jsxs("strong",{children:["Lock #",r.id.toString()," "]}),Po.unix(r.expiresAt).isBefore()?u.jsx(A3,{size:12}):u.jsx(k3,{size:12})]}),u.jsxs("div",{className:"flex gap-1 text-xs text-accent-50",children:[u.jsx("div",{className:"shrink-0",children:u.jsx(Gt,{amount:r.amount,tokenAddress:r.token,chainId:Pt.id,showLogo:!1,showSymbol:!0,plain:!0})}),"locked"]})]}),u.jsxs("div",{className:"w-full sm:w-auto",children:[u.jsx("h4",{className:"sr-only",children:"Rewards"}),i.map((o,a)=>u.jsxs("div",{className:"flex flex-wrap items-center gap-2 pb-1.5 sm:justify-end",children:[u.jsx(R0e,{token:o.token}),u.jsx(Gt,{amount:o.amount,tokenAddress:o.token,chainId:o.chainId,showLogo:!0,showSymbol:!0}),u.jsx(Qp,{children:o.fee!==Pn?"Fee":"Incentive"})]},`${r.id.toString()}-${s}-${a}`)),u.jsx("div",{className:"flex pt-2 text-xs sm:justify-end",children:u.jsx(fk,{venft:r,rewards:i,refetchData:t})})]})]},`${r.id.toString()}-${s}`)))]})})]})}function FR({amount:e,token:t,tick:n,showUSD:r,spacing:i}){return n>=p7(e6,i)?u.jsx(jL,{className:"size-4",strokeWidth:1.5}):n<=p7(-e6,i)?u.jsx("div",{children:"0"}):u.jsx(Gt,{amount:e,tokenAddress:t.address,chainId:t.chainId,decimals:t.decimals,showValue:!1,showLogo:!1,roundDigits:7,showSymbol:r,disableTooltip:!0,displayUsdOnly:r})}function N0e({position:{tick_lower:e,tick_upper:t,token0:n,token1:r,inRange:i},spacing:s}){const[o,a]=A.useState(!1),c=y=>{y.stopPropagation(),a(!o)},[d,h]=A.useMemo(()=>{function y(g){const _=zQ(g,jD(n,r),n.decimals,r.decimals).toLocaleString("en-US",mO({digits:r.decimals,extend:{useGrouping:!1}}));return pa(_,r.decimals)}return[y(e),y(t)]},[n,r,e,t]);return u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(FR,{amount:d,token:r,tick:e,showUSD:o,spacing:s}),u.jsx(jr,{content:i?"Deposit is within active price range":"Deposit is out of active price range",children:u.jsx(NL,{strokeWidth:1.5,className:xi("relative z-10 size-4",i?"text-green":"text-red")})}),u.jsx(FR,{amount:h,tick:t,token:r,showUSD:o,spacing:s}),u.jsx("button",{className:"flex",onClick:c,children:u.jsx(Qp,{color:"neutral",children:o?"$":r.symbol})})]})}function OD({position:e,showLabel:t=!0}){return u.jsxs("div",{className:"flex shrink flex-col gap-4 text-xs sm:flex-row sm:items-center sm:gap-2","data-testid":"pool-position",children:[t&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("div",{className:"text-xs",children:["Deposit #",String(e.id)]}),!!e.unlocks_at&&u.jsxs(Qp,{className:"z-50",color:"primary",tooltip:u.jsxs(u.Fragment,{children:["This position is locked until"," ",u.jsx("b",{children:Po.unix(Number(e.unlocks_at)).format("DD/MM/YYYY h:mm A")})]}),children:[u.jsx(k3,{className:"mr-1 size-2"}),"Locked"]}),u.jsx("div",{className:"hidden text-accent-40 sm:inline-block",children:"·"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[sh(e)&&u.jsx(PD,{tooltip:"Autopilot is enabled for this position",className:"bg-accent-50"}),e.pool.type<1?u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{children:"0"}),u.jsx(NL,{strokeWidth:1.5,className:It("size-4",e.inRange?"text-green":"text-red")}),u.jsx(jL,{className:"size-4",strokeWidth:1.5})]}):u.jsx(N0e,{position:e,spacing:e.pool.type})]})]})}function j0e({children:e,className:t}){return u.jsx(jr,{className:"w-64",content:e,children:u.jsx("div",{className:It("inline-flex size-2.5 rounded-full bg-green",t),children:u.jsx("div",{className:It("size-full animate-ping rounded-full bg-inherit hover:animate-none")})})})}function P0e({pool:e,plain:t,className:n=""}){const r=e?(Number(e.unstaked_fee)/1e4).toFixed(2):"10.00";return t?u.jsxs("div",{className:n,children:["Note: ",r,"% of fees from unstaked deposits is redirected to pool voters."]}):u.jsxs(j0e,{className:"bg-amber",children:["This deposit is unstaked. ",r,"% of fees from unstaked deposits is redirected to pool voters."]})}function ST(e,t){const n=t?sh(t):!1,r=new URLSearchParams({token0:e.token0,token1:e.token1,type:e.type.toString(),chain0:e.chainId.toString(),chain1:e.chainId.toString()});return"factory"in e&&e.factory&&r.append("factory",e.factory),t&&(r.append("position",t.id.toString()),n&&r.append("alm",t.alm)),`/deposit?${r.toString()}`}function N3e(e,t){return`/pools?${new URLSearchParams({token0:e.address,token1:t.address,chain:e.chainId.toString(),chain0:e.chainId.toString(),chain1:t.chainId.toString()}).toString()}`}function DR(e,t,n,r){return`/incentivize?${new URLSearchParams({token0:e.address,token1:t.address,chain:e.chainId.toString(),chain0:e.chainId.toString(),chain1:t.chainId.toString(),...n?{pool:n}:{},...r!==void 0?{pos:r.toString()}:{}}).toString()}`}function $R(e){return`/migrate?pool=${e.pool.address}&position=${e.id}&chain=${e.chainId}`}function LD({position:e,refetchData:t,children:n="Claim"}){const{address:r}=Fo();if(!r)return null;const{pool:i,id:s}=e,o=Number(i.type)>0;if(sh(e))return u.jsx(Fr,{write:{chainId:i.chainId,address:i.alm,abi:Cn(["function getRewards(address recipient) external returns (uint256 amount)"]),functionName:"getRewards",args:[r]},variant:"action-link",successMessage:`Claimed emissions for ${i.symbol}`,onSuccess:t,children:n});const a=()=>e.unlocks_at?{chainId:e.chainId,address:e.locker,abi:h3,functionName:"
697claimRewards",args:[r]}:o?{chainId:i.chainId,address:i.gauge,abi:Cn(["function getReward(uint256) external"]),functionName:"getReward",args:[s]}:{chainId:i.chainId,address:i.gauge,abi:Cn(["function getReward(address) external"]),functionName:"getReward",args:[r]};return u.jsx(Fr,{write:a(),variant:"action-link",successMessage:`Claimed emissions for ${i.symbol}`,onSuccess:()=>{t()},children:n})}function BD({position:e,refetchData:t,children:n=null,className:r}){const i=e.pool,s=Number(i.type)>0,o=fd(String(Number.MAX_SAFE_INTEGER)),{address:a}=Fo();if(!a)return null;const c=()=>{const y=!(e.unstaked_earned0===0n&&e.unstaked_earned1===0n),g=Ms({abi:ox,functionName:"burn",args:[e.id]}),x=Ms({abi:ox,functionName:"collect",args:[{tokenId:e.id,recipient:a,amount0Max:o,amount1Max:o}]});return[y&&x,e.liquidity===0n&&e.staked===0n&&g].filter(_=>!!_)},d={successMessage:u.jsxs(u.Fragment,{children:["Claimed fees for ",u.jsx("strong",{children:i.symbol})]}),onSuccess:()=>{t()}},h=u.jsx(u.Fragment,{children:n||"Claim"});return e.unlocks_at?u.jsx(Fr,{className:r,variant:"action-link",write:{chainId:e.chainId,address:e.locker,abi:h3,functionName:"claimFees",args:[a]},...d,children:h}):s?u.jsx(Fr,{className:r,variant:"action-link",write:{chainId:i.chainId,address:i.nfpm,abi:ox,functionName:"multicall",args:[c()]},...d,children:h}):u.jsx(Fr,{className:r,variant:"action-link",write:{chainId:i.chainId,address:i.address,abi:Cn(["function claimFees() external returns (uint, uint)"]),functionName:"claimFees"},...d,children:h})}function O0e({position:e,refetchData:t}){const{address:n}=Rr(),{data:r}=Wne({chainId:e.chainId,abi:h3,address:e.locker,functionName:"factory"}),i=A.useMemo(()=>r&&Date.now()>=e.unlocks_at*1e3,[e,r]);return u.jsx(Fr,{write:{chainId:e.chainId,abi:Cn(["function unlock(address _locker, address _recipient)"]),address:r,functionName:"unlock",args:[e.locker,n],query:{enabled:i}},hideLoader:!i,variant:"action-link",successMessage:"Unlocked",onSuccess:t,children:"Unlock"})}const UR=({pool:e,positionId:t})=>u.jsx(qn,{href:`/withdraw?pool=${e.address}&chain=${e.chainId}&position=${t}`,className:"text-primary underline-offset-2 hover:underline",children:"Withdraw"});function L0e({position:e,refetch:t}){const n=e.pool,r=sh(e);return u.jsx("div",{className:"flex flex-col overflow-hidden rounded-xl border border-accent-10 bg-accent-0",children:u.jsx(ide,{children:({open:i})=>u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"isolate grid grid-cols-1 grid-rows-1 rounded-lg",children:[u.jsx(OF,{"data-expand-btn":!0,className:"relative z-10 col-span-full row-span-full",children:u.jsx("span",{className:"sr-only",children:"View position details"})}),u.jsxs("div",{className:"col-span-full row-span-full flex w-full flex-1 justify-between gap-2 px-4 py-3.5 sm:items-center sm:gap-4",children:[u.jsx(Ju,{className:`order-2 w-4 shrink-0 sm:-order-none ${i?"rotate-0 sm:rotate-0":"rotate-90 sm:-rotate-90"}`}),u.jsx("div",{className:"max-w-full [&_button]:relative [&_button]:z-10",children:u.jsx(OD,{position:e})}),u.jsxs("div",{className:"relative z-10 ml-auto",children:[!n.migrate&&u.jsx(qn,{href:ST(n,e),color:"secondary",size:"sm",useButton:!0,className:"hidden sm:block",children:"Deposit"}),n.migrate&&u.jsx(qn,{useButton:!0,href:$R(e),className:"hidden sm:block",children:"Migrate"})]})]})]}),u.jsxs(LF,{className:"flex flex-col gap-3 bg-accent-0",children:[!n.migrate&&u.jsx(qn,{href:ST(n,e),color:"secondary",size:"sm",useButton:!0,className:"m-3 mb-0 sm:hidden",children:"Deposit"}),n.migrate&&u.jsx(qn,{useButton:!0,href:$R(e),className:"m-3 mb-0 sm:hidden",children:"Migrate"}),u.jsxs("div",{className:"grid grid-cols-1 border-t border-accent-10 sm:grid-cols-2 lg:grid-cols-4",children:[u.jsxs("div",{className:"grid text-sm sm:col-span-2 sm:grid-cols-2",children:[u.jsxs("div",{className:"flex h-full flex-col justify-between gap-4 p-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"mb-2 text-xs text-accent-50",children:"Staked"}),u.jsxs("div",{className:"flex flex-col items-start gap-1",children:[u.jsx(Gt,{amount:e.staked0,tokenAddress:n.token0,chainId:n.chainId,showLogo:!1,showSymbol:!0}),u.jsx(Gt,{amount:e.staked1,tokenAddress:n.token1,chainId:n.chainId,showLogo:!1,showSymbol:!0})]})]}),e.staked!==0n&&u.jsx("div",{children:u.jsxs("div",{className:"flex gap-4 text-xs",children:[!r&&u.jsx(qn,{href:`/unstake?pool=${n.address}&chain=${n.chainId}&position=${e.id}`,className:"text-primary underline-offset-2 hover:underline",children:"Unstake"}),r&&u.jsx(UR,{pool:n,positionId:e.id})]})})]}),e.liquidity!==0n&&u.jsx("div",{className:"border-t border-accent-10 p-3 text-sm sm:border-l sm:border-t-0 sm:pl-5 sm:text-right lg:text-left",children:u.jsxs("div",{className:"flex h-full flex-col justify-between gap-4 sm:items-end lg:items-start",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"mb-2 flex items-center gap-2 sm:justify-end lg:justify-start",children:[u.jsx("div",{className:"text-xs text-accent-50",children:"Unstaked"}),e.liquidity!==0n&&n.type>0&&u.jsx(P0e,{pool:n,plain:!1}
697)]}),u.jsxs("div",{className:"flex flex-col items-start gap-1 sm:items-end lg:items-start",children:[u.jsx(Gt,{amount:e.amount0,tokenAddress:n.token0,chainId:n.chainId,showLogo:!1,showSymbol:!0}),u.jsx(Gt,{amount:e.amount1,tokenAddress:n.token1,chainId:n.chainId,showLogo:!1,showSymbol:!0})]})]}),u.jsxs("div",{className:"flex gap-2 text-xs",children:[!r&&!n.migrate&&u.jsxs(u.Fragment,{children:[u.jsx(qn,{href:`/stake?pool=${n.address}&chain=${n.chainId}&position=${e.id}`,className:"text-primary underline-offset-2 hover:underline",children:"Stake"}),u.jsx("span",{className:"opacity-30 last:hidden",children:"·"})]}),e.unlocks_at&&e.staked===0n?u.jsx(O0e,{position:e,refetchData:t}):u.jsx(UR,{pool:n,positionId:e.id})]})]})})]}),u.jsxs("div",{className:"flex h-full w-full flex-row items-start justify-between gap-2 border-t border-accent-10 p-4 lg:border-l lg:border-t-0",children:[u.jsxs("div",{className:"h-full",children:[u.jsx("div",{className:"pb-2 text-xs text-accent-50",children:"APR"}),u.jsx("div",{className:"text-sm",children:u.jsx(Gt,{amount:e.apr,symbol:"%",showLogo:!1,showSymbol:!0})})]}),u.jsxs("div",{className:"flex h-full flex-col justify-between gap-4 sm:pt-0",children:[u.jsxs("div",{children:[u.jsx("div",{className:"pb-2 text-xs text-accent-50 sm:text-right",children:"Emissions"}),u.jsx("div",{className:"text-sm sm:text-right",children:u.jsx(Gt,{amount:e.emissions_earned,tokenAddress:e.pool.emissions_token,chainId:e.pool.chainId,showLogo:!1,showSymbol:!0})})]}),e.emissions_earned!==0n&&u.jsxs("div",{className:"flex gap-2 text-xs sm:justify-end",children:[!!e.unlocks_at&&e.staked!==0n&&u.jsx(qn,{
697className:"text-primary underline-offset-2 hover:underline",href:DR(e.token0,e.token1,e.pool.address,e.id),children:"Incentivize"}),u.jsx(LD,{position:e,refetchData:t})]})]})]}),u.jsxs("div",{className:"flex h-full flex-col justify-between gap-4 border-t border-accent-10 p-4 text-sm sm:border-l lg:border-t-0",children:[u.jsxs("div",{children:[u.jsx("div",{className:"pb-2 text-xs text-accent-50 sm:text-right",children:"Trading Fees"}),u.jsxs("div",{className:"flex flex-col items-start justify-end gap-1 sm:items-end sm:text-right",children:[u.jsx(Gt,{amount:e.unstaked_earned0,tokenAddress:e.pool.token0,chainId:e.pool.chainId,showLogo:!1,showSymbol:!0}),u.jsx(Gt,{amount:e.unstaked_earned1,tokenAddress:e.pool.token1,chainId:e.pool.chainId,showLogo:!1,showSymbol:!0})]})]}),u.jsxs("div",{className:"mr-auto flex gap-3 sm:ml-auto sm:mr-0",children:[!!e.unlocks_at&&e.staked===0n&&u.jsx(qn,{className:"text-xs text-primary underline-offset-2 hover:underline",href:DR(e.token0,e.token1,e.pool.address,e.id),children:"Incentivize"}),e.liquidity!==0n&&(e.unstaked_earned0!==0n||e.unstaked_earned1!==0n)&&u.jsx(BD,{position:e,refetchData:t})]})]})]})]})]})})})}function B0e({pool:e,totalDeposited:t}){return u.jsx("div",{className:"rounded-xl border border-accent-10 bg-accent-0 p-5","data-testid":"pool-heading",children:u.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:justify-between",children:[u.jsxs("div",{className:"flex flex-col gap-5",children:[u.jsx(aw,{pair:e}),!1]}),u.jsxs("div",{className:"flex flex-col gap-2 border-t border-black/5 pt-4 text-sm dark:border-black/10 sm:items-end sm:gap-5 sm:border-t-0 sm:pt-0 sm:text-right",children:[u.jsxs("div",{className:"flex flex-row justify-between gap-2 sm:flex-col sm:items-end sm:justify-normal sm:gap-1",children:[u.jsx("span",{className:"text-xs text-accent-50",children:"Deposited"}),u.jsx("span",{className:"text-xs text-accent-50 sm:text-sm sm:text-inherit sm:dark:text-inherit",children:u.jsx(Gt,{amount:t,showLogo:!1,showSymbol:!0,symbol:"$",plain:!0})})]}),u.jsxs("div",{className:"hidden flex-row-reverse justify-between gap-2 text-xs text-accent-50 sm:flex sm:flex-row sm:items-end sm:justify-normal sm:gap-2",children:[u.jsx(Gt,{amount:e.tvl,showLogo:!1,showSymbol:!0,symbol:"$",plain:!0}),u.jsx("span",{children:"Pool Total"})]})]})]})})}function F0e({position:e,refetch:t}){const n=e.emissions_earned!==0n,r=e.pool.type>0&&e.staked===0n||e.unstaked_earned0!==0n||e.unstaked_earned1!==0n;return u.jsxs("div",{className:"flex flex-col gap-1",children:[n&&u.jsxs("div",{className:"flex w-full flex-col justify-between gap-2 rounded-xl bg-accent-10 px-5 py-4 sm:flex-row sm:items-center",children:[u.jsx("div",{className:"flex items-center gap-1 pt-px text-xs",children:"Unclaimed emissions from previous deposit"}),u.jsxs("div",{className:"flex flex-col gap-2 text-xs sm:flex-row sm:items-center sm:gap-4",children:[u.jsx(Gt,{amount:e.emissions_earned,tokenAddress:e.pool.emissions_token,chainId:e.pool.chainId,showLogo:!1,showSymbol:!0}),u.jsx("div",{className:"text-xs",children:u.jsx(LD,{position:e,refetchData:t})})]})]}),r&&u.jsxs("div",{className:"flex w-full flex-col justify-between gap-4 rounded-xl bg-accent-10 px-5 py-4 sm:flex-row sm:items-center",children:[u.jsx("div",{className:"flex items-center gap-1 pt-px text-xs",children:"Unclaimed trading fees from previous deposit"}),u.jsxs("div",{className:"flex flex-col gap-2 text-xs sm:flex-row sm:items-center sm:gap-4",children:[u.jsx(Gt,{amount:e.unstaked_earned0,tokenAddress:e.pool.token0,chainId:e.pool.chainId,showLogo:!1,showSymbol:!0}),u.jsx(Gt,{amount:e.unstaked_earned1,tokenAddress:e.pool.token1,chainId:e.pool.chainId,showLogo:!1,showSymbol:!0}),u.jsx("div",{className:"mt-2 text-xs sm:mt-0",children:u.jsx(BD,{position:e,refetchData:t})})]})]})]})}const D0e=e=>e!==0n,$0e=()=>u.jsx("div",{className:"rounded-xl bg-accent-0 p-6","data-testid":"liquidity-empty-state",children:u.jsxs("div",{className:"text-sm text-accent-50",children:["To receive emissions"," ",u.jsx(qn,{href:"/pools",className:"text-accent-50 no-underline underline-offset-2 hover:underline",children:"deposit and stake"}
697)," ","your liquidity first."]})}),Ub=e=>Is(e.amount0+e.staked0,e.token0.price,e.token0.decimals)+Is(e.amount1+e.staked1,e.token1.price,e.token1.decimals);function U0e({positions:e,refetch:t}){const n=A.useRef(null),[r,i]=A.useState(!1);A.useEffect(()=>{n.current?.querySelectorAll("[data-expand-btn]").forEach(o=>{r&&!o.hasAttribute("data-open")&&o.click(),!r&&o.hasAttribute("data-open")&&o.click()})},[r,n]);const s=A.useMemo(()=>Object.entries(e.reduce((a,c)=>{const d=c.pool.superchainKey;return a[d]||(a[d]=[]),a[d].push(c),a},{})).map(([a,c])=>[c[0].pool,c]).map(([a,c])=>(c=c.sort((d,h)=>{const y=Ub(d),g=Ub(h);return y===g?0:y>g?-1:1}),[a,c])).sort(([a,c],[d,h])=>{const y=c.reduce((x,_)=>x+Ub(_),0n),g=h.reduce((x,_)=>x+Ub(_),0n);return y===g?0:y>g?-1:1}),[e]);return u.jsxs("div",{className:"mt-2 space-y-6 md:mt-0",children:[u.jsxs("div",{className:"flex items-center justify-between gap-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("h2",{className:"text-xl",children:"Liquidity Rewards"}),u.jsx(ow,{content:u.jsx(wD,{}),children:u.jsx(S3,{size:18,strokeWidth:1.5,className:"cursor-pointer text-accent-40 hover:text-accent-50"})})]}),u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.length!=0&&u.jsxs(wn,{size:"md",color:"neutral",appearance:"outline",className:"hidden sm:flex",onClick:()=>i(!r),children:[r?"Collapse All":"Expand All",r?u.jsx(Cre,{className:"size-3",strokeWidth:1.5}):u.jsx(Mre,{className:"size-3",strokeWidth:1.5})]}),u.jsxs(qn,{href:"/pools",color:"secondary",size:"md",useButton:!0,children:[u.jsx(uA,{className:"size-4",strokeWidth:1.5}),"New deposit"]})]})]}),u.jsxs("div",{className:"flex flex-col gap-4",ref:n,children:[e.length==0&&u.jsx($0e,{}),s.map(([o,a])=>{const c=a.reduce((d,h)=>d+Ub(h),0n);return u.jsxs("div",{className:"flex flex-col gap-1",children:[u.jsx(B0e,{pool:o,totalDeposited:c}),a.map(d=>{const h=TL(d),y=[d.emissions_earned,d.unstaked_earned0,d.unstaked_earned1].some(D0e);return h&&y?u.jsx(F0e,{position:d,refetch:t},d.id.toString()):u.jsx(L0e,{position:d,refetch:t},d.id.toString())})]},o.superchainKey)})]})]})}function z0e(){const{address:e}=Rr(),{data:t}=ys(),{data:n,error:r}=Yg(t),{data:i=[],error:s,isPending:o,refetch:a}=ED(e,n,t),{data:c,error:d,refetch:h,isFetching:y}=lD(e,{refetchOnWindowFocus:!1}),{data:g=[],error:x,refetch:_,isFetching:S,enabled:I}=dD(c,n,{refetchOnWindowFocus:!1});return A.useEffect(()=>{const L=r||d||x||s;L&&toast.error(L)},[r,d,x,s]),u.jsx(pD,{children:u.jsx(gD,{children:u.jsxs("div",{className:"mx-auto max-w-screen-xl",children:[o?u.jsx(Xl,{message:"Loading liquidity rewards..."}):u.jsx(U0e,{positions:i,refetch:a}),c?u.jsx(_0e,{venfts:g,refetch:h,showRelayPlaceholder:!0,isFullSize:!1}):u.jsx(Xl,{message:"Loading locks..."}),y||S||!I?u.jsx(Xl,{message:"Loading rewards..."}):u.jsx(M0e,{venfts:g,refetch:_})]})})})}const V0e=({limit:e,upperBound:t})=>{const n=[];for(;t>0;){const r=e*n.length;n.push({limit:e,offset:r}),t-=e}return n};async function q0e({limit:e,upperBound:t,fetchData:n,configuration:r,canLoadMore:i}){const s=await Promise.all((r||V0e({limit:e,upperBound:t})).map(({limit:a,offset:c})=>n(a,c))),o=i&&s.length&&s.at(-1).length!==0;if(s.length!==0&&o){for(;;){const a=await n(e,s.length*e);if(a.length<e)break;s.push(a)}console.warn(`${n.name}: passed optimistic pagination bound`)}return s.reduce((a,c)=>[...a,...c],[])}const H0e={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_ALM_PROVIDER:"Runtime Global S.A.",VITE_ALM_TERMS:"https://runtimelabs.xyz/legal-notice",VITE_APP_NAME:"Aerodrome",VITE_APP_NAME_LOWER:"aerodrome",VITE_APP_TOKEN:"0x940181a94a35a4569e4529a3cdfb74e38fd98631",VITE_BANNER:"aero-banner.png",VITE_BASE_BUILDER_CODE:"62635f7239717a66386f700b0080218021802180218021802180218021",VITE_CHAIN_IDS:"8453",VITE_CONNECTOR_TOKENS_10:"0x9560e827af36c94d2ac33a39bce1fe78631088db,0x4200000000000000000000000000000000000042,0x4200000000000000000000000000000000000006,0x9bcef72be871e61ed4fbbc7630889bee758eb81d,0x2e3d870790dc77a83dd1d18184acc7439a53f475,0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9,0x1f32b1c2345538c0c6f582fcb022739c4a194ebb,0xbfd291da8a403daaf7e5e9dc1ec0aceacd4848b9,0xc3864f98f2a61a7caeb95b039d031b4e2f55e0e9,0x9485aca5bbbe1667ad97c7fe7c4531a624c8b1ed,0xda10009cbd5d07dd0cecc66161fc93d7c9000da1,0x73cb180bf0521828d8849bc8cf2b920918e23032,0x6806411765af15bddd26f8f544a34cc40cb9838b,0x6c2f7b6110a37b3b0fbdd811876be368df02e8b0,0xc5b001dc33727f8f26880b184090d3e252470d45,0x6c84a8f1c29108f47a79964b5fe888d4f4d0de40,0xc40f949f8a4e094d1b49a23ea9241d289b7b2819,0x94b008aa00579c1307b
6970ef2c499ad98a8ce58e58,0x0b2c639c533813f4aa9d7837caf62653d097ff85",VITE_CONNECTOR_TOKENS_8453:"0xfde4c96c8593536e31f229ea8f37b2ada2699bb2,0x833589fcd6edb6e08f4c7c32d4f71b54bda02913,0x940181a94a35a4569e4529a3cdfb74e38fd98631,0x50c5725949a6f0c72e6c4a641f24049a917db0cb,0x4621b7a9c75199271f773ebd9a499dbd165c3191,0x4200000000000000000000000000000000000006,0xb79dd08ea68a908a97220c76d19a6aa9cbde4376,0xcfa3ef56d303ae4faaba0592388f19d7c3399fb4,0xcb327b99ff831bf8223cced12b1338ff3aa322ff,0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22,0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452,0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42,0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca,0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf,0xdd468a1ddc392dcdbef6db6e34e89aa338f9f186,0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b",VITE_CONVERT_SUSDT_TOKENS:"8453:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913=0xe92e51d99ae33114c60d9621fb2e1ec0acea7e30",VITE_CSP_FRAME:"https://verify.walletconnect.org/",VITE_CSP_IMG:"https://raw.githubusercontent.com data: blob:",VITE_CSP_SCRIPT:"",VITE_CSP_STYLE:"",VITE_DEFAULT_SLIPPAGE:"1.0",VITE_DEFAULT_SWAP_MINUTES:"10",VITE_DEFAULT_TOKENS_8453:"0x940181a94a35a4569e4529a3cdfb74e38fd98631,eth",VITE_DEFAULT_TOKEN_ORDER:"WETH,AERO,USDC,cbBTC",VITE_ECOSYSTEM:"Base",VITE_EXPLORER_CHAIN_IDS:"",VITE_EXTERNAL_CHAIN_IDS:"10",VITE_FACTORY_ADDRESS_10:"0xF1046053aa5682b4F9a81b5481394DA16BE5FF5a",VITE_FACTORY_ADDRESS_8453:"0x420DD381b31aEf6683db6B902084cB0FFECe40Da",VITE_FC_META:"miniapp",VITE_FEATURE_FLAGS:"v2,relay,cl,vapr,alm,batched-txs,skip-batch-sim,tx-suffix",VITE_HIGHLIGHTED_POOLS:"",VITE_HL_EXPLORER:"https://explorer.hyperlane.xyz/?search=",VITE_HL_HEALTH_URL:"https://offchain-lookup.services.hyperlane.xyz/health",VITE_HL_RELAYERS:"0x74Cae0ECC47B02Ed9B9D32E000Fd70B9417970C5,0x09B96417602Ed6AC76651F7A8c4860E60e3aA6d0",VITE_HL_RELAY_URL:"https://offchain-lookup.services.hyperlane.xyz/callCommitments/calls",VITE_ICA_ADDRESS_8453:"0x44647Cd983E80558793780f9a0c7C2aa9F384D07",VITE_LABEL:"AERO",VITE_LAUNCHER_LANDING_PAGE_TOKENS:"VIRTUAL,KTA,AERO,cbBTC,cbXRP,cbDOGE,cbADA,cbLTC,GIZA,MAMO",VITE_LAUNCH_TOKENS:"",VITE_LOCKER_IMPL_ADDRESS:"0xfe678BFfC3C1c8D1De4478CC5C3e1b93EE4638aE",VITE_LP_SUGAR_ADDRESS_10:"0x347512180804A8B40AA7525AE932a31198F074aA",VITE_LP_SUGAR_ADDRESS_8453:"0x69dD9db6d8f8E7d83887A704f447b1a584b599A1",VITE_MAX_RESERVE_DEVIATION:"1000000000000000",VITE_MESSAGE_BRIDGE_ADDRESS:"0xF278761576f45472bdD721EACA19317cE159c011",VITE_MESSAGE_MODULE_ADDRESS:"0x2BbA7515F7cF114B45186274981888D8C2fBA15E",VITE_MIGRATOR_ADDRESS_8453:"0x4Ab4313D12D3c17Dd172dCd9453105EB3d775f42",VITE_MINTER_ADDRESS_10:"0x6dc9E1C04eE59ed3531d73a72256C0da46D10982",VITE_MINTER_ADDRESS_8453:"0xeB018363F0a9Af8f91F06FEe6613a751b2A33FE5",VITE_NATIVE_TOKEN_LOGO:"/tokens/ETH.svg",VITE_NFPM_ADDRESS_10:"0xf7f8ccce99Ca2896eC75D3A399D152dB96808399",VITE_NFPM_ADDRESS_8453:"0xe1f8cd9AC4e4A65F54f38a5CdAfCA44f6dD68b53",VITE_OLD_SLIPSTREAM_FACTORY_ADDRESS_10:"0xCc0bDDB707055e04e497aB22a59c2aF4391cd12F",VITE_OLD_SLIPSTREAM_FACTORY_ADDRESS_8453:"0x5e7BB104d84c7CB9B682AaC2F3d509f5F406809A",VITE_OPEN_USDT_TOKEN:"0x1217bfe6c773eec6cc4a38b5dc45b92292b6e189",VITE_OP_TOKEN:"0x4200000000000000000000000000000000000042",VITE_POOL_LAUNCHER_CL_ADDRESS:"0x3C890c7454C17410E49E035F6C4755c4E2012b4b",VITE_POOL_LAUNCHER_V2_ADDRESS:"0xA81eEbdEb3129bf5B89AEd89EDe9eC5fB6FDE3B3",VITE_POOL_PLACEHOLDER_TYPES:"-1,0,1,10,50,80,100,150,200,500,2000",VITE_PRICES_ADDRESS_10:"0x58238e3d556226defE35d3056335f48938707324",VITE_PRICES_ADDRESS_8453:"0xfbC91Fc9C6E70Afbea84b69FB0bF5EBa7F90aaFd",VITE_PRICE_MAPS:"10:0x4200000000000000000000000000000000000042=0xafcc6ae807187a31e84138f3860d4ce27973e01b,10:0x4200000000000000000000000000000000000042=0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca",VITE_PRICE_THRESHOLD_FILTER:"10",VITE_QUOTER_ADDRESS_10:"0xAf6EBdf4c70061C5961994Ae9c9956fBc2bCC32E",VITE_QUOTER_ADDRESS_8453:"0xCd2A7D98e82D6107eac1828ce8DeAA6acB65b555",VITE_QUOTER_STABLE_POOL_FILLER:"2097152",VITE_QUOTER_VOLATILE_POOL_FILLER:"4194304",VITE_RELAYS_HIDE_IDS:"9605,10296",VITE_RELAYS_PINNED_IDS:"10298",VITE_RELAY_SUGAR_ADDRESS_10:"0x5197Eb73253EF90E2089ad7308E572Ea6898c8D7",VITE_RELAY_SUGAR_ADDRESS_8453:"0x3dd0849D66DBd63D06f11442502e200601c50790",VITE_REWARDS_SUGAR_ADDRESS_10:"0x62CCFB2496f49A80B0184AD720379B529E9152fB",VITE_REWARDS_SUGAR_ADDRESS_8453:"0x1b121EfDaF4ABb8785a315C51D29BCE0552A7678",VITE_ROUTER_ADDRESS_10:"0xa062aE8A9c5e11aaA026fc2670B0D65cCc8B2858",VITE_ROUTER_ADDRESS_8453:"0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43",VITE_RPC_URIS_10:"https://lb.drpc.live/optimism/Avibgvi26EjPsw76UtdwmsQOcPkUJIUR8YARurWHF38a:1,https://opt-mainnet.g.alchemy.com/v2/4aBLuZOavL1N3YUWe8c9ylHandj-Ez4f:0",VITE_RPC_URIS_8453:"https://lb.drpc.live/base/Avibgvi26EjPsw76UtdwmsQOcPkUJIUR8YARurWHF38a:1,https://base-mainnet.g.alchemy.com/v2/NueAMkvMI625bpEhxN6_-:0",VITE_SAFE_PI:"3.0",VITE_SLIPSTREAM_FACTORY_ADDRESS_10:"0xe13Dd1fbA721Aa81a1826D9523AC9BC7d260c879",VITE_SLIPSTREAM_FACTORY_ADDRESS_8453:"0xf8f2eB4940CFE7d13603DDDD87f123820Fc061Ef",VITE_SLIPSTREAM_SUGAR_ADDRESS_10:"0xD45624bf2CB9f65ecbdF3067d21992b099b56202",VITE_SLIPSTREAM_SUGAR_ADDRESS_8453:"0x9c62ab10577fB3C20A22E231b7703Ed6D456CC7a",VITE_SOLANA_RPC_URL:"https://lb.drpc.live/solana/Avibgvi26EjPsw76UtdwmsQ-HuQB0FUR8K6aOmy9-kY5",VITE_STABLE_TOKEN_10:"0x7f5c764cbc14f9669b88837ca1490cca17c31607",VITE_STABLE_TOKEN_8453:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",VITE_STOCK_POOLS:"8453:0x853F5f1B92b16714Fe6CDA67CAad0856B83C7ab9,8453:0xA3b1E3f9747065e2073722Ff4c9027d3eA4994F0,8453:0xB1987CAD1682841b4b641d50E520777eC5Ab5542,8453:0xEAF57753BC382E0324a1D43F72E7027705a2273E,8453:0xe942B86f5c6d4a780fd673317Ee7E565d25aB7F3,8453:0x20E5fAd2661Ee9Eb0c04824524030AF31943B62D,8453:0x25F63549b2Bb9ffF114cDc39e8cfb16B450E2f9b,8453:0xD5B83c33A8711e727C0Abb6f72ee508755D37e10,8453:0xd03Bc8C7F2FAedCe2aac81bF0444AEA08Ea06E9b,8453:0x7103eB3c9590d1281f7dc03b2A9EE27C39dF5D54,8453:0x8b27f626ab668197000BC722A1012022CAeD10E2,8453:0x5A8236f575471e7BfCA2C8462a200c28f737246E,8453:0x0bf58fe0FAc935Ac69595c19B12Ba0d75E3F8c0E,8453:0x469337fDcc5E8f38e2E4B670B04F57865D13a7BB",VITE_STOCK_TOKENS:"8453:0xb20000000000000000000078ee7ce2fE4908108C,8453:0xb2000000000000000000008bC8786B856E61707C,8453:0xb200000000000000000000C2e324d24d7eEcd1fb,8453:0xb2000000000000000000002D0BA3164cc74f58B7,8453:0xCEF8Db49E456f872E288E1C042F916E9ceD7c781",VITE_TOKEN_ASSETS_CDN:"https://raw.githubusercontent.com/SmolDapp/tokenAssets/main/tokens",VITE_TOKEN_SYMBOL_0x102d758f688a4c1c5a80b116bd945d4455460282:"USDT0",VITE_TOKEN_SYMBOL_0x7f5c764cbc14f9669b88837ca1490cca17c31607:"USDC.e",VITE_TOKEN_SYMBOL_0xa1a0b2e02b0e6830ad5a4a7211691200945d8919:"TEA",VITE_TOKEN_SYMBOL_0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca:"OP",VITE_TOKEN_SYMBOL_0xafcc6ae807187a31e84138f3860d4ce27973e01b:"OP",VITE_TOKEN_SYMBOL_0xbce0af241a9c06778968ce1d3782c61d9a9c7c32:"METEORA",VITE_TOKEN_SYMBOL_0xde5ed76e7c05ec5e4572cfc88d1acea165109e44:"DEUS FINANCE",VITE_TOLERATED_SERVER_TIMESTAMP_DIFFERENCE:"30",VITE_TWITTER_HANDLE:"@aeroxyz",VITE_UNCLAIMABLE_TOKENS:"",VITE_UNIVERSAL_ROUTER_ADDRESS_10:"0xcAF22ce31298CF2BF1D152862F80216478ad7c67",VITE_UNIVERSAL_ROUTER_ADDRESS_8453:"0xcAF22ce31298CF2BF1D152862F80216478ad7c67",VITE_UNSAFE_PI:"3.0",VITE_UNSAFE_TOKENS_8453:"0x74ccbe53f77b08632ce0cb91d3a545bf6b8e0979,0x8901cb2e82cc95c01e42206f8d1f417fe53e7af0,0x9cbd543f1b1166b2df36b68eb6bb1dce24e6abdf,0x025f99977db78317a4eba606998258b502bb256f,0xd260115030b9fb6849da169a01ed80b6496d1e99,0
697x608d5401d377228e465ba6113517dcf9bd1f95ca,0xd260115030b9fb6849da169a01ed80b6496d1e99,0x728cda34d732a87fd6429129e23d4742d9ff0064,0x728cda34d732a87fd6429129e23d4742d9ff0064,0xac1bd2486aaf3b5c0fc3fd868558b082a531b2b4,0x0f929c29dce303f96b1d4104505f2e60ee795cac,0x47e78d664e6c339693e8638b7a7d9543abcc99d4,0xff0c532fdb8cd566ae169c1cb157ff2bdc83e105,0x373504da48418c67e6fcd071f33cb0b3b47613c7,0x0f929c29dce303f96b1d4104505f2e60ee795cac,0x628c5ba9b775dacecd14e237130c537f497d1cc7",VITE_USDT_BRIDGE_ADDRESS_8453:"0x4F0654395d621De4d1101c0F98C1Dba73ca0a61f",VITE_VE_ADDRESS_10:"0xFAf8FD17D9840595845582fCB047DF13f006787d",VITE_VE_ADDRESS_8453:"0xeBf418Fe2512e7E6bd9b87a8F0f294aCDC67e6B4",VITE_VE_SUGAR_ADDRESS_10:"0x94f913362b232e31daB49a1aFB775cfd25DaA6a1",VITE_VE_SUGAR_ADDRESS_8453:"0x4c5d3925fe65DFeB5A079485136e4De09cb664A5",VITE_VOTER_ADDRESS_10:"0x41C914ee0c7E1A5edCD0295623e6dC557B5aBf3C",VITE_VOTER_ADDRESS_8453:"0x16613524e02ad97eDfeF371bC883F2F5d6C480A5",VITE_WALLETCONNECT_PROJECT_ID:"a1ea2a919a3465f5a79109a93fa032fb",VITE_WRAPPED_NATIVE_TOKEN_10:"0x4200000000000000000000000000000000000006",VITE_WRAPPED_NATIVE_TOKEN_8453:"0x4200000000000000000000000000000000000006",VITE_XOP_BRIDGE:"0xac6A6080E002D2803959242C0FE10050C482D214",VITE_XOP_BRIDGE_V2:"0xfFCA1231d43Cf55B58d62627fD171ab1293C3050",VITE_XOP_TOKEN:"0xafcc6ae807187a31e84138f3860d4ce27973e01b",VITE_XOP_TOKEN_V2:"0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca"};function FD(e,t){const n=[],r=en.uniqBy(t,"symbol");for(const i of r)n.push(e[i.symbol]);return n}async function W0e(e,t,n,r){const{limit:i,upperBound:s}=await WL(e),o=await q0e({limit:i,upperBound:s,fetchData:(I,L)=>{const D=L>t.length?[]:t;return zp({chainId:e.id,address:e.superchainConfig.sugar,abi:EO,functionName:"tokens",args:[BigInt(I),BigInt(L),n||Pn,D]})}}).then(I=>{const L=[...I].sort((D,F)=>Number(F.emerging)-Number(D.emerging));return en.uniqBy(L,"token_address").map(D=>({...D,balance:D.account_balance,address:D.token_address.toLowerCase(),chainId:e.id}))}),a=await mk(o.filter(I=>I.listed||I.emerging||t.includes(I.address.toLowerCase())),e),c=o.map(I=>{const L=H0e[`VITE_TOKEN_SYMBOL_${I.address}`]||I.symbol,D=r[$O.map[I.address]]||a[I.address]||0n,F=Is(I.balance,D,I.decimals,18,18);return{...I,price:D,balanceValue:F,symbol:L}}),d=a[e.superchainConfig.nativeWrapped]||0n,h=n&&Sr(n)?await oee({address:n,chainId:e.id}):0n,y={...e.nativeCurrency,address:e.nativeCurrency.symbol.toLowerCase(),listed:!0,price:d,balance:h,balanceValue:Is(h,d,e.nativeCurrency.decimals),chainId:e.id,wrappedAddress:e.superchainConfig.nativeWrapped},g=e.superchainConfig.nativeWrapped,x=g&&g!==Pn;x&&c.push(y);const _=en.orderBy(c,[I=>I.symbol.toLowerCase()]).reduce((I,L)=>(I[`${L.chainId}:${L.address}`]=L,I),{}),S=c.filter(I=>I.listed||t.includes(I.address));return{all:_,listed:S,native:x?y:void 0,wrapped:x?_[`${e.id}:${y.wrappedAddress}`]:void 0}}async function mk(e,t){const n=BigInt(t.nativeCurrency.decimals),r=t.superchainConfig.stable,i=Array.from(new Set(t.superchainConfig.oracleConnectors.concat(r))),s=en.chunk(e,Math.max(3,Math.min(Math.ceil(e.length/60),20))),a=(await Promise.allSettled(s.map(async y=>(await zp({chainId:t.id,address:t.superchainConfig.oracle,abi:bJ,functionName:"getManyRatesToEthWithCustomConnectors",args:[y.map(x=>x.address),!1,i,BigInt(NJ)]})).map((x,_)=>{const S=BigInt(y[_].decimals);let I=x;return S!==n&&(S<n?I=x/10n**(n-S):I=x*10n**(S-n)),[I,y[_].address]})))).reduce((y,g)=>{if(g.status==="rejected")return console.error(g.reason),y;for(const[x,_]of g.value)y[_]=x;return y},{}),c=a[t.superchainConfig.weth||t.superchainConfig.nativeWrapped]||0n,d=a[r.toLowerCase()]||1n,h=c*10n**n/d;return Object.entries(a).reduce((y,[g,x])=>(y[g]=x*h/10n**n,y),{})}function G0e(e,t){const n=en.merge({},...e.map(h=>h.all)),r=en.uniqBy(en.concat(...e.map(h=>h.listed)),h=>`${h.chainId}:${h.address}`),i=en.uniq(t.reduce((h,y)=>(h.push(y.superchainConfig.stable),h.push(...y.superchainConfig.defaultTokens),h.push(...y.superchainConfig.oracleConnectors),h),[])).map(h=>r.find(y=>y.address.toLowerCase()===h.toLowerCase())).filter(h=>!!h).sort((h,y)=>h7(SJ.map(g=>g.toLowerCase()),h.symbol.toLowerCase(),y.symbol.toLowerCase())??y.symbol.localeCompare(h.symbol)).map(h=>h.address),s=r.sort((h,y)=>{if(h.balanceValue!==y.balanceValue)return h.balanceValue>y.balanceValue?-1:1;const g=h7(i,h.address,y.address);return g!==void 0?g:h.symbol.localeCompare(y.symbol)}),o=Object.fromEntries(s.concat(Object.values(n).filter(h=>h.emerging)).map(h=>[`${h.chainId}:${h.address}`,h])),a=FD(en.groupBy(r,"symbol"),s),c={},d={};for(const h of e)h.native&&(c[h.native.chainId]=h.native),h.wrapped&&(d[h.wrapped.chainId]=h.wrapped);return{...o,all:n,sorted:s,native:c,wrapped:d,grouped:a}}const j3e=Object.freeze(Object.defineProperty({__proto__:null,fetchOnchainTokenPrices:mk,fetchTokenPricesAndBalances:W0e,mergeTokens:G0e,sortGrouped:FD},Symbol.toStringTag,{value:"Module"}));async function DD(e,t,n,r){const i=await Hg("custom token","hooks:useOnchainToken:fetchCustomTokens",s=>[s,e,n],"hooks:useOnchainToken:mergeCustomTokens",()=>[n,e,t],!1,r);return i.length?i:void 0}function C6(e,{enabled:t,chain:n,onlyChains:r,dangerouslyPersist:i}={enabled:!0,dangerouslyPersist:!1}){const{chain:s}=Rr(),{address:o}=Rr(),{data:a}=ys(),c=A.useMemo(()=>
697{if(!a)return;const x=e.filter(S=>Sr(S??""));if(!x.length)return;const _=x.map(S=>S.toLowerCase()).map(S=>a?.[`${n??s?.id??Pt.id}:${S}`]?void 0:S).filter(Boolean);return _.length?_:void 0},[e,a]),d=r??(n?[n]:[]),{data:h=[],isFetching:y}=Kr({queryKey:["fetchCustomTokens",c?.join(""),o,a?.sorted.length,d?.join(",")],queryFn:()=>DD(c,a,o,d),enabled:!!c&&(t??!0),gcTime:Wr,staleTime:Wr});A.useEffect(()=>{!h||!i||h.forEach(x=>{const _=pO("customTokenAddresses",{id:x.chainId},x.chainId===Pt.id);try{const S=JSON.parse(localStorage.getItem(_)||"[]");if(S.includes(x.address))return;localStorage.setItem(_,JSON.stringify([...S,x.address]))}catch{localStorage.removeItem(_)}})},[h,i]);const g=e.join(",");return A.useMemo(()=>[e.map(_=>{if(_!==void 0)return h.find(S=>S.address.toLowerCase()===_.toLowerCase())}),y],[g,h,y])}async function K0e(e,t){const n=await DD(t,{all:{}},e,[Ja.id]),r=Up.find(i=>i.id===Ja.id);if(n&&r){const i=await mk([{address:r.superchainConfig.stable,decimals:6},{address:r.superchainConfig.weth||r.superchainConfig.nativeWrapped,decimals:18},...n],Up.find(s=>s.id===Ja.id));return n.map(s=>{const o=i[s.address]??0n;return{...s,balanceValue:Is(s.balance,o,s.decimals,18,18),price:o}})}}function yk(e){const{address:t}=Rr();return Kr({queryKey:["baseTokens",t,b7.join("")],queryFn:()=>K0e(t,b7),enabled:!1,gcTime:Wr,staleTime:Wr})}const Y0e=[...ma.map(e=>`${e}:${Xf}`),...ma.map(e=>`${e}:${$p}`)],ux={address:"0xdac17f958d2ee523a2206206994597c13d831ec7",chainId:O9.id,balance:0n,balanceValue:0n,price:pa("1",18),symbol:"USDT",listed:!1,decimals:6},Z0e=["eth","0x4200000000000000000000000000000000000006","0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22","0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf","0x940181a94a35a4569e4529a3cdfb74e38fd98631","0xacfe6019ed1a7dc6f7b508c02d1b04ec88cc21bf","0xfde4c96c8593536e31f229ea8f37b2ada2699bb2","0x1217bfe6c773eec6cc4a38b5dc45b92292b6e189","0xafcc6ae807187a31e84138f3860d4ce27973e01b","0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452","0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca","0xb79dd08ea68a908a97220c76d19a6aa9cbde4376","0xdd468a1ddc392dcdbef6db6e34e89aa338f9f186","0xcfa3ef56d303ae4faaba0592388f19d7c3399fb4","0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42","0x4621b7a9c75199271f773ebd9a499dbd165c3191","0x50c5725949a6f0c72e6c4a641f24049a917db0cb","0xcb327b99ff831bf8223cced12b1338ff3aa322ff","0xd52333441c0553facb259600fa833a69186893a5","0x352b850b733ab8bab50aed1dab5d22e3186ce984","0x820c5f0fb255a1d18fd0ebb0f1ccefbc4d546da7","0xaaa843fb2916c0b57454270418e121c626402aaa","0x63706e401c06ac8513145b7687a14804d17f814b","0xc5fed7c8ccc75d8a72b601a66dffd7a489073f0b","0xd71552d9e08e5351adb52163b3bbbc4d7de53ce1","0x4f9fd6be4a90f2620860d680c0d4d5fb53d1a825","0x76c71f1703fbf19ffdcf3051e1e684cb9934510f","0x9d5a383581882750ce27f84c72f017b378edb736","0x79bbf4508b1391af3a0f4b30bb5fc4aa9ab0e07c","0xe2f3fae4bc62e21826018364aa30ae45d430bb07","0xeec468333ccc16d4bf1cef497a56cf8c0aae4ca3","0xb9926b3fbc5873db0182016d55727d5ae89e5efd","0x111123ea4cee28cf010703593a8a2a3bbb91756c","0x58d75a1c4477914f9a98a8708feaed1dbe40b8a3","0x9d56c29e820dd13b0580b185d0e0dc301d27581d","0x449b3317a6d1efb1bc3ba0700c9eaa4ffff4ae65","0xf9569cfb8fd265e91aa478d86ae8c78b8af55df4","0xd89d90d26b48940fa8f58385fe84625d468e057a","0x55156709822f74d231103731d4ed768777fb80a9","0x696f9436b67233384889472cd7cd58a6fb5df4f1","0x1b4617734c43f6159f3a70b7e06d883647512778","0xeb466342c4d449bc9f53a865d5cb90586f405215","0xb3b32f9f8827d4634fe7d973fa1034ec9fddb3b3","0xd769d56f479e9e72a77bb1523e866a33098feec5","0xbc45647ea894030a4e9801ec03479739fa2485f0","0x80f6bcedd3d4fa1035285affa30e38f464db3895","0xa1832f7f4e534ae557f9b5ab76de54b1873e498b","0x226a2fa2556c48245e57cd1cba4c6c9e67077dd2","0x2a06a17cbc6d0032cac2c6696da90f29d39a1a29","0x548f93779fbc992010c07467cbaf329dd5f059b7","0x22af33fe49fd1fa80c7149773dde5890d3c76f3b","0x03569cc076654f82679c4ba2124d64774781b01d","0x24914cb6bd01e6a0cf2a9c0478e33c25926e6a0c","0x06f71fb90f84b35302d132322a3c90e4477333b0","0x532f27101965dd16442e59d40670faf5ebb142e4","0xe9185ee218cae427af7b9764a011bb89fea761b4","0x043eb4b75d0805c43d7c834902e335621983cf03","0xc08cd26474722ce93f4d0c34d16201461c10aa8c","0xcbada732173e39521cdbe8bf59a6dc85a9fc7b8c","0xcbd06e5a2b0c65597161de254aa074e489deb510","0xcb17c9db87b595717c857a08468793f5bab6445f","0xcb111e6a2a3bde90856d299d61341ac302167d23","0xcb585250f852c6c6bf90434ab21a00f02833a4af","0
697xeb6d78148f001f3aa2f588997c5e102e489ad341","0x9126236476efba9ad8ab77855c60eb5bf37586eb","0xc43f3ae305a92043bd9b62ebd2fe14f7547ee485","0x0c1c1c109fe34733fca54b82d7b46b75cfb71f6e","0x70c8392de9b39a1e48d12a70af6ff4be25d6d0a2","0x1bc0c42215582d5a085795f4badbac3ff36d1bcb","0x9f86db9fc6f7c9408e8fda3ff8ce4e78ac7a6b07","0xa1f72459dfa10bad200ac160ecd78c6b77a747be","0x4c87da04887a1f9f21f777e3a8dd55c3c9f84701","0x9e1028f5f1d5ede59748ffcee5532509976840e0","0x86cdd90bc48f7b5a866feaaf5023b8802dc2ab07","0xc0041ef357b183448b235a8ea73ce4e4ec8c265f","0xc694a91e6b071bf030a18bd3053a7fe09b6dae69","0x1f4446faaaed23090f324f051c3f8c5ce5ad1c36","0xbb22ff867f8ca3d5f2251b4084f6ec86d4666e14","0x83db73ef5192de4b6a4c92bd0141ba1a0dc87c65","0xb1e1f3cc2b6fe4420c1ac82022b457018eb628ff","0xd262a4c7108c8139b2b189758e8d17c3dfc91a38","0x4ed4e862860bed51a9570b96d89af5e1b0efefed","0xaaa0008c8cf3a7dca931adaf04336a5d808c82cc","0x9c5c365e764829876243d0b289733b9d2b729685","0xde5ed76e7c05ec5e4572cfc88d1acea165109e44","0x54bc229d1cb15f8b6415efeab4290a40bc8b7d84","0xf4d97f2da56e8c3098f3a8d538db630a2606a024","0x9b6a1d4fa5d90e5f2d34130053978d14cd301d58","0xafb89a09d82fbde58f18ac6437b3fc81724e4df6","0x6921b130d297cc43754afba22e5eac0fbf8db75b","0x3ec2156d4c0a9cbdab4a016633b7bcf6a8d68ea2","0x9d0e8f5b25384c7310cb8c6ae32c8fbeb645d083","0x657e8c867d8b37dcc18fa4caead9c45eb088c642","0xfb31f85a8367210b2e4ed2360d2da9dc2d2ccc95","0xed6e000def95780fb89734c07ee2ce9f6dcaf110","0x2081ab0d9ec9e4303234ab26d86b20b3367946ee","0xea17df5cf6d172224892b5477a16acb111182478","0x29cc30f9d113b356ce408667aa6433589cecbdca","0x7ffbe850d2d45242efdb914d7d4dbb682d0c9b07","0x39d5313c3750140e5042887413ba8aa6145a9bd2","0x58538e6a46e07434d7e7375bc268d3cb839c0133","0x6c240dda6b5c336df09a4d011139beaaa1ea2aa2","0x4933a85b5b5466fbaf179f72d3de273c287ec2c2","0x2dad3a13ef0c6366220f989157009e501e7938f8","0x2416092f143378750bb29b79ed961ab195cceea5","0xb33ff54b9f7242ef1593d2c9bcd8f9df46c77935","0x461638a9e7849f5d2c923b7515331417a383ed4d","0x74ccbe53f77b08632ce0cb91d3a545bf6b8e0979","0xf30bf00edd0c22db54c9274b90d2a4c21fc09b07","0xf1a7000000950c7ad8aff13118bb7ab561a448ee","0x5ab3d4c385b400f3abb49e80de2faf6a88a7b691","0xe5020a6d073a794b6e7f05678707de47986fb0b6","0x16ee7ecac70d1028e7712751e2ee6ba808a7dd92","0x3489256febdb1dc930dc3743617ad387cd6d3568","0x1c4cca7c5db003824208adda61bd749e55f463a3","0x1db0c569ebb4a8b57ac01833b9792f526305e062","0xcd2f22236dd9dfe2356d7c543161d4d260fd9bcb","0x590830dfdf9a3f68afcdde2694773debdf267774","0x321725ee44cb4bfa544cf45a5a585b925d30a58c","0xef22cb48b8483df6152e1423b19df5553bbd818b","0xe54b0c7dad72fb102ade2b1b9f4eece69408ab36","0x4bfaa776991e85e5f8b1255461cbbd216cfc714f","0xc5102fe9359fd9a28f877a67e36b0f050d81a3cc","0x1f3ba804efb9cfe17d595e7262cea4782dbf6e4e","0x15d0e0c55a3e7ee67152ad7e89acf164253ff68d","0xc9d23ed2adb0f551369946bd377f8644ce1ca5c4","0xcc7ff230365bd730ee4b352cc2492cedac49383e","0x1f015712aa2a48085ec93f87d643bb625b668b07","0xe0cd4cacddcbf4f36e845407ce53e87717b6601d","0x00f3c42833c3170159af4e92dbb451fb3f708917","0x18bc5bcc660cf2b9ce3cd51a404afe1a0cbd3c22","0x3ee5e23eee121094f1cfc0ccc79d6c809ebd22e5","0x777b2839832982b35213063d850848369390ee16","0x50f88fe97f72cd3e75b9eb4f747f59bceba80d59","0x4154550f4db74dc38d1fe98e1f3f28ed6dad627d","0x4eed0d2deb4c588393c80869b122327581b0d98e","0x9120b1e694b2f652556b812d18a70d78f699b497","0x98d0baa52b2d063e780de12f615f963fe8537553","0xd5390300c5db71f80d46f0fa9983fc72d4d1e3da","0x50d2280441372486beecdd328c1854743ebacb07","0x9a26f5433671751c3276a065f57e5a02d2817973","0xe22c243c7559c667a1eb94b593369d192c5fbac0","0xdcefd8c8fcc492630b943abcab3429f12ea9fea2","0xbe3111856e4aca828593274ea6872f27968c8dd6","0x370923d39f139c64813f173a1bf0b4f9ba36a24f","0xc0634090f2fe6c6d75e61be2b949464abb498973","0x00fbac94fec8d4089d3fe979f39454f48c71a65d","0xecac9c5f704e954931349da37f60e39f515c11c1","0x4da9a0f397db1397902070f93a4d6ddbc0e0e6e8","0x88fb150bdc53a65fe94dea0c9ba0a6daf8c6e196","0x901f1d2bf312e6fa1716df603df8f86315bcb355","0xf732a566121fa6362e9e0fbdd6d66e5c8c925e49","0x9eadbe35f3ee3bf3e28180070c429298a1b02f93","0xb676f87a6e701f0de8de5ab91b56b66109766db1","0xb29749498954a3a821ec37bde86e386df3ce30b6","0xac485391eb2d7d88253a7f1ef18c37f4242d1a24","0xf4435cc8b478d54313f04c956882be3d9acf9f6f","0x0fd7a301b51d0a83fcaf6718628174d527b373b6","0xa9fee7b2f54781a14c85a1b8815345aefbe1eb07","0x55cd6469f597452b5a7536e2cd98fde4c1247ee4","0x368181499736d0c0cc614dbb145e2ec1ac86b8c6","0xbf1aea8670d2528e08334083616dd9c5f3b087ae","0x7300b37dfdfab110d83290a29dfb31b1740219fe","0x24fcfc492c1393274b6bcd568ac9e225bec93584","0xc48823ec67720a04a9dfd8c7d109b2c3d6622094","0x7750741868cc4a865d9c0f619e6e642fd61f642f","0x93dc5cb35627a759848c7a7f0079ea7b49e435a5","0xbce0af241a9c06778968ce1d3782c61d9a9c7c32","0x8e4cbbcc33db6c0a18561fde1f6ba35906d4848b","0xb1a03eda10342529bbf8eb700a06c60441fef25d","0xe1bfa25468af64e366ddafc9d91bcc6c97439a14","0x2b11834ed1feaed4b4b3a86a6f571315e25a884d","0x084382d1cc4f4dfd1769b1cc1ac2a9b1f8365e90","0xb695559b26bb2c9703ef1935c37aeae9526bab07","0xc55e93c62874d8100dbd2dfe307edc1036ad5434","0x7431ada8a591c955a994a21710752ef9b882b8e3","0xbaa5cc21fd487b8fcc2f632f3f4e8d37262a0842","0x3073f7aaa4db83f95e9fff17424f71d4751a3073","0x7ba6f01772924a82d9626c126347a28299e98c98","0x526728dbc96689597f85ae4cd716d4f7fccbae9d","0x269cae7dc59803e5c596c95756faeebb6030e0af","0x3ed03e95dd894235090b3d4a49e0c3239edce59e","0x5ca35ebc4f25b042d2cae75914c7e882e631fa9a","0x9cb41fd9dc6891bae8187029461bfaadf6cc0c69","0xb166e8b140d35d9d8226e40c09f757bac5a4d87d","0xca73ed1815e5915489570014e024b7ebe65de679","0x752c5a95d202972e124390f30a50154409d3c858","0x7002458b1df59eccb57387bc79ffc7c29e22e6f7","0xab77a4cc84bb8bcc0fcb54a00eca32680d6f96ca","0x4e200fe2f3efb977d5fd9c430
697a41531fb04d97b8","0x7750c092e284e2c7366f50c8306f43c7eb2e82a2","0xa3d1a8deb97b111454b294e2324efad13a9d8396","0xba0dda8762c24da9487f5fa026a9b64b695a07ea","0xeff2a458e464b07088bdb441c21a42ab4b61e07e","0x02f92800f57bcd74066f5709f1daa1a4302df875","0x82b0e1a2374ea0198f62a48b14ffab53db6c1e36","0xa99f6e6785da0f5d6fb42495fe424bce029eeb3e","0x2c8d2fc58b80acb3b307c165af8f3ee296e6a271","0xfb3ad5550ca5730a6f91350032c4da1efdfde3e8","0x3fda9cc61b1fef8b2ffd715f0a9eef7182e48f37","0xd85c31854c2b0fb40aaa9e2fc4da23c21f829d46","0x15b142ce2002e2ca705e7b0cd233c4b41ba50806","0x9215e6362f76fc781df00d51293cc7179c6c99a4","0x764a726d9ced0433a8d7643335919deb03a9a935","0x4a0c64af541439898448659aedcec8e8e819fc53","0xd652c5425aea2afd5fb142e120fecf79e18fafc3","0x0ffebc403f2d3dd9ea5501ca03916e98967acb2d","0x3816dd4bd44c8830c2fa020a5605bac72fa3de7a","0xfa980ced6895ac314e7de34ef1bfae90a5add21b","0x18dd5b087bca9920562aff7a0199b96b9230438b","0x30c7235866872213f68cb1f08c37cb9eccb93452","0xfe9ede4478ad200a2186175a81f9ce9f0e679270","0x8b7dde054be9d180c1be7fae0874697374a49832","0x3dd79d6bd927615787cc95f2c7a77c9ac1af26f4","0xd3fdcb837dafdb7c9c3ebd48fe22a53f6dd3d7d7","0x6444c6c2d527d85ea97032da9a7504d6d1448ecf","0x1aa8fd5bcce2231c6100d55bf8b377cff33acfc3","0x32e09aa89e8ffd94c1bf53810d50f8e5f79a6697","0xd722e55c1d9d9fa0021a5215cbb904b92b3dc5d4","0x1f16e03c1a5908818f47f6ee7bb16690b40d0671","0xe642657e4f43e6dcf0bd73ef24008394574dee28","0x4eb92702ba4cfbf80561bad64d89c706ac824960","0x6b2504a03ca4d43d0d73776f6ad46dab2f2a4cfd","0xff8104251e7761163fac3211ef5583fb3f8583d6","0xb6fe221fe9eef5aba221c348ba20a1bf5e73624c","0xf757c9804cf2ee8d8ed64e0a8936293fe43a7252","0x6e2c81b6c2c0e02360f00a0da694e489acb0b05e","0xda7ad9dea9397cffddae2f8a052b82f1484252b3","0x9818b6c09f5ecc843060927e8587c427c7c93583","0xa53887f7e7c1bf5010b8627f1c1ba94fe7a5d6e0","0x6555255b8ded3c538cb398d9e36769f45d7d3ea7","0xfbb75a59193a3525a8825bebe7d4b56899e2f7e1","0xab36452dbac151be02b16ca17d8919826072f64a","0x0c5142bc58f9a61ab8c3d2085dd2f4e550c5ce0b","0xe0023e73aab4fe9a22f059a9d27e857e027ee3dc","0xed1779845520339693cdbffec49a74246e7d671b","0xac531eb26ca1d21b85126de8fb87e80e09002dcf","0xc729777d0470f30612b1564fd96e8dd26f5814e3","0x1c7a460413dd4e964f96d8dfc56e7223ce88cd85","0x306acd0c07c430abbbb2e74ef7bde94f32a898c0","0xeab49138ba2ea6dd776220fe26b7b8e446638956","0x5576d6ed9181f2225aff5282ac0ed29f755437ea","0xd1917629b3e6a72e6772aab5dbe58eb7fa3c2f33","0xe4796ccb6bb5de2290c417ac337f2b66ca2e770e","0x1f55a02a049033e3419a8e2975cf3f572f4e6e9a","0x868fced65edbf0056c4163515dd840e9f287a4c3","0x161e113b8e9bbaefb846f73f31624f6f9607bd44","0x768be13e1680b5ebe0024c42c896e3db59ec0149","0x22e6966b799c4d5b13be962e1d117b56327fda66","0x311935cd80b76769bf2ecc9d8ab7635b2139cf82","0xabe8e5cabe24cb36df9540088fd7ce1175b9bc52","0x3b86ad95859b6ab773f55f8d94b4b9d443ee931f","0xb9e1fd5a02d3a33b25a14d661414e6ed6954a721","0x64fcc3a02eeeba05ef701b7eed066c6ebd5d4e51","0x080d43c2164afdbc3712422ce78ab902ccab5ca1","0x50da645f148798f68ef2d7db7c1cb22a6819bb2c","0xd4554bea546efa83c1e6b389ecac40ea999b3e78","0xc19669a405067927865b40ea045a2baabbbe57f5","0x806041b6473da60abbe1b256d9a2749a151be6c6","0x194f360d130f2393a5e9f3117a6a1b78abea1624","0xdbfefd2e8460a6ee4955a68582f85708baea60a3","0x17906b1cd88aa8efaefc5e82891b52a22219bd45","0xedb6970b7be5a522cff14c8b679a2d813ff97b4d","0x0b2b2b2076d95dda7817e785989fe353fe955ef9","0xe31ee12bdfdd0573d634124611e85338e2cbf0cf","0x800822d361335b4d5f352dac293ca4128b5b605f","0x11dc28d01984079b7efe7763b533e6ed9e3722b9","0x688aee022aa544f150678b8e5720b6b96a9e9a2f","0x660975730059246a68521a3e2fbd4740173100f5","0x26f3901ac8a79c50fb0d8289c74f0d09adc42e29","0x9a33406165f562e16c3abd82fd1185482e01b49a","0xf544251d25f3d243a36b07e7e7962a678f952691","0x236aa50979d5f3de3bd1eeb40e81137f22ab794b","0xb616f8b391d1adc118fd7e4063526d5530d49b10","0x27f6c8289550fce67f6b50bed1f519966afe5287","0x0b2558bdbc7ffec0f327fb3579c23dabd1699706","0xa4a2e2ca3fbfe21aed83471d28b6f65a233c6e00","0x0c03ce270b4826ec62e7dd007f0b716068639f7b","0xe62bfbe57763ec24c0f130426f34dbce11fc5b06","0x78b3c724a2f663d11373c4a1978689271895256f","0x7252c865c05378ffc15120f428dd65804dd0ce63","0x5b5dee44552546ecea05edea01dcd7be7aa6144a","0xac1bd2486aaf3b5c0fc3fd868558b082a531b2b4","0xf7c1cefcf7e1dd8161e00099facd3e1db9e528ee","0x00000000a22c618fd6b4d7e9a335c4b96b189a38","0xa81a52b4dda010896cdd386c7fbdc5cdc835ba23","0xc27468b12ffa6d714b1b5fbc87ef403f38b82ad4","0
697x6cd905df2ed214b22e0d48ff17cd4200c1c6d8a3","0x74aa9bb52b36a378a6e641b86d7acb76dc9b3940","0x989cfdc3508500d0c91f22896a0d2ee1ef675870","0xfb8718a69aed7726afb3f04d2bd4bfde1bdcb294","0x0d97f261b1e88845184f678e2d1e7a98d9fd38de","0x9c0e042d65a2e1ff31ac83f404e5cb79f452c337","0xd403d1624daef243fbcbd4a80d8a6f36affe32b2","0x5ed25e305e08f58afd7995eac72563e6be65a617","0x5b2193fdc451c1f847be09ca9d13a4bf60f8c86b","0x0a1a1a107e45b7ced86833863f482bc5f4ed82ef","0x820c137fa70c8691f0e44dc420a5e53c168921dc","0x04d5ddf5f3a8939889f11e97f8c4bb48317f1938","0x71a67215a2025f501f386a49858a9ced2fc0249d","0x9b8df6e244526ab5f6e6400d331db28c8fdddb55","0x35e5db674d8e93a03d814fa0ada70731efe8a4b9","0xb0505e5a99abd03d94a1169e638b78edfed26ea4","0xc142171b138db17a1b7cb999c44526094a4dae05","0x2615a94df961278dcbc41fb0a54fec5f10a693ae","0x83f31af747189c2fa9e5deb253200c505eff6ed2","0x1fca74d9ef54a6ac80ffe7d3b14e76c4330fd5d8","0x767a739d1a152639e9ea1d8c1bd55fdc5b217d7f","0xbf927b841994731c573bdf09ceb0c6b0aa887cdd","0x4ed9df25d38795a47f52614126e47f564d37f347","0xa749de6c28262b7ffbc5de27dc845dd7ecd2b358","0xaeb4bb7debd1e5e82266f7c3b5cff56b3a7bf411","0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b","0x490a4b510d0ea9f835d2df29eb73b4fca5071937","0xb0ffa8000886e57f86dd5264b9582b2ad87b2b91","0x23471e7250bcd7ee21df3f39ed6151931d1e076b","0x4e74d4db6c0726ccded4656d0bce448876bb4c7a","0x0555e30da8f98308edb960aa94c0db47230d2b9c","0xef4461891dfb3ac8572ccf7c794664a8dd927945","0x04c0599ae5a44757c0af6f9ec3b93da8976c150a","0xff8adec2221f9f4d8dfbafa6b9a297d17603493d","0xa88594d404727625a9437c3f886c7643872296ae","0x7f62ac1e974d65fab4a81821ca6af659a5f46298","0x0ceac003b0d2479bebec9f4b2ebad0a803759bbf","0x166e70941262ae7cbf9df5c8897a6242c546457d","0x3e31966d4f81c72d2a55310a6365a56a4393e98d","0xf3df0a31ec5ea438150987805e841f960b9471b6","0xedfa23602d0ec14714057867a78d01e94176bea0","0x5cda0e1ca4ce2af96315f7f8963c85399c172204","0x9483ab65847a447e36d21af1cab8c87e9712ff93","0x36be1d329444aef5d28df3662ec5b4f965cd93e9","0x750cf88d9e0c2bcedeec31d5faad6ed6e3f1abc6","0x23da5f2d509cb43a59d43c108a43edf34510eff1","0x0a4c9cb2778ab3302996a34befcf9a8bc288c33b","0x6e352b77796857c01fac416cc18413a9cd09c1b4","0xb99fbe68c8a0cc14be8c1af73dd4dfea8a76add7","0x9eaf8c1e34f05a589eda6bafdf391cf6ad3cb239","0xaac78d1219c08aecc8e37e03858fe885f5ef1799","0xb755506531786c8ac63b756bab1ac387bacb0c04","0xf43eb8de897fbc7f2502483b2bef7bb9ea179229","0xdf49c226ed9cf05be0e38cdb86df4e8a945158b1","0xa3a2cdd230f9b3ff6e01a01534a3ed3cbf049815","0x1111111111166b7fe7bd91427724b487980afc69","0x6985884c4392d348587b19cb9eaaf157f13271cd"];new Set(Z0e);const $D=(e,t)=>{if(!e||!t)return;const n=e.address,r=t.address;if(!en.xor([n,r],[Qf,IO]).length)return"xveloBridge";if(n===Lf&&(r===Lf||t.chainId===Dp.id&&r===og[t.chainId].superchainConfig.stable)||e.chainId===ux.chainId&&e.address===ux.address&&t.address===Lf||e.chainId===Dp.id&&n===og[e.chainId].superchainConfig.stable&&r===Lf)return"usdtBridge";if([Xf,$p].includes(n)&&r===Iv)return"opBridge"},X0e=(e,t)=>{if(!e||!t)return!1;const n=`${e.chainId}:${e.address}`;return zO.superchainKeys.includes(n)&&Lf===t.address},Q0e=(e,t)=>!1,t_=e=>{const t=og[e.chainId]?.superchainConfig??!1;return!t||[Xf,$p].includes(e.address)?!1:!!t.interchainAccount&&!!t.usdtBridge&&hd.includes("superswaps")},gk=(e,t)=>!1,UD=({token0:e,token1:t,amountIn:n,token0Balance:r,quote:i,quoteLoading:s,walletType:o,swapReceiver:a})=>{if(!e||!t)return;if([Xf,$p].includes(t.address))return{type:"xop-end",renderFlow:!1};if([Xf,$p].includes(e.address)&&t.address!==Iv)return{type:"xop-end",renderFlow:!1};const c=!t_(e)||!t_(t);if(!$D(e,t)&&e.chainId!==t.chainId&&c)return{type:"superswap-end",chain:(t_(e)?Zu(t.chainId):Zu(e.chainId)).chain.name,renderFlow:!1};if(r!==void 0&&n!==void 0&&n>r)return{type:"not-enough-token-end",renderFlow:!0};const d=o==="MSIG"||o==="4337";if(n&&gk()&&d&&(!a||!Sr(a)))return{type:"msig-superswap-end",renderFlow:!1};if(e.chainId===t.chainId&&i===null&&s===!1)return{type:"no-routes-end",renderFlow:!0}},J0e=(e,t)=>{if(e===ux.address&&t===ux.chainId)return ux},TT=e=>e===Dp.id?og[e].superchainConfig.stable:Lf,zD=(e,t)=>{const n=xy.bridgeTokensByChain[e],r=xy.bridgeTokensByChain[t],i=xy.bridgeByChain[t];return{collateralSupported:!!n&&!!r&&!!i,fallbackTokens:{origin:TT(e),destination:TT(t)},collateralTokens:{origin:n,destination:r}}},VD=A.createContext(void 0),qD=({children:e,placeholder:t,onLoaded:n,syncQueryParams:r=!0,token0Tag:i="token0",token1Tag:s="token1"})=>{const[o,a]=A.useState(),[c,d]=A.useState(),{chainId:h}=Rr(),y=p3.some(E=>E.id===h)?h:Pt.id,{chain:g}=Zn(y),{data:x}=ys(),_=g.superchainConfig.defaultTokens,S=x?.sorted||[],[I,L]=xd(),D=String(I.get(i)||"").toLowerCase(),F=String(I.get(s)||"").toLowerCase(),$=Number(I.get("chain0")??I.get("chain")??g.id),z=Number(I.get("chain1")??I.get("chain")??g.id);window.location.pathname.includes("swap")||window.location.pathname;const{data:V=[]}=yk(),K=x?.[`${$}:${D}`],te=J0e(D,$),Q=x?.[`${z}:${F}`],[[ee],ne]=C6([D],{enabled:!K&&!te,chain:$}),[[J],M]=C6([F],{enabled:!Q,chain:z,onlyChains:F===Iv?[o0.id]:void 0}),m=()=>{L({[i]:o?.address||D||_[1],[s]:c?.address||F||_[0],chain0:(o?.chainId??$??g.id).toString(),chain1:(c?.chainId??z??g.id).toString()},{preserveParams:!0})};return A.useEffect(()=>{if(S.length>0&&!ne&&!M&&(V.length||!0)){const E=V.find(B=>B.address===D),C=V.find(B=>B.address===F),N=K||te||E||ee||x?.[`${g.id}:${_[1]}`],P=Q||C||J||x?.[`${g.id}:${_[0]}`];!o&&!c&&n?.({token0:N,token1:P}),o||a(N),c||d(P)}},[D,F,S,x,ee,J,ne,M,g,V]),A.useEffect(()=>
697{r&&m()},[o,c,r]),u.jsx(VD.Provider,{value:{tokens:x,token0:o,token1:c,setToken0:a,setToken1:d},children:x&&o&&c?e:t})},HD=()=>{const e=A.useContext(VD);if(!e)throw new Error("useTokensContext must be used within a TokensContext.Provider");return e};function WD({title:e,description:t,icon:n,className:r,children:i}){return u.jsxs("div",{className:It("mx-auto flex max-w-xs flex-col items-center justify-center py-12 text-center sm:max-w-sm sm:py-16",r),children:[n&&u.jsx("div",{className:"mb-3 rounded-full bg-primary/10 p-4 text-primary",children:A.cloneElement(n,{className:"size-6",strokeWidth:1.5})}),u.jsx("h4",{className:"mb-2 text-sm font-semibold",children:e}),u.jsx("p",{className:"max-w-xs text-balance text-sm text-accent-50",children:t}),i&&u.jsx("div",{className:"mt-5",children:i})]})}function zR({isOpen:e,onClose:t,children:n,className:r}){return u.jsxs(u.Fragment,{children:[u.jsx("div",{role:"button",className:It("absolute inset-0 z-10 cursor-default bg-black/60 transition-opacity",e?"visible opacity-100":"pointer-events-none invisible opacity-0"),onClick:t}),u.jsx("div",{className:It("absolute bottom-0 left-0 right-0 z-10 rounded-t-2xl bg-background transition",e?"translate-y-0":"translate-y-full",r),children:n})]})}function eme({value:e,decimals:t,className:n}){return u.jsxs("span",{className:It("inline-flex text-xs text-accent-50",n),children:[u.jsx("span",{children:"$"}),u.jsx(Gt,{amount:e,decimals:t??18,showLogo:!1,plain:!0,showSymbol:!0})]})}function GD({tokens:e}){const t=A.useMemo(()=>e.reduce((r,i)=>r+i.balance,0n),[e]),n=A.useMemo(()=>e.reduce((r,i)=>r+i.balanceValue,0n),[e]);return t===0n?null:u.jsxs("div",{className:"flex flex-col items-end gap-1",children:[u.jsx("span",{className:"text-sm font-semibold",children:u.jsx(Gt,{amount:t,decimals:e[0].decimals,showLogo:!1,plain:!0})}),u.jsx(eme,{value:n})]})}const tme=p3.reduce((e,t)=>(e[t.id]=t.superchainConfig.oracleConnectors,e),{}),KD=A.memo(function({tokens:t,onSelect:n,setExpanded:r,isExpanded:i,className:s,children:o,showConnectorSymbol:a=!1}){const[c,d]=A.useState(!1),h=A.useRef(null),y=A.useMemo(()=>en.uniqBy(t,"chainId").length,[t]),g=A.useMemo(()=>t.length>1,[t]),x=A.useMemo(()=>t[0],[t]),_=A.useMemo(()=>a&&tme[x.chainId]?.includes(x.address),[x.chainId,x.address]),S=()=>{g?r(t):n(x)};return A.useEffect(()=>{const I=new IntersectionObserver(([L])=>{L.isIntersecting&&(d(!0),I.disconnect())},{threshold:0});return h.current&&I.observe(h.current),()=>{I.disconnect()}},[]),u.jsx("div",{ref:h,role:"button","data-testid":`asset-select-${x.symbol}`,tabIndex:0,onClick:S,className:It("group flex h-20 cursor-pointer items-center justify-between gap-3 rounded-xl","bg-accent-0 p-5 outline-none transition hover:bg-accent-5 focus:bg-accent-5",s),onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&S()},children:c&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Xu,{address:x.address,chainId:x.chainId,className:"size-10"}),u.jsxs("div",{className:"flex flex-col gap-1",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-sm font-semibold",children:[x.symbol,!g&&u.jsxs("div",{className:"flex items-center gap-1.5",children:[_&&u.jsx(jr,{content:"Connector token",children:u.jsx("div",{className:"rounded-full bg-green/10 px-1 text-green",children:u.jsx(Ire,{className:"size-3"})})}),x.listed?u.jsx(jr,{content:"Listed token",children:u.jsx(_r,{className:"size-3 opacity-0 transition group-hover:opacity-100",src:`/svg/${oo}/listed.svg`})}):x.emerging?u.jsx(jr,{content:"Emerging token",children:u.jsx(_r,{className:"size-3",src:"/svg/emerging.svg"})}):u.jsx(jr,{content:"Custom token",children:u.jsx("div",{className:"rounded-full p-0.5 text-amber transition hover:bg-amber/10",children:u.jsx(dh,{className:"size-3"})})})]})]}),g?u.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[u.jsx("div",{className:xi("flex size-3 items-center justify-center rounded bg-accent-20 text-accent-50 transition","group-hover:bg-primary group-hover:text-white group-focus:bg-primary group-focus:text-white",i&&"bg-primary text-white"),children:u.jsx(IL,{className:xi("size-2",i&&"rotate-180")}
697)}),u.jsxs("div",{className:xi("text-accent-50 group-hover:text-primary group-focus:text-primary",i&&"text-primary"),children:[i?"Hide":"Show"," ",y," chain",y>1&&"s"]})]}):u.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-accent-50",children:[!1,u.jsx("div",{className:It("flex items-center gap-1.5 transition",!1),children:x.wrappedAddress?u.jsx(u.Fragment,{children:"Native"}):u.jsx(Wg,{address:x.address,showCopy:!0})})]})]})]}),o||u.jsx(GD,{tokens:t})]})})}),nme=A.memo(function({token:t,onSelect:n,testId:r,children:i,className:s}){return u.jsxs("div",{role:"button",className:It("group flex items-center justify-between rounded-xl bg-accent-0 p-5 transition hover:bg-accent-5 focus:bg-accent-5",s),onClick:o=>n(t,o),"data-testid":r,children:[u.jsxs("div",{className:"flex flex-col items-start gap-1",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(qx,{chainId:t.chainId,className:"text-sm font-semibold text-foreground"}),t.listed?u.jsx(jr,{content:"Listed token",children:u.jsx(_r,{className:"size-3 opacity-0 transition group-hover:opacity-100",src:`/svg/${oo}/listed.svg`})}):t.emerging?u.jsx(jr,{content:"Emerging token",children:u.jsx(_r,{className:"size-3",src:"/svg/emerging.svg"})}):u.jsx(jr,{content:"Custom token",children:u.jsx("div",{className:"rounded-full p-0.5 text-amber transition hover:bg-amber/10",children:u.jsx(dh,{className:"size-3"})})})]}),u.jsx("div",{className:"text-xs text-accent-50",children:t.wrappedAddress?u.jsx(u.Fragment,{children:"Native"}):u.jsx(Wg,{address:t.address,showCopy:!0})})]}),i||u.jsx(GD,{tokens:[t]})]})}),rme=A.memo(function({tokens:t,onSelect:n,onClose:r}){return t?u.jsxs(u.Fragment,{children:[u.jsx(KD,{tokens:t,onSelect:n,setExpanded:r,isExpanded:!0,className:"relative z-10 mx-4 mt-4 shadow-lg"}),u.jsx("div",{className:"smooth-scroll flex grow flex-col gap-1 overflow-y-auto bg-background p-6 pt-2",children:t.map(i=>u.jsx(nme,{testId:`asset-select-${i.symbol}-${i.chainId}`,onSelect:n,token:i},`${i.chainId}:${i.address}`))})]}):null});function ime({length:e=1}){return u.jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:e}).map((t,n)=>u.jsxs("div",{className:"flex items-center gap-4 p-5",children:[u.jsx("div",{className:"size-10 animate-loop rounded-full bg-gradient-to-r from-accent-0 via-accent-10 to-accent-0 bg-2x"}),u.jsxs("div",{className:"flex flex-col gap-2.5",children:[u.jsx("div",{className:"h-3 w-16 animate-loop rounded bg-gradient-to-r from-accent-0 via-accent-10 to-accent-0 bg-2x"}),u.jsx("div",{className:"h-2 w-24 animate-loop rounded bg-gradient-to-r from-accent-0 via-accent-10 to-accent-0 bg-2x"})]})]},n))})}function sme({message:e,onCancel:t,onConfirm:n,children:r}){return u.jsxs("div",{className:"m-auto grid items-center gap-4",children:[u.jsx("div",{className:"grid",children:r}),u.jsx("div",{className:"mx-2 text-center text-sm text-accent-50 sm:mx-16",children:e}),u.jsxs("div",{className:"mx-6 grid grid-cols-2 gap-2 pt-4 sm:mx-20 sm:gap-4",children:[u.jsx(wn,{color:"secondary",onClick:t,children:"Cancel"}),u.jsx(wn,{"data-testid":"continue-button",onClick:n,children:"Continue"})]})]})}function ome({onCancel:e,onConfirm:t}){return u.jsx(sme,{message:u.jsxs("p",{children:["Do your own research before swapping. This token was created permissionless and the underlying asset may not be secure. Please review our"," ",u.jsx(qn,{className:"underline underline-offset-2",href:"/legal",children:"legal disclaimer"})," ","before swapping."]}),onConfirm:t,onCancel:e,children:u.jsx("div",{className:"m-auto grid gap-3",children:u.jsx("div",{className:"m-auto rounded-full bg-amber/10 p-5",children:u.jsx(dh,{className:"size-6 text-amber",strokeWidth:1.5})})})})}function ame(e,t=[],n,r,i){const{data:s}=ys(),o=A.useMemo(()=>{if(!s)return;if(!e?.length&&!t.length&&!n&&!i)return s.grouped;let c=s.grouped.map(h=>h.filter(y=>!(n&&n!==y.chainId||e?.length&&e.includes(`${y.chainId}:${y.address}`)))).filter(h=>h.length);i&&(c=i(c));const d=[...t];return d.length&&(c=c.map(h=>{const y=d.findIndex(g=>g.symbol===h[0].symbol&&!h.some(x=>x.chainId===g.chainId&&x.address.toLowerCase()===g.address.toLowerCase()));if(y!==-1){const g=[...h,d[y]];return d.splice(y,1),g}return h}),d.length&&d.forEach(h=>{c.push([h])}
697)),c},[s,e,n,t,i]);return A.useMemo(()=>{if(!o)return[];if(!r)return o;const c=r.toLowerCase();return o.map(d=>d.filter(h=>h.symbol.toLowerCase().includes(c)||h.address.toLowerCase().includes(c))).filter(d=>d.length)},[o,r])}const cme=A.memo(function({chain:t,include:n,exclude:r,tokenFilter:i,setOpen:s,onSelect:o,token:a,showChains:c,testId:d}){const[h,y]=A.useState(""),[g,x]=A.useState(),[_,S]=A.useState(),I=A.useRef(null),[L,D]=A.useState(1),F=50,{isSm:$}=M3(),[z,V]=C6([h??""],{dangerouslyPersist:!0}),K=ig(z),te=ame(r,n,t,h,i),Q=K.length||V?K.length?[K]:[]:te,ee=A.useMemo(()=>Q.slice(0,F*L),[Q,L,F]);A.useEffect(()=>{$&&!c&&I.current?.focus()},[]),A.useEffect(()=>{!a||!c||x(Q.find(J=>J.length>1&&J.find(M=>M.address===a.address)))},[]);const ne=A.useCallback(J=>{const M=()=>{S(void 0)},m=()=>{o(J),s(!1)};if(document.activeElement?.blur(),K.length){S(u.jsx(ome,{onCancel:M,onConfirm:m}));return}m()},[K]);return u.jsxs("div",{"data-testid":`token-select-dialog-${d}`,className:"bg-background",children:[u.jsx(gh,{className:"z-10 rounded-none border-none bg-accent-0 px-1 py-2 shadow outline-transparent dark:shadow-lg",ref:I,value:h,onChange:J=>y(J.target.value),icon:Lx,placeholder:"WETH, USDC, 0x..."}),u.jsxs("div",{className:"smooth-scroll h-[70vh] space-y-1 overflow-y-auto bg-background p-4",children:[ee.map(J=>u.jsx(KD,{tokens:J,onSelect:ne,setExpanded:x},`${J[0].chainId}:${J[0].address}`)),ee.length!==Q.length&&u.jsx("button",{className:xi("block w-full justify-center rounded-xl bg-accent-0 p-3 text-center text-xs text-accent-50","outline-none transition hover:bg-accent-5 hover:text-foreground focus:bg-accent-5"),onClick:()=>D(L+1),children:"Show more"}),V?u.jsx(ime,{}):Q.length===0&&u.jsx(WD,{icon:u.jsx(Lx,{}),title:"No results found",description:"Make sure you've used the right ticker or address."})]}),u.jsx(zR,{isOpen:!!g,onClose:()=>x(void 0),className:"flex h-[70vh] flex-col",children:u.jsx(rme,{tokens:g,onSelect:ne,onClose:()=>x(void 0)})}),u.jsx(zR,{className:"flex h-[70vh] flex-col items-center justify-center p-5",isOpen:!!_,onClose:()=>S(void 0),children:_})]})}),ume=A.memo(function({token:t,showChains:n,include:r,exclude:i,chain:s,tokenFilter:o,className:a,onSelect:c,canSelect:d=!0,placeholder:h,buttonContent:y,title:g,testId:x}){const[_,S]=A.useState(!1);return u.jsxs(u.Fragment,{children:[u.jsx("button",{type:"button","data-testid":`token-select-button-${x}`,onClick:()=>{d&&S(!0)},className:It("flex items-center justify-between gap-2 rounded-full bg-accent-0 p-2 pr-4 text-xs font-semibold transition hover:opacity-80 sm:p-3 sm:pr-5 sm:text-sm",a),children:y??u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Xu,{address:t?.address,chainId:t?.chainId,className:"size-6"}),t?u.jsx("span",{placeholder:h,children:t.symbol}):u.jsx("span",{children:h})]}),d&&u.jsx(Ju,{className:"-mr-1 size-4"})]})}),u.jsx(mh,{isOpen:_,onClose:()=>S(!1),title:g||"Select token",padded:!1,children:u.jsx(cme,{include:r,exclude:i,onSelect:c,chain:s,tokenFilter:o,setOpen:S,token:t,showChains:n,testId:x},x)})]})}),Kx=(e,t,n=2)=>A.useMemo(()=>{if(typeof t!="bigint"||e&&typeof e.price!="bigint"){const i=new Error("useTokenValue");throw dr("useTokenValue",Gp({amount:t,price:e.price,decimals:e.decimals,error:i.stack})),i}if(!e)return{value:0n,withoutComma:0,pretty:"0"};const r=Is(t,e.price,e.decimals);return{value:r,withoutComma:Number(Ns(r,18)),pretty:B9(r,18,{digits:n})}},[t,e,n]),VR=A.memo(function({assets:t,asset:n,setAsset:r,amount:i,setAmount:s,disabled:o=!1,readOnly:a=!1,alert:c=!0,percentShortcuts:d=!1,testId:h,className:y,chain:g,isFromToken:x,include:_,exclude:S,tokenFilter:I,dialogTitle:L,children:D,autofocus:F=!1,handleInputFocus:$,showUserBalance:z=!0,required:V=!0,onInvalidChange:K}){const{auxiliaryFunds:te}=Zp(n.chainId),[Q,ee]=A.useState(!1),[ne,J]=A.useState(!1),[M,m]=A.useState(i?Ns(i,n.decimals):""),{balance:E,isLoading:C}=ad(n,{fetchInterval:5e3});function N(pe="100"){if(o)return;const we=E?.value||0n,Ce=Zf(we,n.decimals,"0",pe);m(Ns(Ce,n.decimals))}A.useEffect(()=>{let pe=0n;try{M!==""&&(pe=pa(M,n.decimals))}catch(we){M!==""&&toast(we)}s?.(pe)},[M,n]);const P=A.useMemo(()=>te&&n.symbol==="ETH"?!1:!!(i!==void 0&&i!==0n&&E&&E.value<i),[te,i,E]);A.useEffect(()=>{K&&K(P)},[P,K]);const{pretty:B}=Kx(n,i||0n),O=(!o||c)&&P,j=o?Ns(i||0n,n?.decimals):M,{utils:{getId:v,topicPresent:k,pushOrMutate:X}}=l0();A.useEffect(()=>{if(o)return;const pe=v("ASINPT",h);
697!k(pe,!0)&&!j||X(pe,we=>we?`${we}>${j}`:j)},[j]);const re=u.jsxs("div",{className:"flex grow flex-col justify-center gap-1",children:[u.jsx("input",{"data-testid":`${h}-asset-input-elem`,"data-test-amount":j,autoFocus:F,onFocus:pe=>{J(!0),$?.(pe)},onBlur:()=>J(!1),onPointerDown:pe=>$?.(pe),required:V,className:It("block h-7 w-full bg-transparent text-end font-semibold outline-none placeholder:text-accent-40 sm:h-9",o&&j==="0"&&"text-accent-40",j?.length>11?"text-lg sm:text-xl":"text-2xl sm:text-3xl",O&&"text-red"),placeholder:"0",disabled:o,readOnly:a,value:j,onClick:pe=>{$?.(pe),pe.target.select()},onInput:pe=>{const we=pe.target;we.value=we.value.replace(/[^0-9.,]/g,"")},onChange:pe=>{if(o)return;const we=pe.target.value.replace(/,/g,".");(we.match(/\./g)||[]).length>1||m(we)},pattern:"^[0-9]*[.,]?[0-9]*$",inputMode:"decimal",autoComplete:"off",autoCorrect:"off",minLength:1}),u.jsxs("div",{className:"text-end text-xs text-accent-50",children:["~$",B]})]}),ue=u.jsx(ume,{token:n,canSelect:t.length>0,onSelect:r,title:L,chain:g,testId:h,include:_,exclude:S,tokenFilter:I,className:"shrink-0 bg-accent-10"});return u.jsxs("div",{className:It("space-y-3",y),"data-testid":h,children:[u.jsxs("div",{className:"flex items-center justify-between px-2",children:[u.jsx("div",{className:"text-sm font-semibold",children:D}),!z&&x&&u.jsx("div",{className:"size-5"}),z&&u.jsxs("div",{className:"flex items-center gap-2 text-right text-xs",children:[C&&u.jsx(Pv,{size:"xs"}),n&&u.jsxs("button",{type:"button",onClick:()=>N("100"),className:It("flex items-center gap-1.5 transition",E?.value===0n&&"text-accent-50",O&&"text-red",o&&"cursor-default"),children:[u.jsx("div",{className:"hidden text-accent-50 sm:block",children:"Balance"}),u.jsx(Sy,{className:"block size-3 text-accent-50 sm:hidden",strokeWidth:1.5}),u.jsx(Gt,{amount:E?.value||0n,decimals:n.decimals,symbol:n.symbol,showSymbol:!0,showLogo:!1,plain:!0})]}),!!(n&&d&&E?.value&&E?.value!==0n)&&u.jsxs(wn,{size:"xs",type:"button",color:O?"error":"secondary",onClick:()=>ee(!Q),children:[u.jsx($re,{className:"size-2.5"}),Q?u.jsx(IL,{className:"size-3"}):u.jsx(Ju,{className:"size-3"})]})]})]}),!!(n&&Q&&E?.value&&E?.value!==0n)&&u.jsxs("div",{className:"flex items-center justify-end border-t border-accent-10 px-2 py-4 sm:justify-between",children:[u.jsx("div",{className:"hidden text-xs text-accent-50 sm:block",children:"Select a share of your balance"}),u.jsx("div",{className:"flex items-center gap-2",children:["10","25","50","75","100"].map(pe=>u.jsxs(wn,{size:"xs",color:"neutral",onClick:()=>N(pe||"0"),children:[pe,"%"]},`pct-${pe}`))})]}),u.jsxs("div",{className:It("flex items-center gap-3 rounded-xl border border-accent-30 p-4 sm:gap-5 sm:p-5",ne&&"border-primary outline outline-2 outline-primary/30",O&&"border-red outline-red/30"),children:[ue,re]})]})});function YD({flip:e,testId:t,loading:n,className:r}){return u.jsxs("div",{"data-testid":t,className:It("flex items-center gap-3",r),children:[u.jsx("div",{className:"h-px grow bg-gradient-to-l from-accent-20 to-accent-20/0"}),u.jsxs("button",{type:"button",onClick:e,className:It("relative rounded-full bg-primary/10 p-2 text-primary transition hover:opacity-80"),children:[u.jsx(a6,{className:"h-4 w-4",strokeWidth:2}),n&&u.jsx(_r,{src:"/svg/spinner.svg",className:"absolute inset-0 h-full w-full animate-spin"})]}),u.jsx("div",{className:"h-px grow bg-gradient-to-r from-accent-20 to-accent-20/0"})]})}function lme({xop:e,changeTokens:t}){const n=e&&`/swap?chain0=${e.chainId}&from=${e.address}&chain1=${o0.id}&to=${Iv}`;return u.jsxs(Zg,{type:"warning",icon:jv,children:[u.jsx("span",{className:"font-semibold",children:"Warning:"})," OP Token use is restricted outside of OP Mainnet."," ",t&&u.jsxs(u.Fragment,{children:[u.jsxs("button",{className:"cursor-pointer underline hover:no-underline",onClick:t,children:[" ","Bridge to OP Mainnet"]})," ",u.jsx("span",{children:"for full functionality."})]}),n&&u.jsxs(qn,{className:"inline underline hover:no-underline sm:inline-block",href:n,children:[" ","Bridge to OP Mainnet"," ",u.jsx("span",{className:"hidden sm:inline",children:"for full functionality"})]})]})}function dme(){const{data:e}=ys(),[[t]]=C6([Iv],{enabled:!0,onlyChains:[o0.id]});return A.useMemo(()=>
vendor: 4,135 bytes, line 697
697{if(!e||!t)return[];const r=e[`${Pt.id}:${Xf}`];if(r&&t)return[{...t,price:r.price,balanceValue:Is(t.balance,r.price)}]},[t,e])}function fme({icon:e,resetIcon:t,address:n,onChange:r,placeholder:i="0x",className:s}){return u.jsx(gh,{icon:e,endIcon:u.jsx("div",{className:"p-3 pl-0",onClick:()=>r(""),children:t}),iconClassName:"flex pr-3 h-full border-r border-accent-20",placeholder:i,value:n??"",onChange:o=>r(o.target.value),className:s})}var h5={exports:{}},qR;function hme(){if(qR)return h5.exports;qR=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(z,V,K){return Function.prototype.apply.call(z,V,K)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(z){return Object.getOwnPropertyNames(z).concat(Object.getOwnPropertySymbols(z))}:n=function(z){return Object.getOwnPropertyNames(z)};function r($){console&&console.warn&&console.warn($)}var i=Number.isNaN||function(z){return z!==z};function s(){s.init.call(this)}h5.exports=s,h5.exports.once=L,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a($){if(typeof $!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof $)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function($){if(typeof $!="number"||$<0||i($))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+$+".");o=$}}),s.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},s.prototype.setMaxListeners=function(z){if(typeof z!="number"||z<0||i(z))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+z+".");return this._maxListeners=z,this};function c($){return $._maxListeners===void 0?s.defaultMaxListeners:$._maxListeners}s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(z){for(var V=[],K=1;K<arguments.length;K++)V.push(arguments[K]);var te=z==="error",Q=this._events;if(Q!==void 0)te=te&&Q.error===void 0;else if(!te)return!1;if(te){var ee;if(V.length>0&&(ee=V[0]),ee instanceof Error)throw ee;var ne=new Error("Unhandled error."+(ee?" ("+ee.message+")":""));throw ne.context=ee,ne}var J=Q[z];if(J===void 0)return!1;if(typeof J=="function")t(J,this,V);else for(var M=J.length,m=_(J,M),K=0;K<M;++K)t(m[K],this,V);return!0};function d($,z,V,K){var te,Q,ee;if(a(V),Q=$._events,Q===void 0?(Q=$._events=Object.create(null),$._eventsCount=0):(Q.newListener!==void 0&&($.emit("newListener",z,V.listener?V.listener:V),Q=$._events),ee=Q[z]),ee===void 0)ee=Q[z]=V,++$._eventsCount;else if(typeof ee=="function"?ee=Q[z]=K?[V,ee]:[ee,V]:K?ee.unshift(V):ee.push(V),te=c($),te>0&&ee.length>te&&!ee.warned){ee.warned=!0;var ne=new Error("Possible EventEmitter memory leak detected. "+ee.length+" "+String(z)+" listeners added. Use emitter.setMaxListeners() to increase limit");ne.name="MaxListenersExceededWarning",ne.emitter=$,ne.type=z,ne.count=ee.length,r(ne)}return $}s.prototype.addListener=function(z,V){return d(this,z,V,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(z,V){return d(this,z,V,!0)};function h(){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 y($,z,V){var K={fired:!1,wrapFn:void 0,target:$,type:z,listener:V},te=h.bind(K);return te.listener=V,K.wrapFn=te,te}s.prototype.once=function(z,V){return a(V),this.on(z,y(this,z,V)),this},s.prototype.prependOnceListener=function(z,V){return a(V),this.prependListener(z,y(this,z,V)),this},s.prototype.removeListener=function(z,V){var K,te,Q,ee,ne;if(a(V),te=this._events,te===void 0)return this;if(K=te[z],K===void 0)return this;if(K===V||K.listener===V)--this._eventsCount===0?this._events=Object.create(null):(delete te[z],te.removeListener&&this.emit
697("removeListener",z,K.listener||V));else if(typeof K!="function"){for(Q=-1,ee=K.length-1;ee>=0;ee--)if(K[ee]===V||K[ee].listener===V){ne=K[ee].listener,Q=ee;break}if(Q<0)return this;Q===0?K.shift():S(K,Q),K.length===1&&(te[z]=K[0]),te.removeListener!==void 0&&this.emit("removeListener",z,ne||V)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(z){var V,K,te;if(K=this._events,K===void 0)return this;if(K.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):K[z]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete K[z]),this;if(arguments.length===0){var Q=Object.keys(K),ee;for(te=0;te<Q.length;++te)ee=Q[te],ee!=="removeListener"&&this.removeAllListeners(ee);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(V=K[z],typeof V=="function")this.removeListener(z,V);else if(V!==void 0)for(te=V.length-1;te>=0;te--)this.removeListener(z,V[te]);return this};function g($,z,V){var K=$._events;if(K===void 0)return[];var te=K[z];return te===void 0?[]:typeof te=="function"?V?[te.listener||te]:[te]:V?I(te):_(te,te.length)}s.prototype.listeners=function(z){return g(this,z,!0)},s.prototype.rawListeners=function(z){return g(this,z,!1)},s.listenerCount=function($,z){return typeof $.listenerCount=="function"?$.listenerCount(z):x.call($,z)},s.prototype.listenerCount=x;function x($){var z=this._events;if(z!==void 0){var V=z[$];if(typeof V=="function")return 1;if(V!==void 0)return V.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function _($,z){for(var V=new Array(z),K=0;K<z;++K)V[K]=$[K];return V}function S($,z){for(;z+1<$.length;z++)$[z]=$[z+1];$.pop()}function I($){for(var z=new Array($.length),V=0;V<z.length;++V)z[V]=$[V].listener||$[V];return z}function L($,z){return new Promise(function(V,K){function te(ee){$.removeListener(z,Q),K(ee)}function Q(){typeof $.removeListener=="function"&&$.removeListener("error",te),V([].slice.call(arguments))}F($,z,Q,{once:!0}),z!=="error"&&D($,te,{once:!0})})}function D($,z,V){typeof $.on=="function"&&F($,"error",z,V)}function F($,z,V,K){if(typeof $.on=="function")K.once?$.once(z,V):$.on(z,V);else if(typeof $.addEventListener=="function")$.addEventListener(z,function te(Q){K.once&&$.removeEventListener(z,te),V(Q)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof $)}return h5.exports}var ZD=hme();const P3e=va(ZD);var n_,HR;function bk(){if(HR)return n_;HR=1;function e(t){if(typeof t!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=t}return typeof Symbol<"u"&&(e.prototype[Symbol.iterator]=function(){return this}),e.of=function(){var t=arguments,n=t.length,r=0;return new e(function(){return r>=n?{done:!0}:{done:!1,value:t[r++]}})},e.empty=function(){var t=new e(function(){return{done:!0}});return t},e.fromSequence=function(t){var n=0,r=t.length;return new e(function(){return n>=r?{done:!0}:{done:!1,value:t[n++]}})},e.is=function(t){return t instanceof e?!0:typeof t=="object"&&t!==null&&typeof t.next=="function"},n_=e,n_}var pme=bk();const ic=va(pme);var p5={},WR;function mme(){return WR||(WR=1,p5.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",p5.SYMBOL_SUPPORT=typeof Symbol<"u"),p5}var r_,GR;function XD(){if(GR)return r_;GR=1;var e=bk(),t=mme(),n=t.ARRAY_BUFFER_SUPPORT,r=t.SYMBOL_SUPPORT;function i(s){return typeof s=="string"||Array.isArray(s)||n&&ArrayBuffer.isView(s)?e.fromSequence(s):typeof s!="object"||s===null?null:r&&typeof s[Symbol.iterator]=="function"?s[Symbol.iterator]():typeof s.next=="function"?s:null}return r_=function(o){var a=i(o);if(!a)throw new Error("obliterator: target is not iterable nor a valid iterator.");return a},r_}var i_,KR;function yme(){if(KR)return i_;KR=1;var e=XD();return i_=function(n,r){for(var i=arguments.length>1?r:1/0,s=i!==1/0?new Array(i):[],o,a=0,c=e(n);;){if(a===i)return s;if(o=c.next(),o.done)return a!==r&&(s.length=a),s;s[a++]=o.value}},i_}var gme=yme();const QD=va(gme);var s_,YR;function bme(){if(YR)return s_;YR=1;var e=bk(),t=XD();return s_=function(){var r=arguments,i=null,s=-1;return new e(function(){var a=null;do{if(i===null){if(s++,s>=r.length)return{done:!0};i=t(r[s])}if(a=i.next(),a.done===!0){i=null;continue}break}while(!0);return a})},s_}var xme=bme();const Ql=va(xme);function vme(){const e=arguments[0];for(let t=1,n=arguments.length;t<n;t++)if(arguments[t])for(const r in arguments[t])e[r]=arguments[t][r];return e}let Pi=vme;typeof Object.assign=="function"&&(Pi=Object.assign);function nc(e,t,n,r){const i=e._nodes.get(t);let s=null;return i&&(r==="mixed"?s=i.out&&i.out[n]||i.undirected&&i.undirected[n]:r==="directed"?s=i.out&&i.out[n]:s=i.undirected&&i.undirected[n]),s}function ds(e){return typeof e=="object"&&e!==null&&e.constructor===Object}function JD(e){let t;for(t in e)return!1;return!0}
697function Wa(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!0,value:n})}function Cc(e,t,n){const r={enumerable:!0,configurable:!0};typeof n=="function"?r.get=n:(r.value=n,r.writable=!1),Object.defineProperty(e,t,r)}function ZR(e){return!(!ds(e)||e.attributes&&!Array.isArray(e.attributes))}function wme(){let e=Math.floor(Math.random()*256)&255;return()=>e++}class xk extends Error{constructor(t){super(),this.name="GraphError",this.message=t}}class Et extends xk{constructor(t){super(t),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Et.prototype.constructor)}}class st extends xk{constructor(t){super(t),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,st.prototype.constructor)}}class Jt extends xk{constructor(t){super(t),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Jt.prototype.constructor)}}function e$(e,t){this.key=e,this.attributes=t,this.clear()}e$.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function t$(e,t){this.key=e,this.attributes=t,this.clear()}t$.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function n$(e,t){this.key=e,this.attributes=t,this.clear()}n$.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function Xg(e,t,n,r,i){this.key=t,this.attributes=i,this.undirected=e,this.source=n,this.target=r}Xg.prototype.attach=function(){let e="out",t="in";this.undirected&&(e=t="undirected");const n=this.source.key,r=this.target.key;this.source[e][r]=this,!(this.undirected&&n===r)&&(this.target[t][n]=this)};Xg.prototype.attachMulti=function(){let e="out",t="in";const n=this.source.key,r=this.target.key;this.undirected&&(e=t="undirected");const i=this.source[e],s=i[r];if(typeof s>"u"){i[r]=this,this.undirected&&n===r||(this.target[t][n]=this);return}s.previous=this,this.next=s,i[r]=this,this.target[t][n]=this};Xg.prototype.detach=function(){const e=this.source.key,t=this.target.key;let n="out",r="in";this.undirected&&(n=r="undirected"),delete this.source[n][t],delete this.target[r][e]};Xg.prototype.detachMulti=function(){const e=this.source.key,t=this.target.key;let n="out",r="in";this.undirected&&(n=r="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[n][t],delete this.target[r][e]):(this.next.previous=void 0,this.source[n][t]=this.next,this.target[r][e]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const r$=0,i$=1,Eme=2,s$=3;function wd(e,t,n,r,i,s,o){let a,c,d,h;if(r=""+r,n===r$){if(a=e._nodes.get(r),!a)throw new st(`Graph.${t}: could not find the "${r}" node in the graph.`);d=i,h=s}else if(n===s$){if(i=""+i,c=e._edges.get(i),!c)throw new st(`Graph.${t}: could not find the "${i}" edge in the graph.`);const y=c.source.key,g=c.target.key;if(r===y)a=c.target;else if(r===g)a=c.source;else throw new st(`Graph.${t}: the "${r}" node is not attached to the "${i}" edge (${y}, ${g}).`);d=s,h=o}else{if(c=e._edges.get(r),!c)throw new st(`Graph.${t}: could not find the "${r}" edge in the graph.`);n===i$?a=c.source:a=c.target,d=i,h=s}return[a,d,h]}function _me(e,t,n){e.prototype[t]=function(r,i,s){const[o,a]=wd(this,t,n,r,i,s);return o.attributes[a]}}function Sme(e,t,n){e.prototype[t]=function(r,i){const[s]=wd(this,t,n,r,i);return s.attributes}}function Tme(e,t,n){e.prototype[t]=function(r,i,s){const[o,a]=wd(this,t,n,r,i,s);return o.attributes.hasOwnProperty(a)}}function Ame(e,t,n){e.prototype[t]=function(r,i,s,o){const[a,c,d]=wd(this,t,n,r,i,s,o);return a.attributes[c]=d,this.emit("nodeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:c}),this}}function kme(e,t,n){e.prototype[t]=function(r,i,s,o){const[a,c,d]=wd(this,t,n,r,i,s,o);if(typeof d!="function")throw new Et(`Graph.${t}: updater should be a function.`);const h=a.attributes,y=d(h[c]);
697return h[c]=y,this.emit("nodeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:c}),this}}function Cme(e,t,n){e.prototype[t]=function(r,i,s){const[o,a]=wd(this,t,n,r,i,s);return delete o.attributes[a],this.emit("nodeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:a}),this}}function Ime(e,t,n){e.prototype[t]=function(r,i,s){const[o,a]=wd(this,t,n,r,i,s);if(!ds(a))throw new Et(`Graph.${t}: provided attributes are not a plain object.`);return o.attributes=a,this.emit("nodeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}function Rme(e,t,n){e.prototype[t]=function(r,i,s){const[o,a]=wd(this,t,n,r,i,s);if(!ds(a))throw new Et(`Graph.${t}: provided attributes are not a plain object.`);return Pi(o.attributes,a),this.emit("nodeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:a}),this}}function Mme(e,t,n){e.prototype[t]=function(r,i,s){const[o,a]=wd(this,t,n,r,i,s);if(typeof a!="function")throw new Et(`Graph.${t}: provided updater is not a function.`);return o.attributes=a(o.attributes),this.emit("nodeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}const Nme=[{name:e=>`get${e}Attribute`,attacher:_me},{name:e=>`get${e}Attributes`,attacher:Sme},{name:e=>`has${e}Attribute`,attacher:Tme},{name:e=>`set${e}Attribute`,attacher:Ame},{name:e=>`update${e}Attribute`,attacher:kme},{name:e=>`remove${e}Attribute`,attacher:Cme},{name:e=>`replace${e}Attributes`,attacher:Ime},{name:e=>`merge${e}Attributes`,attacher:Rme},{name:e=>`update${e}Attributes`,attacher:Mme}];function jme(e){Nme.forEach(function({name:t,attacher:n}){n(e,t("Node"),r$),n(e,t("Source"),i$),n(e,t("Target"),Eme),n(e,t("Opposite"),s$)})}function Pme(e,t,n){e.prototype[t]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Jt(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Jt(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,a=""+i;if(i=arguments[2],s=nc(this,o,a,n),!s)throw new st(`Graph.${t}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(n!=="mixed")throw new Jt(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,s=this._edges.get(r),!s)throw new st(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return s.attributes[i]}}function Ome(e,t,n){e.prototype[t]=function(r){let i;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Jt(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new Jt(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+r,o=""+arguments[1];if(i=nc(this,s,o,n),!i)throw new st(`Graph.${t}: could not find an edge for the given path ("${s}" - "${o}").`)}else{if(n!=="mixed")throw new Jt(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,i=this._edges.get(r),!i)throw new st(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return i.attributes}}function Lme(e,t,n){e.prototype[t]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Jt(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Jt(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,a=""+i;if(i=arguments[2],s=nc(this,o,a,n),!s)throw new st(`Graph.${t}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(n!=="mixed")throw new Jt(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,s=this._edges.get(r),!s)throw new st(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return s.attributes.hasOwnProperty(i)}}function Bme(e,t,n){e.prototype[t]=function(r,i,s){let o;
697if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Jt(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new Jt(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+r,c=""+i;if(i=arguments[2],s=arguments[3],o=nc(this,a,c,n),!o)throw new st(`Graph.${t}: could not find an edge for the given path ("${a}" - "${c}").`)}else{if(n!=="mixed")throw new Jt(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new st(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return o.attributes[i]=s,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:i}),this}}function Fme(e,t,n){e.prototype[t]=function(r,i,s){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Jt(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new Jt(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+r,c=""+i;if(i=arguments[2],s=arguments[3],o=nc(this,a,c,n),!o)throw new st(`Graph.${t}: could not find an edge for the given path ("${a}" - "${c}").`)}else{if(n!=="mixed")throw new Jt(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new st(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(typeof s!="function")throw new Et(`Graph.${t}: updater should be a function.`);return o.attributes[i]=s(o.attributes[i]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:i}),this}}function Dme(e,t,n){e.prototype[t]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Jt(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Jt(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,a=""+i;if(i=arguments[2],s=nc(this,o,a,n),!s)throw new st(`Graph.${t}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(n!=="mixed")throw new Jt(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,s=this._edges.get(r),!s)throw new st(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return delete s.attributes[i],this.emit("edgeAttributesUpdated",{key:s.key,type:"remove",attributes:s.attributes,name:i}),this}}function $me(e,t,n){e.prototype[t]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Jt(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Jt(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,a=""+i;if(i=arguments[2],s=nc(this,o,a,n),!s)throw new st(`Graph.${t}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(n!=="mixed")throw new Jt(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,s=this._edges.get(r),!s)throw new st(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(!ds(i))throw new Et(`Graph.${t}: provided attributes are not a plain object.`);return s.attributes=i,this.emit("edgeAttributesUpdated",{key:s.key,type:"replace",attributes:s.attributes}),this}}function Ume(e,t,n){e.prototype[t]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Jt(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Jt(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,a=""+i;if(i=arguments[2],s=nc(this,o,a,n),!s)throw new st(`Graph.${t}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(n!=="mixed")throw new Jt(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,s=this._edges.get(r),!s)throw new st(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(!ds(i))throw new Et(`Graph.${t}: provided attributes are not a plain object.`);
697return Pi(s.attributes,i),this.emit("edgeAttributesUpdated",{key:s.key,type:"merge",attributes:s.attributes,data:i}),this}}function zme(e,t,n){e.prototype[t]=function(r,i){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new Jt(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Jt(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,a=""+i;if(i=arguments[2],s=nc(this,o,a,n),!s)throw new st(`Graph.${t}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(n!=="mixed")throw new Jt(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,s=this._edges.get(r),!s)throw new st(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(typeof i!="function")throw new Et(`Graph.${t}: provided updater is not a function.`);return s.attributes=i(s.attributes),this.emit("edgeAttributesUpdated",{key:s.key,type:"update",attributes:s.attributes}),this}}const Vme=[{name:e=>`get${e}Attribute`,attacher:Pme},{name:e=>`get${e}Attributes`,attacher:Ome},{name:e=>`has${e}Attribute`,attacher:Lme},{name:e=>`set${e}Attribute`,attacher:Bme},{name:e=>`update${e}Attribute`,attacher:Fme},{name:e=>`remove${e}Attribute`,attacher:Dme},{name:e=>`replace${e}Attributes`,attacher:$me},{name:e=>`merge${e}Attributes`,attacher:Ume},{name:e=>`update${e}Attributes`,attacher:zme}];function qme(e){Vme.forEach(function({name:t,attacher:n}){n(e,t("Edge"),"mixed"),n(e,t("DirectedEdge"),"directed"),n(e,t("UndirectedEdge"),"undirected")})}const Hme=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function Wme(e,t,n,r){let i=!1;for(const s in t){if(s===r)continue;const o=t[s];if(i=n(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),e&&i)return o.key}}function Gme(e,t,n,r){let i,s,o,a=!1;for(const c in t)if(c!==r){i=t[c];do{if(s=i.source,o=i.target,a=n(i.key,i.attributes,s.key,o.key,s.attributes,o.attributes,i.undirected),e&&a)return i.key;i=i.next}while(i!==void 0)}}function o_(e,t){const n=Object.keys(e),r=n.length;let i,s=0;return new ic(function(){do if(i)i=i.next;else{if(s>=r)return{done:!0};const a=n[s++];if(a===t){i=void 0;continue}i=e[a]}while(!i);return{done:!1,value:{edge:i.key,attributes:i.attributes,source:i.source.key,target:i.target.key,sourceAttributes:i.source.attributes,targetAttributes:i.target.attributes,undirected:i.undirected}}})}function Kme(e,t,n,r){const i=t[n];if(!i)return;const s=i.source,o=i.target;if(r(i.key,i.attributes,s.key,o.key,s.attributes,o.attributes,i.undirected)&&e)return i.key}function Yme(e,t,n,r){let i=t[n];if(!i)return;let s=!1;do{if(s=r(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),e&&s)return i.key;i=i.next}while(i!==void 0)}function a_(e,t){let n=e[t];return n.next!==void 0?new ic(function(){if(!n)return{done:!0};const r={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:r}}):ic.of({edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected})}function Zme(e,t){if(e.size===0)return[];if(t==="mixed"||t===e.type)return typeof Array.from=="function"?Array.from(e._edges.keys()):QD(e._edges.keys(),e._edges.size);const n=t==="undirected"?e.undirectedSize:e.directedSize,r=new Array(n),i=t==="undirected",s=e._edges.values();let o=0,a,c;for(;a=s.next(),a.done!==!0;)c=a.value,c.undirected===i&&(r[o++]=c.key);return r}function o$(e,t,n,r){if(t.size===0)return;const i=n!=="mixed"&&n!==t.type,s=n==="undirected";let o,a,c=!1;const d=t._edges.values();for(;o=d.next(),o.done!==!0;){if(a=o.value,i&&a.undirected!==s)continue;const{key:h,attributes:y,source:g,target:x}=a;if(c=r(h,y,g.key,x.key,g.attributes,x.attributes,a.undirected),e&&c)return h}}function Xme(e,t){if(e.size===0)return ic.empty();const n=t!=="mixed"&&t!==e.type,r=t==="undirected",i=e._edges.values();return new ic(function(){let o,a;for(;;){if(o=i.next(),o.done)return o;if(a=o.value,!(n&&a.undirected!==r))break}return{value:{edge:a.key,attributes:a.attributes,source:a.source.key,target:a.target.key,sourceAttributes:a.source.attributes,targetAttributes:a.target.attributes,undirected:a.undirected},done:!1}})}function vk(e,t,n,r,i,s){const o=t?Gme:Wme;let a;if(n!=="undirected"&&(r!=="out"&&(a=o(e,i.in,s),e&&a)||r!=="in"&&(
697a=o(e,i.out,s,r?void 0:i.key),e&&a))||n!=="directed"&&(a=o(e,i.undirected,s),e&&a))return a}function Qme(e,t,n,r){const i=[];return vk(!1,e,t,n,r,function(s){i.push(s)}),i}function Jme(e,t,n){let r=ic.empty();return e!=="undirected"&&(t!=="out"&&typeof n.in<"u"&&(r=Ql(r,o_(n.in))),t!=="in"&&typeof n.out<"u"&&(r=Ql(r,o_(n.out,t?void 0:n.key)))),e!=="directed"&&typeof n.undirected<"u"&&(r=Ql(r,o_(n.undirected))),r}function wk(e,t,n,r,i,s,o){const a=n?Yme:Kme;let c;if(t!=="undirected"&&(typeof i.in<"u"&&r!=="out"&&(c=a(e,i.in,s,o),e&&c)||typeof i.out<"u"&&r!=="in"&&(r||i.key!==s)&&(c=a(e,i.out,s,o),e&&c))||t!=="directed"&&typeof i.undirected<"u"&&(c=a(e,i.undirected,s,o),e&&c))return c}function eye(e,t,n,r,i){const s=[];return wk(!1,e,t,n,r,i,function(o){s.push(o)}),s}function tye(e,t,n,r){let i=ic.empty();return e!=="undirected"&&(typeof n.in<"u"&&t!=="out"&&r in n.in&&(i=Ql(i,a_(n.in,r))),typeof n.out<"u"&&t!=="in"&&r in n.out&&(t||n.key!==r)&&(i=Ql(i,a_(n.out,r)))),e!=="directed"&&typeof n.undirected<"u"&&r in n.undirected&&(i=Ql(i,a_(n.undirected,r))),i}function nye(e,t){const{name:n,type:r,direction:i}=t;e.prototype[n]=function(s,o){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return[];if(!arguments.length)return Zme(this,r);if(arguments.length===1){s=""+s;const a=this._nodes.get(s);if(typeof a>"u")throw new st(`Graph.${n}: could not find the "${s}" node in the graph.`);return Qme(this.multi,r==="mixed"?this.type:r,i,a)}if(arguments.length===2){s=""+s,o=""+o;const a=this._nodes.get(s);if(!a)throw new st(`Graph.${n}:  could not find the "${s}" source node in the graph.`);if(!this._nodes.has(o))throw new st(`Graph.${n}:  could not find the "${o}" target node in the graph.`);return eye(r,this.multi,i,a,o)}throw new Et(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function rye(e,t){const{name:n,type:r,direction:i}=t,s="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(d,h,y){if(!(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)){if(arguments.length===1)return y=d,o$(!1,this,r,y);if(arguments.length===2){d=""+d,y=h;const g=this._nodes.get(d);if(typeof g>"u")throw new st(`Graph.${s}: could not find the "${d}" node in the graph.`);
697return vk(!1,this.multi,r==="mixed"?this.type:r,i,g,y)}if(arguments.length===3){d=""+d,h=""+h;const g=this._nodes.get(d);if(!g)throw new st(`Graph.${s}:  could not find the "${d}" source node in the graph.`);if(!this._nodes.has(h))throw new st(`Graph.${s}:  could not find the "${h}" target node in the graph.`);return wk(!1,r,this.multi,i,g,h,y)}throw new Et(`Graph.${s}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const o="map"+n[0].toUpperCase()+n.slice(1);e.prototype[o]=function(){const d=Array.prototype.slice.call(arguments),h=d.pop();let y;if(d.length===0){let g=0;r!=="directed"&&(g+=this.undirectedSize),r!=="undirected"&&(g+=this.directedSize),y=new Array(g);let x=0;d.push((_,S,I,L,D,F,$)=>{y[x++]=h(_,S,I,L,D,F,$)})}else y=[],d.push((g,x,_,S,I,L,D)=>{y.push(h(g,x,_,S,I,L,D))});return this[s].apply(this,d),y};const a="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[a]=function(){const d=Array.prototype.slice.call(arguments),h=d.pop(),y=[];return d.push((g,x,_,S,I,L,D)=>{h(g,x,_,S,I,L,D)&&y.push(g)}),this[s].apply(this,d),y};const c="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(){let d=Array.prototype.slice.call(arguments);if(d.length<2||d.length>4)throw new Et(`Graph.${c}: invalid number of arguments (expecting 2, 3 or 4 and got ${d.length}).`);if(typeof d[d.length-1]=="function"&&typeof d[d.length-2]!="function")throw new Et(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let h,y;d.length===2?(h=d[0],y=d[1],d=[]):d.length===3?(h=d[1],y=d[2],d=[d[0]]):d.length===4&&(h=d[2],y=d[3],d=[d[0],d[1]]);let g=y;return d.push((x,_,S,I,L,D,F)=>{g=h(g,x,_,S,I,L,D,F)}),this[s].apply(this,d),g}}function iye(e,t){const{name:n,type:r,direction:i}=t,s="find"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(c,d,h){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return!1;if(arguments.length===1)return h=c,o$(!0,this,r,h);if(arguments.length===2){c=""+c,h=d;const y=this._nodes.get(c);if(typeof y>"u")throw new st(`Graph.${s}: could not find the "${c}" node in the graph.`);
697return vk(!0,this.multi,r==="mixed"?this.type:r,i,y,h)}if(arguments.length===3){c=""+c,d=""+d;const y=this._nodes.get(c);if(!y)throw new st(`Graph.${s}:  could not find the "${c}" source node in the graph.`);if(!this._nodes.has(d))throw new st(`Graph.${s}:  could not find the "${d}" target node in the graph.`);return wk(!0,r,this.multi,i,y,d,h)}throw new Et(`Graph.${s}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const o="some"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[o]=function(){const c=Array.prototype.slice.call(arguments),d=c.pop();return c.push((y,g,x,_,S,I,L)=>d(y,g,x,_,S,I,L)),!!this[s].apply(this,c)};const a="every"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(){const c=Array.prototype.slice.call(arguments),d=c.pop();return c.push((y,g,x,_,S,I,L)=>!d(y,g,x,_,S,I,L)),!this[s].apply(this,c)}}function sye(e,t){const{name:n,type:r,direction:i}=t,s=n.slice(0,-1)+"Entries";e.prototype[s]=function(o,a){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return ic.empty();if(!arguments.length)return Xme(this,r);if(arguments.length===1){o=""+o;const c=this._nodes.get(o);if(!c)throw new st(`Graph.${s}: could not find the "${o}" node in the graph.`);return Jme(r,i,c)}if(arguments.length===2){o=""+o,a=""+a;const c=this._nodes.get(o);if(!c)throw new st(`Graph.${s}:  could not find the "${o}" source node in the graph.`);if(!this._nodes.has(a))throw new st(`Graph.${s}:  could not find the "${a}" target node in the graph.`);return tye(r,i,c,a)}throw new Et(`Graph.${s}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function oye(e){Hme.forEach(t=>{nye(e,t),rye(e,t),iye(e,t),sye(e,t)})}const aye=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function yE(){this.A=null,this.B=null}yE.prototype.wrap=function(e){this.A===null?this.A=e:this.B===null&&(this.B=e)};yE.prototype.has=function(e){return this.A!==null&&e in this.A||this.B!==null&&e in this.B};function zb(e,t,n,r,i){for(const s in r){const o=r[s],a=o.source,c=o.target,d=a===n?c:a;if(t&&t.has(d.key))continue;const h=i(d.key,d.attributes);if(e&&h)return d.key}}function Ek(e,t,n,r,i){if(t!=="mixed"){if(t==="undirected")return zb(e,null,r,r.undirected,i);if(typeof n=="string")return zb(e,null,r,r[n],i)}const s=new yE;let o;if(t!=="undirected"){if(n!=="out"){if(o=zb(e,null,r,r.in,i),e&&o)return o;s.wrap(r.in)}if(n!=="in"){if(o=zb(e,s,r,r.out,i),e&&o)return o;s.wrap(r.out)}}if(t!=="directed"&&(o=zb(e,s,r,r.undirected,i),e&&o))return o}
697function cye(e,t,n){if(e!=="mixed"){if(e==="undirected")return Object.keys(n.undirected);if(typeof t=="string")return Object.keys(n[t])}const r=[];return Ek(!1,e,t,n,function(i){r.push(i)}),r}function Vb(e,t,n){const r=Object.keys(n),i=r.length;let s=0;return new ic(function(){let a=null;do{if(s>=i)return e&&e.wrap(n),{done:!0};const c=n[r[s++]],d=c.source,h=c.target;if(a=d===t?h:d,e&&e.has(a.key)){a=null;continue}}while(a===null);return{done:!1,value:{neighbor:a.key,attributes:a.attributes}}})}function uye(e,t,n){if(e!=="mixed"){if(e==="undirected")return Vb(null,n,n.undirected);if(typeof t=="string")return Vb(null,n,n[t])}let r=ic.empty();const i=new yE;return e!=="undirected"&&(t!=="out"&&(r=Ql(r,Vb(i,n,n.in))),t!=="in"&&(r=Ql(r,Vb(i,n,n.out)))),e!=="directed"&&(r=Ql(r,Vb(i,n,n.undirected))),r}function lye(e,t){const{name:n,type:r,direction:i}=t;e.prototype[n]=function(s){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return[];s=""+s;const o=this._nodes.get(s);if(typeof o>"u")throw new st(`Graph.${n}: could not find the "${s}" node in the graph.`);return cye(r==="mixed"?this.type:r,i,o)}}function dye(e,t){const{name:n,type:r,direction:i}=t,s="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(d,h){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return;d=""+d;const y=this._nodes.get(d);if(typeof y>"u")throw new st(`Graph.${s}: could not find the "${d}" node in the graph.`);Ek(!1,r==="mixed"?this.type:r,i,y,h)};const o="map"+n[0].toUpperCase()+n.slice(1);e.prototype[o]=function(d,h){const y=[];return this[s](d,(g,x)=>{y.push(h(g,x))}),y};const a="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[a]=function(d,h){const y=[];return this[s](d,(g,x)=>{h(g,x)&&y.push(g)}),y};const c="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(d,h,y){if(arguments.length<3)throw new Et(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let g=y;return this[s](d,(x,_)=>{g=h(g,x,_)}),g}}function fye(e,t){const{name:n,type:r,direction:i}=t,s=n[0].toUpperCase()+n.slice(1,-1),o="find"+s;e.prototype[o]=function(d,h){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return;d=""+d;const y=this._nodes.get(d);if(typeof y>"u")throw new st(`Graph.${o}: could not find the "${d}" node in the graph.`);return Ek(!0,r==="mixed"?this.type:r,i,y,h)};const a="some"+s;e.prototype[a]=function(d,h){return!!this[o](d,h)};const c="every"+s;e.prototype[c]=function(d,h){return!this[o](d,(g,x)=>!h(g,x))}}function hye(e,t){const{name:n,type:r,direction:i}=t,s=n.slice(0,-1)+"Entries";e.prototype[s]=function(o){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return ic.empty();o=""+o;const a=this._nodes.get(o);if(typeof a>"u")throw new st(`Graph.${s}: could not find the "${o}" node in the graph.`);return uye(r==="mixed"?this.type:r,i,a)}}function pye(e){aye.forEach(t=>{lye(e,t),dye(e,t),fye(e,t),hye(e,t)})}function m5(e,t,n,r,i){const s=r._nodes.values(),o=r.type;let a,c,d,h,y,g;for(;a=s.next(),a.done!==!0;){let x=!1;if(c=a.value,o!=="undirected"){h=c.out;for(d in h){y=h[d];do g=y.target,x=!0,i(c.key,g.key,c.attributes,g.attributes,y.key,y.attributes,y.undirected),y=y.next;while(y)}}if(o!=="directed"){h=c.undirected;for(d in h)if(!(t&&c.key>d)){y=h[d];do g=y.target,g.key!==d&&(g=y.source),x=!0,i(c.key,g.key,c.attributes,g.attributes,y.key,y.attributes,y.undirected),y=y.next;while(y)}}n&&!x&&i(c.key,null,c.attributes,null,null,null,null)}}function mye(e,t){const n={key:e};return JD(t.attributes)||(n.attributes=Pi({},t.attributes)),n}function yye(e,t,n){const r={key:t,source:n.source.key,target:n.target.key};return JD(n.attributes)||(r.attributes=Pi({},n.attributes)),e==="mixed"&&n.undirected&&(r.undirected=!0),r}function gye(e){if(!ds(e))throw new Et('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in e))throw new Et("Graph.import: serialized node is missing its key.");if("attributes"in e&&(!ds(e.attributes)||e.attributes===null))throw new Et("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function bye(e){if(!ds(e))throw new Et('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in e))throw new Et("Graph.import: serialized edge is missing its source.");if(!("target"in e))throw new Et("Graph.import: serialized edge is missing its target.");if("attributes"in e&&(!ds(e.attributes)||e.attributes===null))throw new Et("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");
697if("undirected"in e&&typeof e.undirected!="boolean")throw new Et("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const xye=wme(),vye=new Set(["directed","undirected","mixed"]),XR=new Set(["domain","_events","_eventsCount","_maxListeners"]),wye=[{name:e=>`${e}Edge`,generateKey:!0},{name:e=>`${e}DirectedEdge`,generateKey:!0,type:"directed"},{name:e=>`${e}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:e=>`${e}EdgeWithKey`},{name:e=>`${e}DirectedEdgeWithKey`,type:"directed"},{name:e=>`${e}UndirectedEdgeWithKey`,type:"undirected"}],Eye={allowSelfLoops:!0,multi:!1,type:"mixed"};function _ye(e,t,n){if(n&&!ds(n))throw new Et(`Graph.addNode: invalid attributes. Expecting an object but got "${n}"`);if(t=""+t,n=n||{},e._nodes.has(t))throw new Jt(`Graph.addNode: the "${t}" node already exist in the graph.`);const r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit("nodeAdded",{key:t,attributes:n}),r}function QR(e,t,n){const r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit("nodeAdded",{key:t,attributes:n}),r}function a$(e,t,n,r,i,s,o,a){if(!r&&e.type==="undirected")throw new Jt(`Graph.${t}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(r&&e.type==="directed")throw new Jt(`Graph.${t}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(a&&!ds(a))throw new Et(`Graph.${t}: invalid attributes. Expecting an object but got "${a}"`);if(s=""+s,o=""+o,a=a||{},!e.allowSelfLoops&&s===o)throw new Jt(`Graph.${t}: source & target are the same ("${s}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const c=e._nodes.get(s),d=e._nodes.get(o);if(!c)throw new st(`Graph.${t}: source node "${s}" not found.`);if(!d)throw new st(`Graph.${t}: target node "${o}" not found.`);const h={key:null,undirected:r,source:s,target:o,attributes:a};if(n)i=e._edgeKeyGenerator();else if(i=""+i,e._edges.has(i))throw new Jt(`Graph.${t}: the "${i}" edge already exists in the graph.`);if(!e.multi&&(r?typeof c.undirected[o]<"u":typeof c.out[o]<"u"))throw new Jt(`Graph.${t}: an edge linking "${s}" to "${o}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const y=new Xg(r,i,c,d,a);e._edges.set(i,y);const g=s===o;return r?(c.undirectedDegree++,d.undirectedDegree++,g&&(c.undirectedLoops++,e._undirectedSelfLoopCount++)):(c.outDegree++,d.inDegree++,g&&(c.directedLoops++,e._directedSelfLoopCount++)),e.multi?y.attachMulti():y.attach(),r?e._undirectedSize++:e._directedSize++,h.key=i,e.emit("edgeAdded",h),i}function Sye(e,t,n,r,i,s,o,a,c){if(!r&&e.type==="undirected")throw new Jt(`Graph.${t}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(r&&e.type==="directed")throw new Jt(`Graph.${t}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(a){if(c){if(typeof a!="function")throw new Et(`Graph.${t}: invalid updater function. Expecting a function but got "${a}"`)}else if(!ds(a))throw new Et(`Graph.${t}: invalid attributes. Expecting an object but got "${a}"`)}s=""+s,o=""+o;let d;if(c&&(d=a,a=void 0),!e.allowSelfLoops&&s===o)throw new Jt(`Graph.${t}: source & target are the same ("${s}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let h=e._nodes.get(s),y=e._nodes.get(o),g,x;if(!n&&(g=e._edges.get(i),g)){if((g.source.key!==s||g.target.key!==o)&&(!r||g.source.key!==o||g.target.key!==s))throw new Jt(`Graph.${t}: inconsistency detected when attempting to merge the "${i}" edge with "${s}" source & "${o}" target vs. ("${g.source.key}", "${g.target.key}").`);x=g}if(!x&&!e.multi&&h&&(x=r?h.undirected[o]:h.out[o]),x){const D=[x.key,!1,!1,!1];if(c?!d:!a)return D;if(c){const F=x.attributes;x.attributes=d(F),e.emit("edgeAttributesUpdated",{type:"replace",key:x.key,attributes:x.attributes})}else Pi(x.attributes,a),e.emit("edgeAttributesUpdated",{type:"merge",key:x.key,attributes:x.attributes,data:a});return D}a=a||{},c&&d&&(a=d(a));const _={key:null,undirected:r,source:s,target:o,attributes:a};if(n)i=e._edgeKeyGenerator();else if(i=""+i,e._edges.has(i))throw new Jt(`Graph.${t}: the "${i}" edge already exists in the graph.`);let S=!1,I=!1;h||(h=QR(e,s,{}),S=!0,s===o&&(y=h,I=!0)),y||(y=QR(e,o,{}),I=!0),g=new Xg(r,i,h,y,a),e._edges.set(i,g);const L=s===o;return r?(h.undirectedDegree++,y.undirectedDegree++,L&&(h.undirectedLoops++,e._undirectedSelfLoopCount++)):(h.outDegree++,y.inDegree++,L&&(h.directedLoops++,e._directedSelfLoopCount++)),e.multi?g.attachMulti():g.attach(),r?e._undirectedSize++:e._directedSize++,_.key=i,e.emit("edgeAdded",_),[i,!0,S,I]}function ey(e,t){e._edges.delete(t.key);const{source:n,target:r,attributes:i}=t,s=t.undirected,o=n===r;s?(n.undirectedDegree--,r.undirectedDegree--,o&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,r.inDegree--,o&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),s?e._undirectedSize--:e._directedSize--,e.emit("edgeDropped",{key:t.key,attributes:i,source:n.key,target:r.key,undirected:s})}class Tr extends ZD.EventEmitter{constructor(t){if(super(),t=Pi({},Eye,t),typeof t.multi!="boolean")throw new Et(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${t.multi}".`);if(!vye.has(t.type))throw new Et(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${t.type}".`);if(typeof t.allowSelfLoops!="boolean")throw new Et(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${t.allowSelfLoops}".`);const n=t.type==="mixed"?e$:t.type==="directed"?t$:n$;
697Wa(this,"NodeDataClass",n);const r="geid_"+xye()+"_";let i=0;const s=()=>{let o;do o=r+i++;while(this._edges.has(o));return o};Wa(this,"_attributes",{}),Wa(this,"_nodes",new Map),Wa(this,"_edges",new Map),Wa(this,"_directedSize",0),Wa(this,"_undirectedSize",0),Wa(this,"_directedSelfLoopCount",0),Wa(this,"_undirectedSelfLoopCount",0),Wa(this,"_edgeKeyGenerator",s),Wa(this,"_options",t),XR.forEach(o=>Wa(this,o,this[o])),Cc(this,"order",()=>this._nodes.size),Cc(this,"size",()=>this._edges.size),Cc(this,"directedSize",()=>this._directedSize),Cc(this,"undirectedSize",()=>this._undirectedSize),Cc(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),Cc(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),Cc(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),Cc(this,"multi",this._options.multi),Cc(this,"type",this._options.type),Cc(this,"allowSelfLoops",this._options.allowSelfLoops),Cc(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(t){return this._nodes.has(""+t)}hasDirectedEdge(t,n){if(this.type==="undirected")return!1;if(arguments.length===1){const r=""+t,i=this._edges.get(r);return!!i&&!i.undirected}else if(arguments.length===2){t=""+t,n=""+n;const r=this._nodes.get(t);return r?r.out.hasOwnProperty(n):!1}throw new Et(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(t,n){if(this.type==="directed")return!1;if(arguments.length===1){const r=""+t,i=this._edges.get(r);return!!i&&i.undirected}else if(arguments.length===2){t=""+t,n=""+n;const r=this._nodes.get(t);return r?r.undirected.hasOwnProperty(n):!1}throw new Et(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(t,n){if(arguments.length===1){const r=""+t;return this._edges.has(r)}else if(arguments.length===2){t=""+t,n=""+n;const r=this._nodes.get(t);return r?typeof r.out<"u"&&r.out.hasOwnProperty(n)||typeof r.undirected<"u"&&r.undirected.hasOwnProperty(n):!1}throw new Et(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(t,n){if(this.type==="undirected")return;if(t=""+t,n=""+n,this.multi)throw new Jt("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const r=this._nodes.get(t);if(!r)throw new st(`Graph.directedEdge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new st(`Graph.directedEdge: could not find the "${n}" target node in the graph.`);const i=r.out&&r.out[n]||void 0;if(i)return i.key}undirectedEdge(t,n){if(this.type==="directed")return;if(t=""+t,n=""+n,this.multi)throw new Jt("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const r=this._nodes.get(t);if(!r)throw new st(`Graph.undirectedEdge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new st(`Graph.undirectedEdge: could not find the "${n}" target node in the graph.`);const i=r.undirected&&r.undirected[n]||void 0;if(i)return i.key}edge(t,n){if(this.multi)throw new Jt("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new st(`Graph.edge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new st(`Graph.edge: could not find the "${n}" target node in the graph.`);const i=r.out&&r.out[n]||r.undirected&&r.undirected[n]||void 0;if(i)return i.key}areDirectedNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new st(`Graph.areDirectedNeighbors: could not find the "${t}" node in the graph.`);return this.type==="undirected"?!1:n in r.in||n in r.out}areOutNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new st(`Graph.areOutNeighbors: could not find the "${t}" node in the graph.`);return this.type==="undirected"?!1:n in r.out}areInNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new st(`Graph.areInNeighbors: could not find the "${t}" node in the graph.`);return this.type==="undirected"?!1:n in r.in}areUndirectedNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new st(`Graph.areUndirectedNeighbors: could not find the "${t}" node in the graph.`);return this.type==="directed"?!1:n in r.undirected}areNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new st(`Graph.areNeighbors: could not find the "${t}" node in the graph.`);return this.type!=="undirected"&&(n in r.in||n in r.out)||this.type!=="directed"&&n in r.undirected}areInboundNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new st(`Graph.areInboundNeighbors: could not find the "${t}" node in the graph.`);return this.type!=="undirected"&&n in r.in||this.type!=="directed"&&n in r.undirected}
697areOutboundNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new st(`Graph.areOutboundNeighbors: could not find the "${t}" node in the graph.`);return this.type!=="undirected"&&n in r.out||this.type!=="directed"&&n in r.undirected}inDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.inDegree: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree}outDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.outDegree: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.outDegree}directedDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.directedDegree: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree+n.outDegree}undirectedDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.undirectedDegree: could not find the "${t}" node in the graph.`);return this.type==="directed"?0:n.undirectedDegree}inboundDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.inboundDegree: could not find the "${t}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=n.undirectedDegree),this.type!=="undirected"&&(r+=n.inDegree),r}outboundDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.outboundDegree: could not find the "${t}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=n.undirectedDegree),this.type!=="undirected"&&(r+=n.outDegree),r}degree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.degree: could not find the "${t}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=n.undirectedDegree),this.type!=="undirected"&&(r+=n.inDegree+n.outDegree),r}inDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.inDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree-n.directedLoops}outDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.outDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.outDegree-n.directedLoops}directedDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.directedDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree+n.outDegree-n.directedLoops*2}undirectedDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="directed"?0:n.undirectedDegree-n.undirectedLoops*2}inboundDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=n.undirectedDegree,i+=n.undirectedLoops*2),this.type!=="undirected"&&(r+=n.inDegree,i+=n.directedLoops),r-i}outboundDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=n.undirectedDegree,i+=n.undirectedLoops*2),this.type!=="undirected"&&(r+=n.outDegree,i+=n.directedLoops),r-i}degreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.degreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=n.undirectedDegree,i+=n.undirectedLoops*2),this.type!=="undirected"&&(r+=n.inDegree+n.outDegree,i+=n.directedLoops*2),r-i}source(t){t=""+t;const n=this._edges.get(t);if(!n)throw new st(`Graph.source: could not find the "${t}" edge in the graph.`);return n.source.key}target(t){t=""+t;const n=this._edges.get(t);if(!n)throw new st(`Graph.target: could not find the "${t}" edge in the graph.`);return n.target.key}extremities(t){t=""+t;const n=this._edges.get(t);if(!n)throw new st(`Graph.extremities: could not find the "${t}" edge in the graph.`);return[n.source.key,n.target.key]}opposite(t,n){t=""+t,n=""+n;const r=this._edges.get(n);if(!r)throw new st(`Graph.opposite: could not find the "${n}" edge in the graph.`);const i=r.source.key,s=r.target.key;if(t===i)return s;if(t===s)return i;throw new st(`Graph.opposite: the "${t}" node is not attached to the "${n}" edge (${i}, ${s}).`)}hasExtremity(t,n){t=""+t,n=""+n;const r=this._edges.get(t);if(!r)throw new st(`Graph.hasExtremity: could not find the "${t}" edge in the graph.`);return r.source.key===n||r.target.key===n}isUndirected(t){t=""+t;const n=this._edges.get(t);if(!n)throw new st(`Graph.isUndirected: could not find the "${t}" edge in the graph.`);return n.undirected}isDirected(t){t=""+t;const n=this._edges.get(t);if(!n)throw new st(`Graph.isDirected: could not find the "${t}" edge in the graph.`);return!n.undirected}isSelfLoop(t){t=""+t;const n=this._edges.get(t);if(!n)throw new st(`Graph.isSelfLoop: could not find the "${t}" edge in the graph.`);return n.source===n.target}addNode(t,n){return _ye(this,t,n).key}mergeNode(t,n){if(n&&!ds(n))throw new Et(`Graph.mergeNode: invalid attributes. Expecting an object but got "${n}"`);t=""+t,n=n||{};let r=this._nodes.get(t);
697return r?(n&&(Pi(r.attributes,n),this.emit("nodeAttributesUpdated",{type:"merge",key:t,attributes:r.attributes,data:n})),[t,!1]):(r=new this.NodeDataClass(t,n),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:n}),[t,!0])}updateNode(t,n){if(n&&typeof n!="function")throw new Et(`Graph.updateNode: invalid updater function. Expecting a function but got "${n}"`);t=""+t;let r=this._nodes.get(t);if(r){if(n){const s=r.attributes;r.attributes=n(s),this.emit("nodeAttributesUpdated",{type:"replace",key:t,attributes:r.attributes})}return[t,!1]}const i=n?n({}):{};return r=new this.NodeDataClass(t,i),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:i}),[t,!0]}dropNode(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new st(`Graph.dropNode: could not find the "${t}" node in the graph.`);let r;if(this.type!=="undirected"){for(const i in n.out){r=n.out[i];do ey(this,r),r=r.next;while(r)}for(const i in n.in){r=n.in[i];do ey(this,r),r=r.next;while(r)}}if(this.type!=="directed")for(const i in n.undirected){r=n.undirected[i];do ey(this,r),r=r.next;while(r)}this._nodes.delete(t),this.emit("nodeDropped",{key:t,attributes:n.attributes})}dropEdge(t){let n;if(arguments.length>1){const r=""+arguments[0],i=""+arguments[1];if(n=nc(this,r,i,this.type),!n)throw new st(`Graph.dropEdge: could not find the "${r}" -> "${i}" edge in the graph.`)}else if(t=""+t,n=this._edges.get(t),!n)throw new st(`Graph.dropEdge: could not find the "${t}" edge in the graph.`);return ey(this,n),this}dropDirectedEdge(t,n){if(arguments.length<2)throw new Jt("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new Jt("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");t=""+t,n=""+n;const r=nc(this,t,n,"directed");if(!r)throw new st(`Graph.dropDirectedEdge: could not find a "${t}" -> "${n}" edge in the graph.`);return ey(this,r),this}dropUndirectedEdge(t,n){if(arguments.length<2)throw new Jt("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new Jt("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const r=nc(this,t,n,"undirected");if(!r)throw new st(`Graph.dropUndirectedEdge: could not find a "${t}" -> "${n}" edge in the graph.`);return ey(this,r),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const t=this._nodes.values();let n;for(;n=t.next(),n.done!==!0;)n.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(t){return this._attributes[t]}getAttributes(){return this._attributes}hasAttribute(t){return this._attributes.hasOwnProperty(t)}setAttribute(t,n){return this._attributes[t]=n,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this}updateAttribute(t,n){if(typeof n!="function")throw new Et("Graph.updateAttribute: updater should be a function.");const r=this._attributes[t];return this._attributes[t]=n(r),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this}removeAttribute(t){return delete this._attributes[t],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:t}),this}replaceAttributes(t){if(!ds(t))throw new Et("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=t,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(t){if(!ds(t))throw new Et("Graph.mergeAttributes: provided attributes are not a plain object.");return Pi(this._attributes,t),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:t}),this}updateAttributes(t){if(typeof t!="function")throw new Et("Graph.updateAttributes: provided updater is not a function.");
697return this._attributes=t(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(t,n){if(typeof t!="function")throw new Et("Graph.updateEachNodeAttributes: expecting an updater function.");if(n&&!ZR(n))throw new Et("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._nodes.values();let i,s;for(;i=r.next(),i.done!==!0;)s=i.value,s.attributes=t(s.key,s.attributes);this.emit("eachNodeAttributesUpdated",{hints:n||null})}updateEachEdgeAttributes(t,n){if(typeof t!="function")throw new Et("Graph.updateEachEdgeAttributes: expecting an updater function.");if(n&&!ZR(n))throw new Et("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._edges.values();let i,s,o,a;for(;i=r.next(),i.done!==!0;)s=i.value,o=s.source,a=s.target,s.attributes=t(s.key,s.attributes,o.key,a.key,o.attributes,a.attributes,s.undirected);this.emit("eachEdgeAttributesUpdated",{hints:n||null})}forEachAdjacencyEntry(t){if(typeof t!="function")throw new Et("Graph.forEachAdjacencyEntry: expecting a callback.");m5(!1,!1,!1,this,t)}forEachAdjacencyEntryWithOrphans(t){if(typeof t!="function")throw new Et("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");m5(!1,!1,!0,this,t)}forEachAssymetricAdjacencyEntry(t){if(typeof t!="function")throw new Et("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");m5(!1,!0,!1,this,t)}forEachAssymetricAdjacencyEntryWithOrphans(t){if(typeof t!="function")throw new Et("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");m5(!1,!0,!0,this,t)}nodes(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):QD(this._nodes.keys(),this._nodes.size)}forEachNode(t){if(typeof t!="function")throw new Et("Graph.forEachNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)i=r.value,t(i.key,i.attributes)}findNode(t){if(typeof t!="function")throw new Et("Graph.findNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)if(i=r.value,t(i.key,i.attributes))return i.key}mapNodes(t){if(typeof t!="function")throw new Et("Graph.mapNode: expecting a callback.");const n=this._nodes.values();let r,i;const s=new Array(this.order);let o=0;for(;r=n.next(),r.done!==!0;)i=r.value,s[o++]=t(i.key,i.attributes);return s}someNode(t){if(typeof t!="function")throw new Et("Graph.someNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)if(i=r.value,t(i.key,i.attributes))return!0;return!1}everyNode(t){if(typeof t!="function")throw new Et("Graph.everyNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)if(i=r.value,!t(i.key,i.attributes))return!1;return!0}filterNodes(t){if(typeof t!="function")throw new Et("Graph.filterNodes: expecting a callback.");const n=this._nodes.values();let r,i;const s=[];for(;r=n.next(),r.done!==!0;)i=r.value,t(i.key,i.attributes)&&s.push(i.key);return s}reduceNodes(t,n){if(typeof t!="function")throw new Et("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new Et("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let r=n;const i=this._nodes.values();let s,o;for(;s=i.next(),s.done!==!0;)o=s.value,r=t(r,o.key,o.attributes);return r}nodeEntries(){const t=this._nodes.values();return new ic(()=>{const n=t.next();if(n.done)return n;const r=n.value;return{value:{node:r.key,attributes:r.attributes},done:!1}})}export(){const t=new Array(this._nodes.size);let n=0;this._nodes.forEach((i,s)=>{t[n++]=mye(s,i)});const r=new Array(this._edges.size);
697return n=0,this._edges.forEach((i,s)=>{r[n++]=yye(this.type,s,i)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:t,edges:r}}import(t,n=!1){if(t instanceof Tr)return t.forEachNode((c,d)=>{n?this.mergeNode(c,d):this.addNode(c,d)}),t.forEachEdge((c,d,h,y,g,x,_)=>{n?_?this.mergeUndirectedEdgeWithKey(c,h,y,d):this.mergeDirectedEdgeWithKey(c,h,y,d):_?this.addUndirectedEdgeWithKey(c,h,y,d):this.addDirectedEdgeWithKey(c,h,y,d)}),this;if(!ds(t))throw new Et("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(t.attributes){if(!ds(t.attributes))throw new Et("Graph.import: invalid attributes. Expecting a plain object.");n?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}let r,i,s,o,a;if(t.nodes){if(s=t.nodes,!Array.isArray(s))throw new Et("Graph.import: invalid nodes. Expecting an array.");for(r=0,i=s.length;r<i;r++){o=s[r],gye(o);const{key:c,attributes:d}=o;n?this.mergeNode(c,d):this.addNode(c,d)}}if(t.edges){let c=!1;if(this.type==="undirected"&&(c=!0),s=t.edges,!Array.isArray(s))throw new Et("Graph.import: invalid edges. Expecting an array.");for(r=0,i=s.length;r<i;r++){a=s[r],bye(a);const{source:d,target:h,attributes:y,undirected:g=c}=a;let x;"key"in a?(x=n?g?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:g?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,x.call(this,a.key,d,h,y)):(x=n?g?this.mergeUndirectedEdge:this.mergeDirectedEdge:g?this.addUndirectedEdge:this.addDirectedEdge,x.call(this,d,h,y))}}return this}nullCopy(t){const n=new Tr(Pi({},this._options,t));return n.replaceAttributes(Pi({},this.getAttributes())),n}emptyCopy(t){const n=this.nullCopy(t);return this._nodes.forEach((r,i)=>{const s=Pi({},r.attributes);r=new n.NodeDataClass(i,s),n._nodes.set(i,r)}),n}copy(t){if(t=t||{},typeof t.type=="string"&&t.type!==this.type&&t.type!=="mixed")throw new Jt(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${t.type}" because this would mean losing information about the current graph.`);if(typeof t.multi=="boolean"&&t.multi!==this.multi&&t.multi!==!0)throw new Jt("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof t.allowSelfLoops=="boolean"&&t.allowSelfLoops!==this.allowSelfLoops&&t.allowSelfLoops!==!0)throw new Jt("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const n=this.emptyCopy(t),r=this._edges.values();let i,s;for(;i=r.next(),i.done!==!0;)s=i.value,a$(n,"copy",!1,s.undirected,s.key,s.source.key,s.target.key,Pi({},s.attributes));return n}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const t={};this._nodes.forEach((s,o)=>{t[o]=s.attributes});const n={},r={};
697this._edges.forEach((s,o)=>{const a=s.undirected?"--":"->";let c="",d=s.source.key,h=s.target.key,y;s.undirected&&d>h&&(y=d,d=h,h=y);const g=`(${d})${a}(${h})`;o.startsWith("geid_")?this.multi&&(typeof r[g]>"u"?r[g]=0:r[g]++,c+=`${r[g]}. `):c+=`[${o}]: `,c+=g,n[c]=s.attributes});const i={};for(const s in this)this.hasOwnProperty(s)&&!XR.has(s)&&typeof this[s]!="function"&&typeof s!="symbol"&&(i[s]=this[s]);return i.attributes=this._attributes,i.nodes=t,i.edges=n,Wa(i,"constructor",this.constructor),i}}typeof Symbol<"u"&&(Tr.prototype[Symbol.for("nodejs.util.inspect.custom")]=Tr.prototype.inspect);wye.forEach(e=>{["add","merge","update"].forEach(t=>{const n=e.name(t),r=t==="add"?a$:Sye;e.generateKey?Tr.prototype[n]=function(i,s,o){return r(this,n,!0,(e.type||this.type)==="undirected",null,i,s,o,t==="update")}:Tr.prototype[n]=function(i,s,o,a){return r(this,n,!1,(e.type||this.type)==="undirected",i,s,o,a,t==="update")}})});jme(Tr);qme(Tr);oye(Tr);pye(Tr);class c$ extends Tr{constructor(t){const n=Pi({type:"directed"},t);if("multi"in n&&n.multi!==!1)throw new Et("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="directed")throw new Et('DirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class u$ extends Tr{constructor(t){const n=Pi({type:"undirected"},t);if("multi"in n&&n.multi!==!1)throw new Et("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="undirected")throw new Et('UndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class l$ extends Tr{constructor(t){const n=Pi({multi:!0},t);if("multi"in n&&n.multi!==!0)throw new Et("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(n)}}class d$ extends Tr{constructor(t){const n=Pi({type:"directed",multi:!0},t);if("multi"in n&&n.multi!==!0)throw new Et("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="directed")throw new Et('MultiDirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class f$ extends Tr{constructor(t){const n=Pi({type:"undirected",multi:!0},t);if("multi"in n&&n.multi!==!0)throw new Et("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="undirected")throw new Et('MultiUndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}function Qg(e){e.from=function(t,n){const r=Pi({},t.options,n),i=new e(r);return i.import(t),i}}Qg(Tr);Qg(c$);Qg(u$);Qg(l$);Qg(d$);Qg(f$);Tr.Graph=Tr;Tr.DirectedGraph=c$;Tr.UndirectedGraph=u$;Tr.MultiGraph=l$;Tr.MultiDirectedGraph=d$;Tr.MultiUndirectedGraph=f$;Tr.InvalidArgumentsGraphError=Et;
697Tr.NotFoundGraphError=st;Tr.UsageGraphError=Jt;var qb={},c_,JR;function Tye(){return JR||(JR=1,c_=function(t){return t!==null&&typeof t=="object"&&typeof t.addUndirectedEdgeWithKey=="function"&&typeof t.dropNode=="function"&&typeof t.multi=="boolean"}),c_}var eM;function Aye(){if(eM)return qb;eM=1;var e=Tye();function t(){this.set=new Set,this.stack=[]}t.prototype.has=function(c){return this.set.has(c)},t.prototype.push=function(c){this.stack.push(c),this.set.add(c)},t.prototype.pop=function(){this.set.delete(this.stack.pop())},t.prototype.path=function(c){return this.stack.concat(c)},t.of=function(c,d){var h=new t;return d?h.stack.push(c):h.push(c),h};function n(){this.set=new Set,this.stack=[]}n.prototype.has=function(c){return this.set.has(c)},n.prototype.push=function(c){this.stack.push(c),this.set.add(c[1])},n.prototype.pop=function(){this.set.delete(this.stack.pop()[1])},n.prototype.path=function(c){return this.stack.slice(1).map(function(d){return d[0]}).concat([c[0]])},n.of=function(c,d){var h=new n,y=[null,c];return d?h.stack.push(y):h.push(y),h};function r(c,d,h,y){if(!e(c))throw new Error("graphology-simple-path.allSimplePaths: expecting a graphology instance.");if(!c.hasNode(d))throw new Error('graphology-simple-path.allSimplePaths: expecting: could not find source node "'+d+'" in the graph.');if(!c.hasNode(h))throw new Error('graphology-simple-path.allSimplePaths: expecting: could not find target node "'+h+'" in the graph.');y=y||{};var g=typeof y.maxDepth=="number"?y.maxDepth:1/0;d=""+d,h=""+h;for(var x=d===h,_=[c.outboundNeighbors(d)],S=t.of(d,x),I=[],L,D,F;_.length!==0;)if(D=_[_.length-1],F=D.pop(),!F)_.pop(),S.pop();else{if(S.has(F))continue;F===h&&(L=S.path(F),I.push(L)),S.push(F),!S.has(h)&&_.length<g?_.push(c.outboundNeighbors(F)):S.pop()}return I}function i(c,d){var h=[];return c.forEachOutboundEdge(d,function(y,g,x,_){h.push([y,d===x?_:x])}),h}function s(c,d){var h={},y;c.forEachOutboundEdge(d,function(x,_,S,I){y=d===S?I:S,y in h||(h[y]=[]),h[y].push(x)});var g=[];for(y in h)g.push([h[y],y]);return g}function o(c,d,h,y){if(!e(c))throw new Error("graphology-simple-path.allSimpleEdgePaths: expecting a graphology instance.");if(c.multi)throw new Error("graphology-simple-path.allSimpleEdgePaths: not implemented for multi graphs.");if(!c.hasNode(d))throw new Error('graphology-simple-path.allSimpleEdgePaths: expecting: could not find source node "'+d+'" in the graph.');if(!c.hasNode(h))throw new Error('graphology-simple-path.allSimpleEdgePaths: expecting: could not find target node "'+h+'" in the graph.');y=y||{};var g=typeof y.maxDepth=="number"?y.maxDepth:1/0;d=""+d,h=""+h;for(var x=d===h,_=[i(c,d)],S=n.of(d,x),I=[],L,D,F,$;_.length!==0;)if(F=_[_.length-1],D=F.pop(),!D)_.pop(),S.pop();else{if($=D[1],S.has($))continue;$===h&&(L=S.path(D),I.push(L)),S.push(D),!S.has(h)&&_.length<g?_.push(i(c,$)):S.pop()}return I}function a(c,d,h,y){if(!e(c))throw new Error("graphology-simple-path.allSimpleEdgeGroupPaths: expecting a graphology instance.");if(!c.hasNode(d))throw new Error('graphology-simple-path.allSimpleEdgeGroupPaths: expecting: could not find source node "'+d+'" in the graph.');if(!c.hasNode(h))throw new Error('graphology-simple-path.allSimpleEdgeGroupPaths: expecting: could not find target node "'+h+'" in the graph.');y=y||{};var g=typeof y.maxDepth=="number"?y.maxDepth:1/0;d=""+d,h=""+h;for(var x=d===h,_=[s(c,d)],S=n.of(d,x),I=[],L,D,F,$;_.length!==0;)if(F=_[_.length-1],D=F.pop(),!D)_.pop(),S.pop();else{if($=D[1],S.has($))continue;$===h&&(L=S.path(D),I.push(L)),S.push(D),!S.has(h)&&_.length<g?_.push(s(c,$)):S.pop()}return I}return qb.allSimplePaths=r,qb.allSimpleEdgePaths=o,qb.allSimpleEdgeGroupPaths=a,qb}var kye=Aye();function oh(e,t={enabled:!0}){const{data:n,isPending:r,error:i}=Xp({address:mJ,chainId:o0.id,abi:Cn(["function domains(uint256) public view returns (uint256 domain)"]),args:[BigInt(e)],functionName:"domains"},{enabled:t.enabled??!0});return A.useEffect(()=>{i&&toast.error(i)},[i]),r&&t.enabled?void 0:Number(n)||e}function _k({originChain:e,destinationChain:t,destinationDomain:n,enabled:r=!0}){const i=e.superchainConfig.interchainAccount,{address:s}=Fo(),{data:o}=Xp({address:i,chainId:e.id,abi:Cn(["function getRemoteInterchainAccount(uint32, address, bytes32) public view returns (address userICA)"]),functionName:"getRemoteInterchainAccount",args:[n,e.superchainConfig.universalRouter,Ic(s||Pn)]},{enabled:r&&!!n&&!!s&&!!i}),{data:a,isPending:c}=gL({address:o,chainId:t,query:{enabled:!!t}}
697),d=!!a?.length;return{userICA:c?void 0:o,isDeployed:d}}const Cye={1:245000n,2:415000n,3:545000n},Iye=76010n,Rye=10500n;function Sk({token0:e,token1:t,originQuote:n,destinationQuote:r,isFallbackBridgeToken:i}){const{chain:s}=Zn(e.chainId),o=gk(),a=oh(t.chainId),{userICA:c,isDeployed:d}=_k({originChain:s,destinationChain:t.chainId,destinationDomain:a}),h=Cye[r?.path.nodes.length??0]??0n,y=c&&!d?Iye:0n,g=t.wrappedAddress?Rye:0n,x=100000n+h+y+g,{data:_,error:S}=Kg({contracts:[{address:s.superchainConfig.usdtBridge,abi:Cn(["function quoteGasPayment(uint32 chainId) external returns (uint256)"]),functionName:"quoteGasPayment",args:[a],chainId:e.chainId},{address:s.superchainConfig.interchainAccount,abi:CO,functionName:"quoteGasForCommitReveal",args:[a,x],chainId:e.chainId}]},{enabled:o&&!!a&&!!c}),I=(n?.amountOut??0n)||(r?.amount??0n),{maxTokenFeeInCollateral:L,bridgeCollateralFeeInNative:D}=h$({maximumInAmount:I,originChain:s.id,destinationDomain:a,isFallbackBridgeToken:i,enabled:o});A.useEffect(()=>{S&&toast.error(S)},[S]);const F=_?.[0]??0n,$=_?.[1]??0n,z=i?F:D,V=r?z+$:z;return{bridgeCollateralFeeInNative:D,bridgeFee:z,maxTokenFeeInCollateral:L,xchainFee:$,totalNative:V,xchainGas:x}}function h$({maximumInAmount:e,originChain:t,destinationDomain:n,isFallbackBridgeToken:r,enabled:i}){const s=xy.bridgeByChain[t],o=i&&s&&!r&&!!n&&e>0n,{data:a=[],error:c}=Kg({contracts:[{chainId:t,address:s,abi:Cn(["struct Quote { address token;uint256 amount;}","function quoteTransferRemote(uint32 _destination,bytes32 _recipient,uint256 _amount) public returns (Quote[] memory quotes)"]),functionName:"quoteTransferRemote",args:[n,Ic("0x1"),e]}]},{enabled:o});A.useEffect(()=>{c&&toast.error(c)},[c]);const d=a[0];if(!o||!d)return{maxTokenFeeInCollateral:0n,userNetCollateral:0n,bridgeCollateralFeeInNative:0n};const y=(d[1]?.amount??0n)+(d[2]?.amount??0n)-e,g=y+Zf(y,18,0,"10"),x=d[0].amount??0n;return{maxTokenFeeInCollateral:g,userNetCollateral:e-g,bridgeCollateralFeeInNative:x}}function Mye(e,t){const[n,r]=A.useState(),i=A.useRef(en.debounce(s=>r(s),t,{leading:!1,trailing:!0}));return A.useEffect(()=>{i.current(e)},[e]),[n]}function gE(e){const{fromToken:t,toToken:n,amount:r,amountOut:i}=e,s=Is(r,Nx(t.price,n.price),t.decimals),o=fd(Ns(i,n.decimals));return D9(s,s-o,18)}const Nye=100n*10n**18n;function jye(e){if(!e.toToken.listed||!e.fromToken.listed)return!1;const t=gE(e);return(t<0n?-t:t)>=Nye}function Pye(e,t,n,r,i){return Promise.all(i.map(async s=>(await pd(s.map(a=>({chainId:e.id,address:e.superchainConfig.quoter,abi:yJ,functionName:"quoteExactInput",args:[Qb(e,a.nodes,"quote"),r]})),{noErrors:!1})).map((a,c)=>{if(!a[0])return[];if(a[1]=="oog")throw new Error("Fetching quotes: read limit reached");const d=[],[h]=a[0];return h!==0n&&d.push({path:s[c],amount:r,amountOut:h,fromToken:t,toToken:n,priceImpact:0n}),d}).flat())).then(s=>s.flat())}function Oye(e){const t=e.flat().reduce((n,r)=>n&&(n.amountOut>r.amountOut||jye(r))?n:r,null);return t?{...t,priceImpact:gE(t)}:null}const O3e=Object.freeze(Object.defineProperty({__proto__:null,calcPriceImpact:gE,fetchQuotes:Pye,getBestQuote:Oye},Symbol.toStringTag,{value:"Module"}));function Lye(e,t={}){return Kr({queryKey:["poolsForSwaps",e?.id],queryFn:()=>Hg("Pools for Swaps","hooks:usePoolsForSwaps:fetchPoolsForSwaps",n=>[n],void 0,void 0,void 0,[e.id]).then(n=>n.flat()),...t,enabled:!!e&&(t.enabled??!0),gcTime:sd,staleTime:sd})}function Bye(e){const t=new Tr({multi:!0}),n={};return e.forEach(r=>{const i=r.token0.toLowerCase(),s=r.token1.toLowerCase(),o=r.lp.toLowerCase();n[o]={...r,address:o},t.mergeEdgeWithKey(`direct:${o}`,i,s),t.mergeEdgeWithKey(`reversed:${o}`,s,i)}),[t,n]}function tM({chain:e,pools:t,fromToken:n,toToken:r,maxHops:i}){if(en.isEmpty(t)||!n||!r)return[];const[s,o]=Bye(t);let a=[];try{a=kye.allSimpleEdgeGroupPaths(s,n.wrappedAddress||n.address,r.wrappedAddress||r.address,{maxDepth:i??jJ})}catch{return[]}const c=[];return a.map(d=>{let h=[];d.map((y,g)=>{const x=[];y.map(_=>{const[S,I]=_.split(":"),L=o[I],D={from:L.token0,to:L.token1,type:L.type,lp:L.lp,factory:L.factory,pool_fee:L.pool_fee,chainId:e.id};S==="reversed"&&(D.from=L.token1,D.to=L.token0),g==0?x.push([D]):h.map(F=>{x.push(F.concat([D]))})}),h=[...x]}),c.push(...h)}),c.map(d=>({nodes:d}))}async function Fye(e,t,n,r,i,s=50){const o=new Set(e.superchainConfig.unsafeTokens);o.delete(t.wrappedAddress||t.address),o.delete(n.wrappedAddress||n.address),i=i.filter(h=>!o.has(h.token0.toLowerCase())&&!o.has(h.token1.toLowerCase()));const a=(h,y)=>y.some(g=>(g.wrappedAddress||g.address)===(h.wrappedAddress||h.address)),c=h=>h.listed||h.emerging;let d=tM({pools:i.filter(h=>{const y=r.all[`${e.id}:${h.token0.toLowerCase()}`],g=r.all[`${e.id}:${h.token1.toLowerCase()}`];return!(!y||!g||!c(y)&&!a(y,[t,n])||!c(g)&&!a(g,[t,n]))}),fromToken:t,toToken:n,chain:e});
697return d.length===0&&(d=tM({pools:i,fromToken:t,toToken:n,chain:e})),d.length===0?null:en.chunk(d,s)}async function Dye(e,t,n,r,i,s){const o=Zu(e,!0).chain,a=await Fye(o,t,n,i,s);if(!a)return null;const c=await Promise.all(Vp("hooks:quote:fetchQuotes",en.chunk(a,Math.ceil(a.length/b3)).map(h=>[o,t,n,r,h]))),[d]=await Promise.all(Vp("hooks:quote:getBestQuote",[[c]]));return d}function $ye(e,t,n,r=250,i={}){const{chain:s}=Zn(e?.chainId??Pt.id),{data:o}=ys(),{data:a=[]}=Lye(s),[c]=Mye(n,r),d=!!n&&!!e&&!!t&&e.chainId===t.chainId&&i.enabled!==!1,h=!o||!a.length||!c,y=Kr({queryKey:["fetchQuote",e?.address,e?.chainId,t?.address,t?.chainId,c?.toString(),o?.sorted.length,a.length],queryFn:()=>Dye(s.id,e,t,c,o,a),...i,structuralSharing:!1,refetchInterval:sd,enabled:d&&!h});return{...y,quoteIsLoading:d&&(y.isLoading||h)}}function AT(e,t,n,r,i=250,s={}){const[o,a]=A.useState(),c=!r("swapping","swapPending","success")&&s.enabled,{data:d,error:h,refetch:y,isFetching:g,quoteIsLoading:x}=$ye(e,t,n,i,{enabled:c});A.useEffect(()=>{h&&toast.error(h)},[h]);const _=`${e?.chainId}:${e?.address}`,S=`${t?.chainId}:${t?.address}`;A.useEffect(()=>{c&&a(void 0)},[n,_,S]),A.useEffect(()=>{c&&d&&a({...d})},[d]);const I=A.useMemo(()=>UD({token0:e,token1:t,quote:d,quoteLoading:x})?.type==="no-routes-end",[e,t,d,x]);return{quote:o,refreshQuote:y,isFetching:g,quoteIsLoading:x,noRoutes:I}}function nM(e,t,n,r={}){const{token0:i,token1:s,amountIn:o,isFallbackBridgeToken:a,isSwapStep:c}=n,d=r.enabled??!0,h=i.address===e.address,y=s.address===t.address,g=d&&!h&&!!e,{quote:x,quoteIsLoading:_}=AT(i,e,o,c,void 0,{...r,enabled:g}),S=g?x:void 0,{chain:I}=Zn(i.chainId),{chain:L}=Zn(s.chainId),D=oh(L.id),{userICA:F}=_k({originChain:I,destinationChain:L.id,destinationDomain:D,enabled:d}),{balance:$,isLoading:z}=ad({address:t.address,chainId:s.chainId},{fetchInterval:sd,holder:F,enabled:d&&!!F}),V=d&&!a,K=h?o:S?.amountOut??0n,{userNetCollateral:te,maxTokenFeeInCollateral:Q}=h$({maximumInAmount:K,destinationDomain:D,originChain:I.id,isFallbackBridgeToken:a,enabled:V}),ee=A.useMemo(()=>!$||!te&&V||!K?0n:$.value+(te||K),[h,z,$,te,V,K]),ne=(r.enabled??!0)&&!!t&&!!ee&&!y,{quote:J,quoteIsLoading:M}=AT(t,s,ee-Q,c,0,{...r,enabled:ne}),m=ne?J:void 0,E=_||M,C=A.useMemo(()=>{if(E||!ee||g&&!S||ne&&!m)return;const P={...S||m,amount:S?.amount??ee,amountOut:m?.amountOut??ee,fromToken:i,toToken:s};return{...P,priceImpact:gE(P)}},[S,m,ee,g,ne]);return{originQuote:S,destinationQuote:m,unifiedQuote:C,superQuoteIsLoading:E,bridgedOUSDT:ee,bridgeOnly:h&&y}}const Uye={},zye=(Uye.VITE_SUPER_SWAP_USDC_CHAINS??"").split(",").map(Number);function Vye({token0:e,token1:t,amountIn:n,isSuperSwap:r,isSwapStep:i,fallbackTokenOrigin:s,fallbackTokenDestination:o,collateralTokenOrigin:a,collateralTokenDestination:c,destinationBridge:d,enabled:h}){zD(e.chainId,t.chainId);const y=h,{balance:g}=ad(c,{holder:d,fetchInterval:1e3*60*5,enabled:y}),{value:x}=Kx(c,g?.value??0n),{value:_}=Kx(e,n),S={token0:e,token1:t,amountIn:n,isSuperSwap:r},I=nM(a,c,{...S,isFallbackBridgeToken:!1,isSwapStep:i},{enabled:h});[e.chainId,t.chainId].every(z=>zye.includes(z));const L=h,D=nM(s,o,{...S,isFallbackBridgeToken:!0,isSwapStep:i},{enabled:L}),F=(I?.unifiedQuote?.amountOut??0n)>(D?.unifiedQuote?.amountOut??0n)||!L,$=F?{origin:a,destination:c}:{origin:s,destination:o};return!r||!n?null:{superQuote:F?I:D,bridgeTokens:$,isFallbackBridgeToken:!F}}function qye(e){return{token:e[`${Pt.id}:${Qf}`],address:Pn}}function Hye({tokens:e,token0:t,token1:n,isSuperSwap:r,amountIn:i,isSwapStep:s,extraVeloBaseTokens:o=[]}){const{collateralTokens:a,fallbackTokens:c}=zD(t.chainId,n.chainId),d=qye(e),h=xy.bridgeByChain[n.chainId]||Pn,y=e[`${t.chainId}:${a.origin}`]||t.chainId===Ja.id&&o.find(L=>L.address===a.origin)||d.token,g=e[`${n.chainId}:${a.destination}`]||n.chainId===Ja.id&&o.find(L=>L.address===a.destination)||d.token,x=e[`${t.chainId}:${c.origin}`]||t.chainId===Ja.id&&o.find(L=>L.address===Lf)||d.token,_=e[`${n.chainId}:${c.destination}`]||n.chainId===Ja.id&&o.find(L=>L.address===Lf)||d.token,S=Zn(t.chainId),I=Zn(n.chainId);return S.chain.superchainConfig.usdtBridge&&I.chain.superchainConfig.usdtBridge,Vye({destinationBridge:h,fallbackTokenOrigin:x,fallbackTokenDestination:_,collateralTokenOrigin:y,collateralTokenDestination:g,token0:t,token1:n,amountIn:i,isSuperSwap:r,isSwapStep:s,enabled:!1}),{superQuote:{unifiedQuote:void 0,destinationQuote:void 0,originQuote:void 0,superQuoteIsLoading:!1,bridgedOUSDT:0n,bridgeOnly:!1},bridgeTokens:{origin:d.token,destination:d.token},isFallbackBridgeToken:!1}}async function Wye(){try{const e=await fetch(RJ,{method:"GET",headers:{"Content-Type":"application/json"}});if(e.ok)return dr("HL","Y"),"success";dr("HL","Fail:"+e.statusText),toast.error("Unable to connect Superswaps. Please check your connection and try again.")}catch(e){dr("HL","Fail:"+Gg(e)),toast.error("Unable to connect Superswaps. Please check your connection and try again.")}throw"Failed health check"}function Gye(e={}){return Kr({queryKey:["healthCheck"],queryFn:()=>Wye(),...e,enabled:e.enabled??!0,gcTime:Wr,staleTime:Wr})}var Kye=Object.defineProperty,Yye=(e,t,n)=>t in e?Kye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}
697):e[t]=n,u_=(e,t,n)=>Yye(e,typeof t!="symbol"?t+"":t,n),mi=(e=>(e[e.V2_SWAP_EXACT_IN=8]="V2_SWAP_EXACT_IN",e[e.V3_SWAP_EXACT_IN=0]="V3_SWAP_EXACT_IN",e[e.V2_SWAP_EXACT_OUT=9]="V2_SWAP_EXACT_OUT",e[e.V3_SWAP_EXACT_OUT=1]="V3_SWAP_EXACT_OUT",e[e.WRAP_ETH=11]="WRAP_ETH",e[e.UNWRAP_WETH=12]="UNWRAP_WETH",e[e.BALANCE_CHECK_ERC20=14]="BALANCE_CHECK_ERC20",e[e.SWEEP=4]="SWEEP",e[e.TRANSFER_FROM=7]="TRANSFER_FROM",e[e.BRIDGE_TOKEN=18]="BRIDGE_TOKEN",e[e.EXECUTE_CROSS_CHAIN=19]="EXECUTE_CROSS_CHAIN",e[e.EXECUTE_SUB_PLAN=33]="EXECUTE_SUB_PLAN",e))(mi||{});const rM=128,D5={0:To("address recipient, uint256 amountIn, uint256 amountOutMin, bytes path,bool payerIsUser, bool isUni"),8:To("address, uint256, uint256, bytes path, bool, bool isUni"),9:To("address, uint256, uint256, (address from, address to, bool stable)[], bool, bool isUni"),1:To("address recipient, uint256 amountOut, uint256 amountInMax, bytes path,bool payerIsUser, bool isUni"),11:To("address, uint256"),12:To("address, uint256"),14:To("address owner, address token, uint256 minBalance"),4:To("address, address, uint256"),7:To("address sender, address recipient, uint256 amount"),18:To("uint8 bridgeType,address recipient,address token,address bridge,uint256 amount,uint256 msgFee,uint256 maxTokenFee, uint32 domain,bool payerIsUser"),33:To("bytes, bytes[]"),19:To("uint32 domain,address icaRouter, bytes32 remoteRouter,bytes32 ism,bytes32 commitment, uint256 msgFee,address token,uint256 tokenFee, address hook, bytes")};var nx=(e=>(e[e.HYP_XERC20=1]="HYP_XERC20",e[e.XVELO=2]="XVELO",e[e.HYP_ERC20_COLLATERAL=3]="HYP_ERC20_COLLATERAL",e))(nx||{});class p${constructor(){u_(this,"commands"),u_(this,"bytesCommands"),u_(this,"inputs"),this.commands="0x",this.bytesCommands=[],this.inputs=[]}addCommand(t,n){const r=Dl(D5[t],n);this.inputs.push(r),this.commands=this.commands.concat(t.toString(16).padStart(2,"0")),this.bytesCommands.push($5(t))}}function $5(e){return ec(e.toString(16),{size:1})}function iM(e){return BigInt(Math.round(Date.now()/1e3)+60*Number(e))/60n*60n}function m$(e){try{return iM(e)}catch(t){return dr("DL-ERR",Gg(t)),iM(Mg)}}const Af=ni("0x8000000000000000000000000000000000000000000000000000000000000000"),Tk=({chain:e,account:t,quote:n,slippagePct:r,routePlanner:i=new p$})=>{const s=e.superchainConfig.universalRouter,o=Zf(n.amountOut,n.toToken.decimals,r);let a=n.amount===Af;n.fromToken.wrappedAddress&&(i.addCommand(mi.WRAP_ETH,[s,n.amount]),a=!0);const c=[];for(let d=0;d<n.path.nodes.length;d++){const h=n.path.nodes[d],y=Gq.last(c);y?Number(h.type)<1?Number(y[0].type)<1?y.push(h):c.push([h]):Number(y[0].type)>=1?y.push(h):c.push([h]):c.push([h])}if(c.length===1){const d=c[0],h=Number(d[0].type)<1;i.addCommand(h?mi.V2_SWAP_EXACT_IN:mi.V3_SWAP_EXACT_IN,[n.toToken.wrappedAddress?s:t,n.amount,o,Qb(e,d),!a,!1])}else{const[d,...h]=c,[y,...g]=h.reverse();g.reverse();const x=Number(d[0].type)<1,_=g.length!==0?g[0]:y;i.addCommand(x?mi.V2_SWAP_EXACT_IN:mi.V3_SWAP_EXACT_IN,[x?s:_[0].lp,n.amount,0n,Qb(e,d),!a,!1]),g.length!==0&&g.forEach((I,L)=>{const D=Number(I[0].type)<1,F=L+1<=g.length-1?g[L+1]:y;i.addCommand(D?mi.V2_SWAP_EXACT_IN:mi.V3_SWAP_EXACT_IN,[D?s:F[0].lp,D?0n:Af,0n,Qb(e,I),!1,!1])});const S=Number(y[0].type)<1;i.addCommand(S?mi.V2_SWAP_EXACT_IN:mi.V3_SWAP_EXACT_IN,[n.toToken.wrappedAddress?s:t,S?0n:Af,o,Qb(e,y),!1,!1])}return n.toToken.wrappedAddress&&i.addCommand(mi.UNWRAP_WETH,[t,o]),i};function Zye({token0:e,token1:t,slippage:n,originQuote:r,destinationQuote:i,randomSalt:s,swapReceiver:o}){const{address:a}=Fo(),{chain:c}=Zn(e.chainId),{chain:d}=Zn(t.chainId),{originBridgeToken:h,destinationBridgeToken:y,isFallbackBridgeToken:g}=br(),{bridgeFee:x,bridgeCollateralFeeInNative:_,maxTokenFeeInCollateral:S,xchainFee:I,xchainGas:L}=Sk({token0:e,token1:t,originQuote:r,destinationQuote:i,isFallbackBridgeToken:g}),D=c.superchainConfig.interchainAccount,F=oh(c.id),$=oh(d.id),{userICA:z}=_k({originChain:c,destinationChain:d.id,destinationDomain:$}),{data:V=[]}=Kg({contracts:[{address:D,chainId:c.id,abi:CO,functionName:"hook"}]},{enabled:!!D&&!!$&&!!z}),K=V[0],te=g?c.superchainConfig.usdtBridge:xy.bridgeByChain[c.id],Q=d.superchainConfig.interchainAccount,ee=d.superchainConfig.universalRouter,ne=!g&&!S,J=bE({token1:t,destinationBridgeToken:y})&&!i||ne,M=h.address,m=y.address;return A.useMemo(()=>J||!a||!z||!F||!te||!D||!Q||!$||!K||!s?{blocked:!0,destinationPlanner:void 0,calls:void 0,originDomain:void 0,originChain:void 0,randomSalt:void 0,userSalt:void 0}:Xye({userAddress:o||a,userICA:z,originDomain:F,originBridge:te,originHook:K,originICARouter:D,destinationICARouter:Q,destinationRouter:ee,destinationDomain:$,destinationQuote:i,token0:e,token1:t,
697slippage:n,superBridgeTokenOrigin:M,superBridgeTokenDest:m,bridgeFee:x,bridgeCollateralFeeInNative:_,maxTokenFeeInCollateral:S,xchainFee:I,xchainGas:L,randomSalt:s}),[J,o,a,z,F,te,K,D,Q,ee,$,i,e,t,n,M,m,x,_,S,I,L,s])}function Xye({userAddress:e,userICA:t,originDomain:n,originBridge:r,originHook:i,originICARouter:s,destinationRouter:o,destinationICARouter:a,destinationDomain:c,token0:d,token1:h,slippage:y,superBridgeTokenOrigin:g,superBridgeTokenDest:x,bridgeFee:_,bridgeCollateralFeeInNative:S,maxTokenFeeInCollateral:I,xchainFee:L,xchainGas:D,randomSalt:F,destinationQuote:$}){const z=Zu(h.chainId).chain,V=$&&{...$,amount:Af},K=V&&Tk({chain:z,account:e,quote:V,slippagePct:y}),te=K&&Of(Array.from({length:K.bytesCommands.length+1}).fill("bytes1"),[$5(mi.TRANSFER_FROM),...K.bytesCommands]),Q=Dl(D5[mi.TRANSFER_FROM],[x,o,Af]),ee=Of(["bytes1"],[$5(mi.TRANSFER_FROM)]),ne=Dl(D5[mi.TRANSFER_FROM],[x,e,Af]),J=To(["bytes","bytes[]"]),M=te&&[Dl(D5[mi.BALANCE_CHECK_ERC20],[t,x,1n]),Dl(J,[te,[Q,...K.inputs]]),Dl(J,[ee,[ne]])],m=Of(["bytes1","bytes","bytes"],[$5(mi.BALANCE_CHECK_ERC20),(mi.EXECUTE_SUB_PLAN|rM).toString(16),(mi.EXECUTE_SUB_PLAN|rM).toString(16)]),E=M?[{to:Ic(x),value:0n,data:Ms({abi:rg,functionName:"approve",args:[o,bO]})},{to:Ic(o),value:0n,data:Ms({abi:xO,functionName:"execute",args:[m,M]})},{to:Ic(x),value:0n,data:Ms({abi:rg,functionName:"approve",args:[o,0n]})}]:[],C=Qye(E,F),N=bE({token1:h,destinationBridgeToken:{address:x,chainId:h.chainId}}),P=new p$,B=d.address===g&&!!$,O=g===TT(d.chainId);if(P.addCommand(mi.BRIDGE_TOKEN,[O?nx.HYP_XERC20:nx.HYP_ERC20_COLLATERAL,N?t:e,g,r,B?$.amount:Af,O?_:S,I,c,B]),console.log("BRIDGE_TOKEN"),console.log([O?nx.HYP_XERC20:nx.HYP_ERC20_COLLATERAL,N?t:e,g,r,B?$.amount:Af,O?_:S,I,c,B]),N){const v=Of(["uint16","uint256","uint256","address"],[1,L,D,e]);P.addCommand(mi.EXECUTE_CROSS_CHAIN,[c,s,Ic(a),Ic(Pn),C,L,"0x4200000000000000000000000000000000000006",0n,i,v]),console.log("EXECUTE_CROSS_CHAIN"),console.log([c,s,Ic(a),Ic(Pn),C,L,"0x4200000000000000000000000000000000000006",0n,i,v])}return{destinationPlanner:P,calls:E.map(j=>({...j,value:j.value.toString()})),originDomain:n,originChain:d.chainId,randomSalt:F,userSalt:Ic(e),commitmentHash:N?C:void 0,blocked:!1}}function Qye(e,t){const n=Jye(e,t);return kg(n)}function Jye(e,t){const n=Dl(To("(bytes32 to,uint256 value,bytes data)[]"),[e]);return`${t}${n.slice(2)}`}function bE({token1:e,destinationBridgeToken:t}){return!VS(e,t)}const y$=A.createContext(void 0);function g$({children:e,reset:t}){const{token0:n,token1:r,setToken0:i,setToken1:s,tokens:o}=HD(),[a,c]=A.useState(0n),[d,h]=A.useState(),[y,g]=A.useState(),[x,_]=A.useState(),[S,I]=A.useState("0.5"),L=A.useMemo(()=>gk(),[n,r]),{data:D}=Gye({enabled:L&&!!a}),[F,$]=A.useReducer((C,N)=>{switch(C){case"initial":{if(["approving","swapping"].includes(N))return N;break}case"approving":{if(["initial","swapping"].includes(N))return N;break}case"swapping":{if(["success","initial","swapPending"].includes(N))return N;break}case"swapPending":{if(["swapping","success"].includes(N))return N;break}case"success":if(["initial"].includes(N))return N}return C},"initial"),z=A.useCallback((...C)=>C.includes(F),[F]),V=o.sorted||[],K=A.useCallback(()=>{const C=n;i(r),s(C)},[n,r]);A.useEffect(()=>{a||h(0n)},[a]);const{status:te}=tA({hash:y});A.useEffect(()=>{y&&te==="pending"?($("swapPending"),dr("SW-PEND",y)):te==="success"?L||($("success"),dr("SW-SUCC",y??"")):te==="error"&&$("swapping")},[y,te,L,$]);const{data:Q}=yk(),{bridgeTokens:ee,isFallbackBridgeToken:ne,superQuote:J}=Hye({tokens:o,token0:n,token1:r,amountIn:a,isSuperSwap:L,isSwapStep:z,extraVeloBaseTokens:Q}),M=A.useMemo(()=>bE({token1:r,destinationBridgeToken:ee.destination})&&D!=="success",[r,ee,D]),m=!L||!M,E=A.useMemo(()=>z("initial"),[z]);return u.jsx(y$.Provider,{value:{sortedTokens:V,token0:n,token1:r,setToken0:i,setToken1:s,flipTokens:K,isSuperSwap:L,originBridgeToken:ee.origin,destinationBridgeToken:ee.destination,isFallbackBridgeToken:ne,amountIn:a,setAmountIn:c,amountOut:d,setAmountOut:h,slippage:S,setSlippage:I,swapStep:F,setSwapStep:$,isSwapStep:z,isInitialStep:E,swapTx:y,setSwapTx:g,swapReceiver:x,setSwapReceiver:_,reset:t,canSwap:m,superQuote:J},children:e})}const br=()=>{const e=A.useContext(y$);if(!e)throw new Error("useSwapContext must be used within a SwapProvi
697der");return e};function ege({swapReceiver:e}){return u.jsxs("div",{className:"flex justify-between py-4",children:[u.jsx("span",{children:"Receiver"}),u.jsx(Wg,{address:e,showCopy:!0})]})}function tge({className:e}){const{swapReceiver:t,setSwapReceiver:n,token1:r}=br(),{chain:i}=Zn(r.chainId);return u.jsxs("div",{className:e,children:[u.jsx("span",{className:"text-sm font-semibold",children:"Receiver"}),u.jsx(fme,{address:t,onChange:n,icon:u.jsx(BL,{className:"block size-3 text-accent-50",strokeWidth:1.5}),resetIcon:t?u.jsx(jg,{size:13,className:"cursor-pointer rounded-full bg-accent-10 p-0.5 text-accent-50"}):void 0,placeholder:`Enter receiver address on ${i.name}`,className:"rounded-lg"})]})}function m0({title:e,token:t,loading:n=!1,success:r,error:i,txId:s,chainId:o,children:a,className:c,additionalContent:d}){const h=A.useMemo(()=>{if(i&&!i.toString().includes("User rejected the request"))return"Transaction failed, please try again"},[i]),y=!n&&!s&&!!h;return u.jsxs("div",{className:It("relative isolate mx-auto max-w-xs pb-4 pt-4 sm:pb-8",c),children:[u.jsx("div",{className:It("pointer-events-none absolute inset-5 z-10 rounded-full opacity-10 blur-2xl",!t&&"bg-primary",y&&"bg-red"),children:t&&u.jsx(Xu,{address:t?.address,chainId:t?.chainId,className:"h-full w-full"})}),u.jsxs("div",{className:"relative z-20 flex flex-col items-center justify-center gap-4 text-center",children:[u.jsxs("div",{className:It("relative flex h-14 w-14 items-center justify-center rounded-full text-white",!t&&"bg-primary",y&&"outline outline-2 outline-offset-2 outline-red"),children:[t?u.jsx(Xu,{address:t?.address,chainId:t?.chainId,className:"h-full w-full"}):s&&r!==!1||r?u.jsx(u0,{className:"h-5 w-5",strokeWidth:1.5}):u.jsx(Sy,{className:"h-5 w-5",strokeWidth:1.5}),n&&u.jsx("div",{className:"absolute inset-0 -m-1 flex items-center justify-center",children:u.jsx(_r,{src:"/svg/spinner.svg",className:"h-full w-full animate-spin"})})]}),u.jsx("h3",{className:"w-3/5 text-balance text-xl font-semibold",children:e}),s&&o&&r!==!1?u.jsx(hT,{className:"flex items-center gap-1.5 text-xs text-primary underline",txid:s,chainId:o,children:"View confirmation"}):y?u.jsx("div",{className:"text-xs text-red",children:h}):a,d]})]})}function xE({approval:e,onEdit:t,title:n,showTokenIcon:r=!0,autoExecute:i=!0,onSuccess:s}){A.useEffect(()=>{e.tx.isSuccess&&s?.()},[e.tx.isSuccess,s]);const o=!!e.token?.chainId&&i&&e.needApproval;return QF(e.tx,e.token?.chainId??Pt.id,o),u.jsxs("div",{className:"space-y-4",children:[u.jsx(m0,{title:n??`Confirm access to ${e.token?.symbol}`,token:r?e.token:void 0,loading:e.tx.isPending,error:e.tx.error??void 0}),u.jsxs("div",{className:"flex items-center gap-4 [&>*]:flex-1",children:[u.jsx(wn,{type:"button",size:"lg",color:"secondary",onClick:t,disabled:e.tx.isPending,className:"hidden sm:flex",children:"Edit amount"}),u.jsx(wn,{type:"button",size:"lg",onClick:e.tx.write,disabled:e.tx.isPending,pen
697ding:e.tx.isPending,children:"Allow"})]})]})}function nge({token0:e,token1:t,amount:n,setTx:r,onPendingStateChange:i,onError:s,usdtGas:o,autoExecute:a,bridge:c,bridgeFee:d}){const{address:h}=Fo(),{chain:y}=Zn(e.chainId),{chain:g}=Zn(t.chainId),x={onSuccess:r,onError:s,onPendingStateChange:i,autoExecute:a},_=oh(g.id);return o?u.jsx(Fr,{write:{chainId:y.id,address:y.superchainConfig.usdtBridge,abi:Cn(["function transferRemote(uint32 _destination,bytes32 _recipient,uint256 _amountOrId) external payable returns (bytes32 messageId)"]),functionName:"transferRemote",args:[_,Ic(h),n],value:o,query:{enabled:!!_&&n>0n&&!!h&&!!y.superchainConfig.usdtBridge}},...x,children:"Bridge"}):c?u.jsx(Fr,{write:{chainId:y.id,address:c,abi:xJ,functionName:"sendToken",args:[h,n,BigInt(t.chainId)],value:d,query:{enabled:n>0n&&!!d}},...x,children:"Bridge"}):null}function rge({usdtGas:e,bridge:t,bridgeFee:n,tx:r,setTx:i,autoExecute:s=!0}){const{token0:o,token1:a,amountIn:c,setSwapStep:d,setAmountIn:h}=br(),{chain:y}=Zn(a?.chainId),[g,x]=A.useState(!1),[_,S]=A.useState();return u.jsxs("div",{className:"space-y-4",children:[u.jsx(m0,{title:[r?"Bridged":"Bridging",`${o?.symbol} to ${y?.name}`].join(" "),chainId:o?.chainId,txId:r,loading:g,error:_}),u.jsxs("div",{className:"flex items-center gap-4 [&>*]:flex-1",children:[u.jsx(wn,{size:"lg",color:"secondary",disabled:g,onClick:()=>{r&&h(0n),d("initial")},children:r?"Swap again":"Change"}),!r&&u.jsx(nge,{token0:o,token1:a,amount:c,onPendingStateChange:x,onError:S,setTx:i,usdtGas:e,bridge:t,bridgeFee:n,autoExecute:s})]})]})}function b$({maxLimit:e,limitOk:t}){const{token0:n}=br();return!e||e===0n?null:u.jsxs("div",{className:"flex items-center gap-2 py-4",children:["Max limit",u.jsx("div",{className:It("flex grow items-center justify-end gap-2",!t&&"text-red"),children:u.jsx(Gt,{amount:e,tokenAddress:n?.address,chainId:n?.chainId,showSymbol:!0,plain:!0,showLogo:!1})})]})}function x$({ethCost:e=0n,ethBalanceOk:t}){const{token0:n}=br(),{chain:r}=Zn(n.chainId),{tokens:i}=HD(),s=vpe(i,r.id),{pretty:o}=Kx(s,e);return!e||e===0n?null:u.jsxs("div",{className:It("flex items-center gap-2 py-4",!t&&"text-red"),children:["Network fee",u.jsxs("div",{className:It("flex grow items-center justify-end gap-2",!t&&"text-red"),children:[!t&&u.jsxs("div",{className:"text-end font-semibold text-red",children:["Add more ",r.nativeCurrency.symbol," ",u.jsx("span",{className:"hidden sm:visible",children:"to continue."})]}),"< ",f3(e,18,5)," ",r.nativeCurrency.symbol,u.jsxs("span",{className:"hidden text-end text-xs text-accent-50 sm:inline",children:["($",o,")"]})]})]})}function ige({ethCost:e,ethBalanceOk:t,maxLimit:n,limitOk:r}){const{token0:i,token1:s}=br(),{chain:o}=Zn(s.chainId);return u.jsxs("div",{className:"divide-y divide-accent-10 text-xs",children:[u.jsxs("div",{className:"flex items-center gap-2 pb-4",children:["Bridge ",i?.symbol,u.jsx("div",{className:"flex grow items-center justify-end gap-3",children:u.jsxs("div",{className:"flex grow items-center justify-end gap-2",children:["to",u.jsx("img",{src:`/svg/chains/${o.id}.svg`,className:"size-4 rounded"}),o.name]})})]}),u.jsx(x$,{ethCost:e,ethBalanceOk:t}),u.jsx(b$,{maxLimit:n,limitOk:r})]})}function cw({buttonText:e="Swap",disabled:t,allowBatch:n=!1}){const{isConnected:r}=Rr(),{token0:i,token1:s,amountIn:o,setSwapStep:a}=br(),{atomicBatch:c}=Zp(i.chainId),{balance:d}=ad(i,{fetchInterval:5e3}),{getConnectUrl:h}=nk(),y=A.useMemo(()=>h({keepSearch:!0}),[i,s,h]);if(r&&(d?.value??0n)<o)return null;const g=n&&c?"swapping":"approving";return u.jsx("div",{className:"flex items-center gap-4 [&>*]:flex-1",children:r?u.jsx(wn,{disabled:t||!o,size:"lg",onClick:()=>a(g),children:e}):u.jsx(qn,{href:y,useButton:!0,size:"lg",children:"Connect wallet"})})}function sge({bridge:e,originChain:t,destinationChain:n,amount:r,recipient:i,venftId:s}){const o=A.useMemo(()=>!i||!r?null:s?Of(["address","uint256","uint256"],[i,r,s]):Of(["address","uint256"],[i,r]),[i,r,s]),a=t===o0.id&&!0,{data:c=[]}=Kg({contracts:[{address:e,chainId:t,abi:Cn(["function mailbox() public view returns (address)"]),functionName:"mailbox"},{address:e,chainId:t,abi:Cn(["function GAS_LIMIT() public view returns (uint256)"]),functionName:"GAS_LIMIT"}]},{enabled:!!e}),[d,h]=c,y=oh(n,{enabled:a}),{data:g}=Xp({address:e,chainId:t,abi:Cn(["function GAS_LIMIT_LOCK() public view returns (uint256)"]),functionName:"GAS_LIMIT_LOCK"},{enabled:!!e&&!!s}),x=A.useMemo(()=>!i||!h||s&&!g?null:Of(["uint16","uint256","uint256","address","bytes"],[1,0n,s?g:h,i,"0x"]),[i,h,s,g]),_=i?ec(i,{size:32}):null;return Xp({address:d,chainId:t,abi:Cn(["function quoteDispatch(uint32 destinationDomain,bytes32 recipientAddress,bytes calldata messageBody, bytes metadata, address hook) external view returns (uint256 fee)"]),args:[y,_,o,x,Pn],functionName:"quoteDispatch"},{enabled:!!d&&!!o&&!!x&&!!y&&!!_})}const sM=Cn(["function burningCurrentLimitOf(address _bridge) external view returns (uint256 _limit)","function mintingCurrentLimitOf(address _bridge) external view returns (uint256 _limit)","function depositsEnabled() external view returns (bool)"]);function kT(e,t,n,r,i,{enabled:s}={enabled:!0},o){const[a,c]=A.useState(void 0),[d,h]=A.useState(0n),[y,g]=A.useState(!1),x=e.address===Qf?IO:e.address,{data:_,isLoading:S,error:I}=Kg({contracts:[{address:x,abi:sM,functionName:"burningCurrentLimitOf",args:[n],chainId:e.chainId},{address:o?.token??x,abi:sM,functionName:"mintingCurrentLimitOf",args:[o?.bridge||n],chainId:t}]},{enabled:s});A.useEffect(()=>{I&&toast.error(I)},[I]),A.useEffect(()=>{a===void 0&&r!==void 0&&s&&c(r)},[a,r,s]);const L=A.useMemo(()=>{const z=_?.[0]??0n,V=_?.[1]??0n;return z>V?V:z},[_]),D=s&&i,$=D&&(r!==void 0&&(a===r||a===void 0));return A.useEffect(()=>{D&&!$&&r&&a!==void 0&&r>a&&(h(r-a),g(!0))},[D,$,r,a]),{isLoading:S,bridgeLimit:L,initialBalance:a,bridgedAmount:d,waitingOnBridge:$,bridgeCompleted:y}}function oge(){const{token0:e,token1:t,amountIn:n,setAmountIn:r,setAmountOut:i,setSwapStep:s,isSwapStep:o,isInitialStep:a}=br(),{isConnected:c,address:d}=Rr(),[h,y]=A.useState(),[g,x]=A.useState(!1),{data:_}=eA({address:d,chainId:e.chainId}),{balance:S}=ad({address:t.address,chainId:t.chainId},{fetchInterval:3e3}),I=A.useMemo(()=>e.address===Xf?wJ:e.address===$p?EJ:vJ,[e,t]),{chain:L}=Zn(t.chainId),{bridgeLimit:D,isLoading:F,initialBalance:$,waitingOnBridge:z}=kT(e,L.id,I,S?.value,!!h);A.useEffect(()=>{i(n??0n)},[n]),A.useEffect(()=>{y(void 0),x(!1)},[n,e,t]),A.useEffect(()=>{h&&s("success")},[h]);const{data:V}=sge({bridge:I,originChain:e.chainId,destinationChain:t.chainId,recipient:d,amount:n}),K=D>=n,te=_&&!!V&&_.value>V,Q=K&&te,ee=(S?.value??0n)-($??0n),ne=p0(e,I,n);return u.jsx(u.Fragment,{children:h?u.jsxs("div",{className:"space-y-4",children:[u.jsx(m0,{title:z?`Waiting for ${t.symbol} balance...`:"Bridging complete",loading:z,success:!z,children:u.jsx("div",{className:"w-4/5 text-balance text-xs text-accent-50",children:z?"This might take a little while, thanks for your patience!":`Your ${t.symbol} balance on ${L.name} has increased by ${Ns(ee,t.decimals)}`})}),!z&&u.jsx("div",{className:"grid",children:u.jsx(wn,{size:"lg",color:"secondary",onClick:()=>{r(0n),s("initial")},children:"Swap again"})})]}):u.jsxs(u.Fragment,{children:[u.jsx(ige,{ethCost:V,ethBalanceOk:te,maxLimit:D,limitOk:K}),!F&&a&&u.jsx(cw,{buttonText:"Bridge",disabled:!Q}),c&&o("approving")&&u.jsxs(u.Fragment,{children:[!ne.approved&&!g&&u.jsx(xE,{approval:ne,onEdit:()=>s("initial"),onSuccess:()=>x(!0)}),(ne.approved||g)&&u.jsx(rge,{bridge:I,bridgeFee:V,tx:h,setTx:y})]})]})})}function age({token0:e,token1:t,originQuote:n,destinationQuote:r,onPendingStateChange:i,onError:s,superSwapStatus:o}){const{atomicBatch:a}=Zp(e.chainId),{chain:c}=Zn(e.chainId),d=vd(c.id),h=d==="MSIG"||d==="4337",y=oh(c.id),g=oh(t.chainId),x=c.superchainConfig.universalRouter,{slippage:_,setSwapTx:S,amountIn:I,swapReceiver:L,destinationBridgeToken:D,isFallbackBridgeToken:F}=br(),[$]=yh("router-deadline",{defaultValue:Mg.toString()}),z=A.useMemo(()=>`0x${LQ(64)}`,[]),V=n&&Tk({chain:c,account:c.superchainConfig.universalRouter,quote:n,slippagePct:_}
697),K=Zye({token0:e,token1:t,slippage:_,originQuote:n,destinationQuote:r,randomSalt:z,swapReceiver:h?L:void 0}),[te,Q]=A.useState(),{mutate:ee,isPending:ne,isError:J}=a0({mutationFn:j=>hpe(j).then(v=>{if(v?.chain)Q(j.commitmentHash);else if(v?.error)throw new Error(v.error)}),onError:j=>toast.error(j),retry:3,retryDelay:j=>j*2e3});A.useEffect(()=>{const{commitmentHash:j,calls:v,originChain:k,userSalt:X}=K;j&&v&&k&&g&&x&&y&&K.randomSalt&&X&&j!==te&&!ne&&!J&&ee({calls:v,originDomain:y,destinationDomain:g,originRouter:x,salt:K.randomSalt,userSalt:X,chain:k,commitmentHash:j})},[K,g,x,y,te,ne,J]);const{totalNative:M}=Sk({token0:e,token1:t,originQuote:n,destinationQuote:r,isFallbackBridgeToken:F}),[m,E]=A.useMemo(()=>{const{destinationPlanner:j,blocked:v}=K;if(v||r&&!j)return[[],[]];let k="";const X=[];return V&&(k=k.concat(V.commands),X.push(...V.inputs)),j&&(k=k.concat(V?j.commands.replace("0x",""):j.commands),X.push(...j.inputs)),[k,X]},[V,K,r]),C=bE({token1:t,destinationBridgeToken:D}),N=!!m.length&&!!E.length&&(!C||te===K.commitmentHash)&&(!h||!C),P=p0(e,x,I),B=a&&e.address!==c.nativeCurrency.symbol.toLowerCase()&&P.needApproval,O=A.useMemo(()=>{const j={address:x,abi:AO,functionName:"execute",args:[m,E,m$($)],value:n&&L9(c,n.fromToken)?n.amount+M:M};return B?{chainId:c.id,calls:[dk(e,I,c.superchainConfig.universalRouter),j],query:{enabled:N}}:{chainId:c.id,...j,query:{enabled:N}}},[e,I,c,N,m,E,n,M]);return o==="pending"?null:u.jsx(Fr,{onPendingStateChange:i,setPendingTxHash:j=>{S(j)},onError:j=>{s?.(j)},hideAfterSuccess:!0,hideLoader:!0,hideToast:!0,write:O,children:"Swap"})}const cge=A.memo(age);function uge({milliseconds:e}){const[t,n]=A.useState(e);A.useEffect(()=>{if(t<=0)return;const c=setInterval(()=>{n(d=>d-1e3)},1e3);return()=>clearInterval(c)},[t]);const r=Math.max(0,Math.floor(t/1e3)),i=Math.floor(r/60),s=r%60,o=String(i).padStart(2,"0"),a=String(s).padStart(2,"0");return u.jsx("div",{className:"text-2xl font-extrabold",children:u.jsxs("div",{children:[o,":",a]})})}const lge=A.memo(uge),oM=wO*59;function dge({tx:e,oUSDTAmount:t,status:n}){const{destinationBridgeToken:r}=br(),i=r.symbol;return u.jsxs("div",{className:"flex flex-col items-center gap-4 border-t border-accent-10 p-8 text-center",children:[n==="pending"&&u.jsxs(u.Fragment,{children:[u.jsx(lge,{milliseconds:oM},oM),u.jsx("span",{className:"text-xs text-accent-50",children:"Superswap pending. You may use the link below to manually review the status."})]}),n==="destinationSwapFail"&&u.jsxs("div",{className:"flex flex-col gap-5",children:[!!t&&u.jsxs("span",{className:"flex items-center justify-center dark:text-white",children:[u.jsx(u0,{size:16,className:"mr-3 rounded-full bg-primary p-0.5 text-white"})," ",f3(t,r.decimals)," ",i," Received"]}),u.jsxs("span",{className:"text-xs text-accent-50",children:["The Superswap succeeded on the origin chain but failed on the destination chain. As a result, you received ",i," on the destination chain. You can now retry the swap using your"," ",i,"."]})]}),u.jsxs("a",{href:`${MJ}${e}`,className:"text-xs text-primary underline hover:no-underline",target:"_blank",rel:"noreferrer",children:["Review on Hyperlane ",u.jsx(T3,{size:12,className:"inline"})]})]})}function fge({token0:e,quote:t,setTx:n,onPendingStateChange:r,onError:i}){const{chain:s}=Zn(e.chainId),o=Fo().address,{atomicBatch:a}=Zp(e.chainId),{slippage:c,setSwapTx:d,amountIn:h}=br(),[y]=yh("router-deadline",{defaultValue:Mg.toString()}),{auxiliaryFunds:g}=Zp(t.fromToken.chainId),x=g&&t.fromToken.symbol==="ETH"&&t.fromToken.balance<t.amount,_=A.useMemo(()=>Tk({chain:s,account:o,quote:t,slippagePct:c}),[s.id,o,t,c]),S=p0(e,s.superchainConfig.universalRouter,h),I=a&&e.address!==s.nativeCurrency.symbol.toLowerCase()&&S.needApproval,L=A.useMemo(()=>{const D={address:s.superchainConfig.universalRouter,abi:AO,functionName:"execute",args:[_.commands,_.inputs,m$(y)],value:t.fromToken.wrappedAddress?t.amount:0n};return I?{chainId:e.chainId,calls:[dk(e,h,s.superchainConfig.universalRouter),D]}:{chainId:s.id,...D}},[I,e,h,s,_,t]);return u.jsx(Fr,{simulate:!x,onPendingStateChange:r,setPendingTxHash:d,onError:i,onSuccess:D=>{n(D)},autoExecute:!0,write:L,children:"Swap"})}function hge({quote:e,tx:t,setTx:n,onPendingStateChange:r,originQuote:i,destinationQuote:s,bridgedOUSDT:o}){const{token0:a,token1:c,setToken0:d,isSwapStep:h,setSwapStep:y,isSuperSwap:g,reset:x,swapTx:_,originBridgeToken:S,destinationBridgeToken:I,isFallbackBridgeToken:L}=br(),{chain:D}=Zn(a.chainId),{chain:F}=Zn(c.chainId),{balance:$}=ad(c,{fetchInterval:2e3,backgroundFetch:!0,scope:"swapConfirmation",enabled:!!_}),{balance:z}=ad(I,{fetchInterval:2e3,backgroundFetch:!0,scope:"swapConfirmation",enabled:!!_}),V=A.useCallback(()=>{d(I),y("initial")}
697,[d,I]),K={token:I.address,bridge:F.superchainConfig.usdtBridge},{waitingOnBridge:te,bridgedAmount:Q,bridgeLimit:ee,bridgeCompleted:ne}=kT(S,c.chainId,D.superchainConfig.usdtBridge,$?.value,!!_,{enabled:g&&!!D.superchainConfig.usdtBridge},K),J=[D.id,F.id].includes(Dp.id)||!!o&&o<=ee,M=c.address===I.address,{bridgeCompleted:m,bridgedAmount:E}=kT(a,c.chainId,D.superchainConfig.usdtBridge,z?.value,!!_,{enabled:g&&!!_&&!!D.superchainConfig.usdtBridge&&!M}),[C,N]=A.useState(!1),[P,B]=A.useState(),O=A.useMemo(()=>Q?f3(Q,c.decimals):"",[s,Q,c]),j=A.useMemo(()=>ne?"success":m?"destinationSwapFail":te?"pending":"initial",[ne,m,te]),v=C||g&&j=="pending";A.useEffect(()=>{ne&&y("success")},[ne]);const k=h("success"),X=!g||j==="success",re=A.useMemo(()=>j==="destinationSwapFail"?"Swap interrupted on destination chain":`${k?"Swapped":"Swapping"} ${a.symbol} for ${O} ${c.symbol}`,[k,a,c,O,j]);return u.jsxs("div",{className:"space-y-4",children:[u.jsx(m0,{title:re,chainId:a.chainId,txId:g?void 0:t,success:k,loading:v,error:P}),g&&_&&u.jsx(dge,{status:j,tx:_,oUSDTAmount:E}),u.jsxs("div",{className:"flex items-center gap-4 [&>*]:flex-1",children:[X&&u.jsx(wn,{size:"lg",color:"secondary",disabled:v,onClick:()=>{k&&x(),y("initial")},children:k?"Swap again":"Change"}),!k&&e&&!g&&u.jsx(fge,{token0:a,quote:e,onPendingStateChange:ue=>{r?.(ue),N(ue)},onError:B,setTx:n}),!k&&g&&(i||s)&&(J||!L)&&u.jsx(cge,{originQuote:i,destinationQuote:s,token0:a,token1:c,onPendingStateChange:ue=>{N(ue)},onError:B,superSwapStatus:j}),j==="destinationSwapFail"&&u.jsx(wn,{size:"lg",color:"secondary",onClick:V,children:"Swap Manually"})]})]})}function pge({quote:e,blocked:t,setBlocked:n}){const r=e.priceImpact>OO||e.priceImpact>PO,i=e.toToken.price===0n||e.fromToken.price===0n,{setSwapStep:s}=br();return A.useEffect(()=>{n(r||i)},[r,i]),t?u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"mx-auto flex max-w-xs flex-col items-center justify-center gap-4 pb-4 text-center sm:pb-8 sm:pt-4",children:[i?u.jsx("div",{className:"flex h-14 w-14 items-center justify-center rounded-full bg-red text-white",children:u.jsx(LL,{className:"h-5 w-5",strokeWidth:1.5})}):r&&u.jsx("div",{className:"rounded-xl bg-red/10 px-4 py-2 text-xl font-semibold tracking-tight text-red",children:u.jsx(Gt,{amount:e.priceImpact,decimals:null,symbol:"%",showLogo:!1,showSymbol:!0,plain:!0})}),u.jsxs("h3",{className:"text-xl font-semibold",children:["High ",i?"risk swap":"price impact",u.jsx("br",{})," detected"]}),u.jsx("div",{className:"w-3/5 text-xs text-accent-50",children:"The liquidity pool for this token is very low. Swaps may fail or lead to major losses."})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsx(wn,{size:"lg",color:"secondary",onClick:()=>s("initial"),children:"Cancel"}),u.jsx(wn,{size:"lg",onClick:()=>n(!1),children:"Accept"})]})]}):null}function mge(){return u.jsx("div",{className:"flex flex-col items-center gap-6 py-6 sm:py-12",children:u.jsxs(Zg,{type:"warning",icon:dh,className:"mb-8",children:[u.jsx("span",{className:"text-center font-semibold",children:"Restricted Tokenized Security:"}),u.jsx("br",{}),"Learn more about these tokens from the Issuer."," ","Aerodrome"," does not offer, solicit, recommend or provide investment advice regarding these tokens. Confirm you may legally access these tokens by clicking “accept” below."," ",u.jsx(qn,{className:"underline underline-offset-2",href:"/legal",target:"_blank",children:"Learn more"})]})})}function yge(e,t){return new TextDecoder().decode(new Uint8Array(e.match(/../g).map((n,r)=>parseInt(n,16)^t.charCodeAt(r%t.length))))}function gge(){return Kr({queryKey:["gi"],queryFn:async()=>{if(location.hostname==="localhost")return{country:"DEV",region:"DEV"};const e="https://dromos.xyz",n=await(await fetch(`${e}/api/gi`)).text(),r=yge(n,e);return JSON.parse(r)},enabled:!0,staleTime:1/0,gcTime:1/0})}function bge(){const{token0:e,token1:t,isInitialStep:n}=br();return!n||!fy(e)&&!fy(t)?null:u.jsxs(Zg,{type:"warning",icon:dh,className:"mb-8",children:[u.jsx("span",{className:"font-semibold",children:"Restricted Tokenized Security:"}),u.jsx("br",{}),"Interactions with Tokenized Securities are restricted in many countries. Learn more about these tokens from the issuer."]})}function xge(e,t){switch(e.country){case"US":case"CA":case"GB":case"AU":case"SG":case"XX":case"T
6971":return!1;case"CN":return!t.some(n=>n.toLowerCase()==="0xCEF8Db49E456f872E288E1C042F916E9ceD7c781".toLowerCase());default:return!0}}function vge({blocked:e,setBlocked:t}){const{token0:n,token1:r,setSwapStep:i}=br(),{data:s}=gge();A.useEffect(()=>{const a=fy(n)||fy(r);t(a)},[n,r]);const o=A.useMemo(()=>(fy(n)||fy(r))&&(!s||!xge(s,[n.address,r.address])),[s,n,r]);return e?o?u.jsx("div",{className:"space-y-4",children:u.jsx(bge,{})}):u.jsxs("div",{className:"-mt-14 space-y-4",children:[u.jsx(mge,{}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsx(wn,{size:"lg",color:"secondary",onClick:()=>i("initial"),children:"Cancel"}),u.jsx(wn,{size:"lg",onClick:()=>t(!1),children:"Accept"})]})]}):null}function wge({quote:e}){const{token0:t,token1:n,amountIn:r}=br(),i=A.useMemo(()=>Nx(e?.amountOut??0n,r,n.decimals,t.decimals,n.decimals),[e,r,t,n]);return u.jsxs("div",{className:"flex items-center gap-2 py-4",children:["Exchange rate",u.jsx("div",{className:"flex grow items-center justify-end gap-1",children:e?u.jsxs(u.Fragment,{children:["1 ",t.symbol,u.jsx("div",{children:"="}),u.jsx(Gt,{amount:i,tokenAddress:n.address,chainId:n.chainId,showLogo:!1,showSymbol:!0,plain:!0})]}):u.jsx("div",{className:"h-4 w-1/2 animate-loop rounded bg-gradient-to-r from-accent-0 via-accent-10 to-accent-0 bg-2x"})})]})}const Ege=100n,_ge=10000n;function v$({quotes:e}){const{isSuperSwap:t}=br();return e.length?u.jsx(u.Fragment,{children:e.map(n=>u.jsxs("div",{"data-testid":"swap-quote-fee",className:"flex flex-col items-start gap-5 pb-4 pt-4 first:pt-0 sm:flex-row sm:items-center sm:gap-2",children:[u.jsxs("span",{className:"flex gap-2",children:["Fees",t&&u.jsx(qx,{chainId:n.fromToken.chainId,children:"on"})]}),u.jsxs("div",{className:"flex grow items-center justify-end gap-1.5 sm:gap-2",children:[n.path.nodes.map(r=>u.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2",children:[u.jsx(Xu,{address:r.from,chainId:r.chainId,className:"h-3 w-3 sm:h-4 sm:w-4"}),u.jsx(Gt,{amount:Sge(r.pool_fee,r.type),symbol:"%",showLogo:!1,showSymbol:!0,plain:!0}),u.jsx(Rre,{className:"-mx-0.5 text-accent-50",size:14,strokeWidth:2})]},r.from+r.chainId)),u.jsx(Xu,{address:n.toToken.address,chainId:n.toToken.chainId,className:"h-3 w-3 sm:h-4 sm:w-4"})]})]},`${n.fromToken.chainId}:${n.fromToken.address}`))}):u.jsxs("div",{"data-testid":"swap-quote-fee-loader",className:"flex items-center justify-between gap-2 pb-4",children:["Fees"," ",u.jsx("div",{className:"h-4 w-2/3 animate-loop rounded bg-gradient-to-r from-accent-0 via-accent-10 to-accent-0 bg-2x"})]})}function Sge(e,t){return e?t>0?Nx(e,_ge,0,0):Nx(e,Ege,0,0):0n}function Tge({quote:e}){const t=e&&(e.priceImpact>OO||e.priceImpact>PO),n=e&&(e.toToken.price===0n||e.fromToken.price===0n);return u.jsxs("div",{className:"flex items-center gap-2 py-4",children:["Price impact",u.jsx("div",{className:"flex grow items-center justify-end gap-2",children:e?u.jsxs(u.Fragment,{children:[(t||n)&&u.jsx("div",{className:"rounded bg-red/10 px-1 py-0.5 text-2xs font-semibold uppercase tracking-wider text-red",children:"High risk"}),!n&&u.jsx("div",{className:t?"text-red":"text-inherit",children:u.jsx(Gt,{amount:e.priceImpact,decimals:null,symbol:"%",showLogo:!1,showSymbol:!0,plain:!0})})]}):u.jsx("div",{className:"h-4 w-1/3 animate-loop rounded bg-gradient-to-r from-accent-0 via-accent-10 to-accent-0 bg-2x"})})]})}function Age({options:e,selected:t,setSelected:n,children:r,className:i,full:s=!0}){return u.jsxs(Nfe,{value:t,onChange:n,className:It("flex gap-1 rounded-xl border border-accent-20 p-1 text-xs font-semibold sm:text-sm",i),children:[e.map(o=>u.jsx(HF,{value:o.value,className:It(o.accented&&"border-l border-accent-10 px-1",s&&"grow"),children:u.jsxs("div",{className:It("relative flex cursor-pointer items-center justify-center gap-2 rounded-lg py-3 text-center transition hover:bg-accent-10 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50",t===o.value?"text-primary":"text-accent-50 hover:text-foreground",t===o.value&&"cursor-default bg-primary/10 hover:bg-primary/10",!s&&"px-3"),children:[o.text,o.accented&&t!==o.value&&u.jsx("div",{className:"absolute right-1.5 top-1.5 size-1.5 animate-pulse rounded-full bg-primary"}),o.badge&&u.jsx("div",{className:"rounded-full bg-accent-10 px-1.5 py-0.5 text-2xs uppercase text-accent-50 sm:px-2 sm:py-1",children:o.badge})]})},String(o.value))),r]})}const aM=["0.01","0.1","0.5","1","5"];function w$({slippage:e,setSlippage:t,auto:n,showHelp:r=!1}){const[i,s]=A.useState(aM.includes(e)?"":e);return u.jsxs("div",{className:"space-y-8",children:[r&&u.jsx("p",{className:"text-sm",children:"Slippage is the difference between the current market price of a token and the price at which the actual swap is executed. Volatile tokens usually require a larger value."}),u.jsxs("div",{className:"space-y-4",children:[u.jsx(gh,{id:"slippage",required:!0,value:i||e,placeholder:"0",endIcon:u.jsx("span",{className:"p-3 pl-0",children:"%"}),onClick:o=>{o.target.select()},onInput:o=>{const a=o.target;a.value=a.value.replace(/[^0-9.,]/g,"");const c=Number(a.value);isNaN(c)&&(a.value=""),c>100&&(a.value="100"),c!=0&&(c<1e-15||a.value.split(".").at(-1).length>
69715)&&(a.value="0.000000000000001"),a.value&&!a.value.includes(".")&&(a.value=Number(a.value).toString())},onChange:o=>{const a=o.target.value;s(a),a&&!isNaN(Number(a))?t(Number(o.target.value).toString()):t("0")},pattern:"^[0-9]*[.,]?[0-9]*$",inputMode:"decimal",autoCorrect:"off",minLength:1}),u.jsx(Age,{className:"text-xs",options:aM.map(o=>({value:o,text:u.jsxs("span",{children:[o,"%"]})})).concat(n?{value:"100",text:u.jsx("span",{children:"Auto"})}:[]),selected:e,setSelected:o=>{s(o),t(o)}})]})]})}function kge({quote:e}){const{token1:t,slippage:n,setSlippage:r,isInitialStep:i}=br(),[s,o]=A.useState(!1),a=u.jsxs("button",{className:"-mx-2 -my-1 flex items-center gap-1 rounded-lg px-2 py-1 text-primary transition hover:bg-primary/10",onClick:()=>o(!0),children:[u.jsx("span",{className:"hidden sm:inline",children:"Slippage"})," ",n,"%",u.jsx(Ju,{className:"-mr-0.5 h-3 w-3",strokeWidth:1.5})]});return e?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center gap-2 py-4",children:["Minimum received",u.jsxs("div",{className:"flex grow items-center justify-end gap-5",children:[u.jsx("div",{className:It(!i&&"hidden sm:block"),children:a}),u.jsx("div",{"data-testid":"swapper-min-received",children:u.jsx(Gt,{amount:Zf(e.amountOut,t.decimals,n),decimals:t.decimals,tokenAddress:t.address,chainId:t.chainId,showLogo:!1,showSymbol:!0,plain:!0})})]})]}),u.jsxs("div",{className:It("flex items-center gap-2 py-4 sm:hidden",i&&"hidden"),children:["Slippage",u.jsx("div",{className:"flex grow items-center justify-end gap-5",children:a})]}),u.jsx(mh,{isOpen:s,onClose:()=>o(!1),className:"max-w-sm",title:"Slippage tolerance",children:u.jsx(w$,{slippage:n,setSlippage:r,showHelp:!0})})]}):null}function Cge({quote:e,quotes:t,networkFee:n,ethBalanceOk:r,swapReceiver:i}){return u.jsxs("div",{"data-testid":"swapper-summary",className:It("divide-y divide-accent-10 text-xs",!e&&"text-accent-50"),children:[u.jsx(v$,{quotes:t}),u.jsx(wge,{quote:e}),u.jsx(Tge,{quote:e}),u.jsx(kge,{quote:e}),!!n&&u.jsx(x$,{ethCost:n,ethBalanceOk:r}),i&&u.jsx(ege,{swapReceiver:i})]})}function Ige({quote:e,unsafe:t,setUnsafe:n}){const{chain:r}=Zn(e.fromToken.chainId),i=r.superchainConfig.unsafeTokens,{setSwapStep:s}=br();return A.useEffect(()=>{n(!!e.path.nodes.find(({to:o,from:a})=>i.includes(o.toLowerCase())||i.includes(a.toLowerCase())))},[]),t?u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"mx-auto flex max-w-xs flex-col items-center justify-center gap-4 pb-4 text-center sm:pb-8 sm:pt-4",children:[u.jsx("div",{className:"flex h-14 w-14 items-center justify-center rounded-full bg-red text-white",children:u.jsx(LL,{className:"h-5 w-5",strokeWidth:1.5})}),u.jsxs("h3",{className:"text-xl font-semibold",children:["Fee-on-transfer",u.jsx("br",{})," tokens detected"]}),u.jsx("div",{className:"text-balance text-xs text-accent-50",children:"The liquidity routes may apply fees on some token transfers. Consider setting the slippage higher to allow the trade."})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsx(wn,{size:"lg",color:"secondary",onClick:()=>s("initial"),children:"Cancel"}),u.jsx(wn,{size:"lg",onClick:()=>n(!1),children:"Accept"})]})]}):null}function Rge(){const{isConnected:e,address:t}=Rr(),{token0:n,token1:r,amountIn:i,setAmountOut:s,setSlippage:o,setSwapStep:a,isSwapStep:c,isSuperSwap:d,isInitialStep:h,swapTx:y,canSwap:g,swapReceiver:x,superQuote:_,isFallbackBridgeToken:S}=br(),{chain:I}=Zn(n.chainId),[L,D]=A.useState(!1),[F,$]=A.useState(!1),[z,V]=A.useState(!1),[K,te]=A.useState(!1),[Q,ee]=A.useState(),{quote:ne,refreshQuote:J,quoteIsLoading:M,noRoutes:m}=AT(n,r,i,c,void 0,{enabled:!d}),{data:E}=eA({address:t,chainId:n.chainId,query:{enabled:d}}),{originQuote:C,destinationQuote:N,unifiedQuote:P,superQuoteIsLoading:B,bridgedOUSDT:O}=_,{totalNative:j}=Sk({token0:n,token1:r,originQuote:C,destinationQuote:N,isFallbackBridgeToken:S}),[v,k]=A.useState();A.useEffect(()=>{const tt=d?P:ne;if(K||Q||y)return;let ut;k(nr=>(ut=nr,tt)),!ut&&tt&&!d&&o(tt.path.nodes.some(nr=>Ox.volatile(nr.type))?"1":"0.1")},[ne,P,K,Q,y,d]);const X=I.superchainConfig.universalRouter,re=A.useCallback(()=>{c("approving")&&a("swapping")},[a,c]),ue=p0(n,X,i,y,re,2e3);A.useEffect(()=>{s(v?.amountOut)},[v]),A.useEffect(()=>{ee(void 0)},[i,n,r]),A.useEffect(()=>{ue.tx.hash&&J()},[ue.tx.hash]);const pe=d?j:0n,we=!pe||!!pe&&E&&E.value>pe,Ce=v||P,St=Q||y,Ve=ig(d?[C,N]:[v]),et=M||B,lt=!Ce||d&&!pe||!g||!we;return u.jsxs(u.Fragment,{children:[!St&&(Ce||et)&&u.jsx(Cge,{quote:Ce,quotes:Ve,networkFee:pe,ethBalanceOk:we,swapReceiver:h?void 0:x}),m&&u.jsxs(Zg,{type:"warning",icon:jv,children:[u.jsx("span",{className:"font-semibold",children:"No route found."})," There are no routes for your selected tokens at the moment. Try a different pair or check again later."]}),u.jsx(vge,{blocked:z,setBlocked:V}),h&&!z&&u.jsx(cw,{disabled:lt,allowBatch:!0}),e&&!h&&Ce&&u.jsxs(u.Fragment,{children:[!z&&u.jsx(Ige,{quote:Ce,unsafe:L,setUnsafe:D}),!z&&!L&&u.jsx(pge,{quote:Ce,blocked:F,setBlocked:$}),!z&&!L&&!F&&u.jsxs(u.Fragment,{children:[c("approving")&&u.jsx(xE,{approval:ue,onEdit:()=>a("initial")}),c("swapping","swapPending","success")&&u.jsx(hge,{quote:v,originQuote:C,destinationQuote:N,tx:Q,setTx:ee,onPendingStateChange:te,bridgedOUSDT:O})]})]})]})}function E$({ref:e,offset:t=0}){A.useEffect(()=>{if(e.current){const r=e.current.getBoundingClientRect().top+window.scrollY+t;window.scrollTo({top:r,behavior:"smooth"})}},[e,t])}function cM({token:e,amount:t,showButton:n,showChain:r,className:i,children:s=null}){const{pretty:o}=Kx(e,t);return u.jsxs("div",{className:"flex flex-col gap-3 sm:w-2/5 sm:gap-4",children:[u.jsxs("div",{className:It("group flex items-center gap-3 sm:gap-4",i),children:[u.jsxs("div",{className:"relative flex items-center",children:[u.jsx(Xu,{address:e?.address,chainId:e?.chainId,className:"h-10 w-10"}),r&&u.jsx("img",{src:`/svg/chains/${e.chainId}.svg`,className:"outline-1.5 absolute bottom-0 right-0 size-4 rounded outline outline-accent-0 group-first:sm:left-0 group-last:sm:right-0"})]}),u.jsxs("div",{className:"space-y-0.5",children:[u.jsx("div",{className:"text-sm font-semibold",children:u.jsx(Gt,{amount:t,decimals:e?.decimals,tokenAddress:e?.address,chainId:e?.chainId,showLogo:!1,showSymbol:!0,plain:!0})}),u.jsxs("div",{className:"text-xs text-accent-50",children:["~$",o]})]}),n&&u.jsx("div",{className:"flex grow justify-end sm:hidden",children:u.jsx(wn,{size:"sm",color:"secondary",className:"self-end",pill:!0,children:"Change"})})]}),s]})}function Mge(){const{token0:e,token1:t,amountIn:n,amountOut:r,setSwapStep:i,isSwapStep:s,isSuperSwap:o}=br(),a=A.useRef(null),c=e?.chainId!==t?.chainId&&!o,d=s("success");return E$({ref:a,offset:-48}),u.jsxs("div",{ref:a,className:It(`flex flex-col gap-3 rounded-2xl bg-accent-0 p-5 sm:flex-row sm:items-center sm:justify-between sm:${o?"p-5":"p-8"}`,!d&&"cursor-pointer hover:ring-1 hover:ring-primary/50"),onClick:()=>{d||i("initial")},children:[u.jsx(cM,{token:e,amount:n,showButton:!d,showChain:c,children:o&&u.jsx(qx,{chainId:e.chainId})}),u.jsxs("div",{className:"flex items-center justify-center gap-4",children:[u.jsx(CL,{className:"hidden h-10 w-10 sm:block",strokeWidth:1}),u.jsx(Ju,{className:"block h-5 w-10 text-accent-50 sm:hidden",strokeWidth:1.5}),u.jsx("div",{className:"block h-px grow bg-gradient-to-r from-accent-20 to-accent-20/0 sm:hidden"})]}),u.jsx(cM,{token:t,amount:r??0n,showChain:c,className:"sm:flex-row-reverse sm:text-end",children:o&&u.jsx(qx,{className:"sm:justify-end",chainId:t.chainId})})]})}function Nge({token0:e,token1:t,quote:n,setTx:r,onPendingStateChange:i,onError:s}){const{address:o}=Fo(),[a]=yh("router-deadline",{defaultValue:Mg.toString()}),c=BigInt(Math.round(Date.now()/1e3)+60*Number(a))/60n*60n;return u.jsx(Fr,{onPendingStateChange:i,onError:s,autoExecute:!0,onSuccess:r,write:{chainId:e.chainId,address:pJ,abi:hJ,functionName:"swapExactTokensForTokens",args:[n.amount,n.amount,[{from:e.address,to:t.address,stable:!0,factory:Pn}],o,c]},children:"Convert"})}function jge({quote:e,tx:t,setTx:n}){const{token0:r,token1:i,setSwapStep:s,setAmountIn:o}=br(),[a,c]=A.useState(!1),[d,h]=A.useState();return u.jsxs("div",{className:"space-y-4",children:[u.jsx(m0,{title:[t?"Converted":"Converting",`${r?.symbol} to ${i?.symbol}`].join(" "),chainId:r?.chainId,txId:t,loading:a,error:d}),u.jsxs("div",{className:"flex items-center gap-4 [&>*]:flex-1",children:[u.jsx(wn,{size:"lg",color:"secondary",disabled:a,onClick:()=>{t&&o(0n),s("initial")},children:t?"Swap again":"Change"}),!t&&u.jsx(Nge,{token0:r,token1:i,quote:e,onPendingStateChange:c,onError:h,setTx:n})]})]})}function Pge({canConvert:e,quote:t}){const{token0:n}=br(),{chain:r}=Zn(n?.chainId);return u.jsxs("div",{className:"divide-y divide-accent-10 text-xs",children:[u.jsx(v$,{quotes:t?[t]:[]}),u.jsxs("div",{className:"flex items-center gap-2 py-4",children:[e?"Convert VELO.v1 to VELO":"Can only convert from VELO.v1 to VELO",u.jsxs("div",{className:"flex grow items-center justify-end gap-2",children:["on",u.jsx("img",{src:`/svg/chains/${r.id}.svg`,className:"size-4 rounded"}),r.name]})]})]})}function Oge(){const{isConnected:e}=Rr(),{token0:t,token1:n,amountIn:r,amountOut:i,isInitialStep:s,setAmountOut:o,setSwapStep:a}=br(),{chain:c}=Zn(t.chainId),[d,h]=A.useState(),[y,g]=A.useState(!1);A.useEffect(()=>{t.address===Qf?o(0n):o(r??0n)},[t,r]),A.useEffect(()=>{h(void 0)},[r,t,n]),A.useEffect(()=>{d&&a("success")},[d]);const x=c.superchainConfig.router,_=p0(t,x,r),S={amount:r,amountOut:i,fromToken:t,toToken:n,priceImpact:0n,path:{n
697odes:[{chainId:10,factory:"0xF1046053aa5682b4F9a81b5481394DA16BE5FF5a",from:"0x3c8B650257cFb5f272f799F5e2b4e65093a11a05",lp:"0x585Af0b397AC42dbeF7f18395426BF878634f18D",pool_fee:5n,to:"0x9560e827aF36c94D2Ac33a39bCE1Fe78631088Db",type:0}]}},I=(i??0n)>0n&&t.address!==Qf;return u.jsxs(u.Fragment,{children:[!d&&u.jsx(Pge,{quote:S,canConvert:I}),I&&s&&u.jsx(cw,{buttonText:"Convert"}),e&&!s&&u.jsxs(u.Fragment,{children:[!_.approved&&!y&&u.jsx(xE,{approval:_,onEdit:()=>a("initial"),onSuccess:()=>g(!0)}),(_.approved||y)&&u.jsx(jge,{quote:S,tx:d,setTx:h})]})]})}function Lge({token0:e,token1:t,amount:n,setTx:r,onPendingStateChange:i,onError:s,lockbox:o}){const{chain:a}=Zn(e?.chainId??t?.chainId),c=e?.address.toLowerCase()===a.nativeCurrency.symbol.toLowerCase(),d={onSuccess:r,onError:s,onPendingStateChange:i,autoExecute:!0};return o?u.jsx(Fr,{write:{chainId:e.chainId,address:o,abi:Cn(["function deposit(uint256 _amount)"]),functionName:"deposit",args:[n]},...d,children:"Convert"}):c?u.jsx(Fr,{write:{chainId:e?.chainId??t?.chainId,address:a.superchainConfig.nativeWrapped,abi:Cn(["function deposit() external payable"]),functionName:"deposit",value:n},...d,children:"Convert"}):u.jsx(Fr,{write:{chainId:e?.chainId??t?.chainId,address:a.superchainConfig.nativeWrapped,abi:Cn(["function withdraw(uint256) external"]),functionName:"withdraw",args:[n]},...d,children:"Convert"})}function _$({tx:e,setTx:t,contract:n}){const{token0:r,token1:i,amountIn:s,setSwapStep:o,setAmountIn:a}=br(),[c,d]=A.useState(!1),[h,y]=A.useState();return u.jsxs("div",{className:"space-y-4",children:[u.jsx(m0,{title:[e?"Converted":"Converting",`${r?.symbol} to ${i?.symbol}`].join(" "),chainId:r?.chainId,txId:e,loading:c,error:h}),u.jsxs("div",{className:"flex items-center gap-4 [&>*]:flex-1",children:[u.jsx(wn,{size:"lg",color:"secondary",disabled:c,onClick:()=>{e&&a(0n),o("initial")},children:e?"Swap again":"Change"}),!e&&u.jsx(Lge,{token0:r,token1:i,amount:s,setTx:t,onPendingStateChange:d,onError:y,lockbox:n})]})]})}function S$({maxLimit:e,limitOk:t,balance:n}){const{token0:r,token1:i}=br(),{chain:s}=Zn(i?.chainId);return u.jsxs("div",{className:"divide-y divide-accent-10 text-xs",children:[u.jsxs("div",{className:"flex items-center gap-2 pb-4",children:["Convert ",r?.symbol,u.jsxs("div",{className:"flex grow items-center justify-end gap-2",children:["on",u.jsx("img",{src:`/svg/chains/${s.id}.svg`,className:"size-4 rounded"}),s.name]})]}),!!n&&u.jsxs("div",{className:"flex items-center gap-2 py-4",children:["Balance",u.jsx("div",{className:"flex grow items-center justify-end gap-2",children:u.jsx(Gt,{amount:n,tokenAddress:r?.address,chainId:r?.chainId,showSymbol:!0,plain:!0,showLogo:!1})})]}),u.jsx(b$,{maxLimit:e,limitOk:t})]})}function Bge(){const{isConnected:e}=Rr(),{amountIn:t,isInitialStep:n,setAmountOut:r}=br(),[i,s]=A.useState();return A.useEffect(()=>{r(t??0n)},[t]),u.jsxs(u.Fragment,{children:[!i&&u.jsx(S$,{}),n&&u.jsx(cw,{buttonText:"Convert"}),e&&!n&&u.jsx(_$,{tx:i,setTx:s})]})}const uM=Cn(["function burningCurrentLimitOf(address _bridge) external view returns (uint256 _limit)","function mintingCurrentLimitOf(address _bridge) external view returns (uint256 _limit)","function depositsEnabled() external view returns (bool)"]);function Fge(){const{isConnected:e}=Rr(),{token0:t,token1:n,amountIn:r,setSwapStep:i,isInitialStep:s,setAmountOut:o}=br(),[a,c]=A.useState(),[d,h]=A.useState(!1),y=zO.map[t.address],{data:g,isLoading:x,error:_}=Kg({contracts:[{address:n.address,abi:uM,functionName:"mintingCurrentLimitOf",args:[y],chainId:n.chainId},{address:y,abi:uM,functionName:"depositsEnabled",chainId:n.chainId}]});A.useEffect(()=>{_&&toast.error(_)},[_]),A.useEffect(()=>{o(r??0n)},[r]),A.useEffect(()=>{c(void 0),h(!1)},[r,t,n]),A.useEffect(()=>{a&&i("success")},[a]);const S=g?.[0]??0n,I=g?.[1]??!1,L=A.useMemo(()=>S>r&&I,[S,I,r]),D=p0(t,y,r);return u.jsxs(u.Fragment,{children:[!a&&u.jsx(S$,{maxLimit:S,limitOk:L}),!x&&L&&s&&u.jsx(cw,{buttonText:"Convert"}),e&&!s&&u.jsxs(u.Fragment,{children:[!D.approved&&!d&&u.jsx(xE,{approval:D,onEdit:()=>i("initial"),onSuccess:()=>h(!0)}),(D.approved||d)&&u.jsx(_$,{tx:a,setTx:c,contract:y})]})]})}function T$({autofocus:e=!0}){const{sortedTokens:t,token0:n,token1:r,setToken0:i,setToken1:s,flipTokens:o,amountIn:a,setAmountIn:c,amountOut:d,isInitialStep:
697h,isSuperSwap:y,swapReceiver:g}=br(),{data:x}=ys(),{data:_=[]}=yk(),S=dme(),{balance:I}=ad(n,{fetchInterval:5e3}),L=vd(n.chainId),{chain:D}=Zn(r.chainId),F=UD({token0:n,token1:r,amountIn:a,token0Balance:I?.value,swapReceiver:g,walletType:L}),$=A.useMemo(()=>{const{chain:te}=Zu(n.chainId);if(n.chainId===r.chainId&&!en.xor([n?.address,r?.address],[te.nativeCurrency.symbol.toLowerCase(),te.superchainConfig.nativeWrapped]).length)return"wrapUnwrapEth";if(X0e(n,r))return"usdtWrapUnwrap";if(Q0e())return"velov1Convert";const Q=$D(n,r);return Q||(F&&!F.renderFlow?F:"swap")},[n,r,F]),z=A.useCallback(()=>{if(!x)return;const te=[Xf,$p].includes(n.address)?n:r,Q=S?.[0];te&&Q&&(i(te),s(Q))},[x,n,r,S]),V=A.useMemo(()=>{if(!x)return[];const te=Object.values(x.all).filter(Q=>Q.emerging&&!Q.listed);return te.sort((Q,ee)=>Q.symbol.localeCompare(ee.symbol)),te.sort((Q,ee)=>Q.balanceValue>ee.balanceValue?-1:1),te.map(Q=>[Q])},[x]),K=A.useCallback(te=>x?[...te,...V]:te,[x]);return u.jsxs("div",{className:It("mx-auto max-w-xl space-y-2",h&&"space-y-0 rounded-2xl bg-gradient-to-b from-accent-0 via-accent-0 to-background"),children:[h?u.jsxs("div",{className:"rounded-2xl bg-accent-0 p-5 sm:p-8",children:[u.jsx(VR,{assets:t,asset:n,setAsset:te=>{if(VS(te,r)){o();return}i(te)},amount:a,setAmount:c,percentShortcuts:!0,testId:"swapper-asset-input-top",isFromToken:!0,autofocus:e,include:void 0,tokenFilter:K,children:u.jsxs("div",{className:"flex items-center gap-1.5",children:["Sell",!1]})},"swapper-asset-input-top"),u.jsx(YD,{testId:"swapper-flip-tokens",className:"mb-2 mt-5 sm:mb-5 sm:mt-8",loading:a!==0n&&d===void 0,flip:o}),u.jsx(VR,{alert:!1,disabled:!0,assets:t,asset:r,setAsset:te=>{if(VS(te,n)){o();return}s(te)},amount:d||0n,testId:"swapper-asset-input-bottom",isFromToken:!1,exclude:Y0e,include:[...S??[],..._],tokenFilter:K,children:u.jsxs("div",{className:"flex items-center gap-1.5",children:["Buy",!1]})},"swapper-asset-input-bottom"),y&&(L==="MSIG"||L==="4337")&&u.jsx(tge,{className:"mt-5 flex flex-col gap-3"})]}):u.jsx(Mge,{}),u.jsx("div",{className:It(!h&&"-m-px rounded-[17px] bg-gradient-to-b from-primary/50 to-background p-px"),children:u.jsxs("div",{className:It("space-y-4 p-5 sm:p-8",!h&&"rounded-2xl bg-gradient-to-b from-accent-0 to-background"),children:[$==="swap"&&u.jsx(Rge,{}),$==="velov1Convert"&&u.jsx(Oge,{}),$==="wrapUnwrapEth"&&u.jsx(Bge,{}),$==="usdtWrapUnwrap"&&u.jsx(Fge,{}),!1,($==="xveloBridge"||$==="opBridge")&&u.jsx(oge,{}),F?.type==="xop-end"&&u.jsx(lme,{changeTokens:z}),!!F?.type&&F.type!=="xop-end"&&h&&u.jsxs(Zg,{type:"warning",icon:jv,children:[F.type==="superswap-end"&&`Superswaps are not yet available on ${F.chain} due to limited interoperable liquidity. Superswaps uses interoperable liquidity to facilitate swaps.`,F.type==="not-enough-token-end"&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"font-semibold",children:"Warning:"})," Not enough"," ",n.symbol," amount."]}),F.type==="msig-superswap-end"&&u.jsxs(u.Fragment,{children:["Please confirm recipient address to receive funds on"," ",D.name]})]})]})})]})}function lM({label:e}){return u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between px-2",children:[u.jsx("div",{className:"text-sm font-semibold",children:e}),u.jsx("div",{className:"h-3 w-12 animate-loop rounded bg-gradient-to-r from-accent-0 via-accent-10 to-accent-0 bg-2x sm:w-24"})]}),u.jsxs("div",{className:"flex items-stretch justify-between gap-3 rounded-xl border border-accent-30 p-4 sm:gap-5 sm:p-5",children:[u.jsx("div",{className:"my-1 w-24 animate-loop rounded-full bg-gradient-to-r from-accent-0 via-accent-10 to-accent-0 bg-2x sm:w-28"}),u.jsxs("div",{className:"space-y-1 text-right",children:[u.jsx("div",{className:"text-2xl font-semibold leading-7 text-accent-40 sm:text-3xl sm:leading-9",children:"0"}),u.jsx("div",{className:"text-xs text-accent-50",children:"$0.0"})]})]})]})}function A$(){const{isConnected:e}=Rr();return u.jsxs("div",{className:"mx-auto max-w-xl rounded-2xl bg-gradient-to-b from-accent-0 via-accent-0 to-background",children:[u.jsxs("div",{className:"rounded-2xl bg-accent-0 p-5 sm:p-8",children:[u.jsx(lM,{label:"Sell"}),u.jsx(YD,{loading:!0,flip:()=>{},className:"mb-2 mt-5 sm:mb-5 sm:mt-8"}),u.jsx(lM,{label:"Buy"})]}),u.jsx("div",{className:"flex p-5 sm:p-8 [&>*]:flex-1",children:e?u.jsx(wn,{disabled:!0,size:"lg",children:"Swap"}):u.jsx(qn,{href:"/connect",useButton:!0,size:"lg",children:"Connect wallet"})})]})}const L3e=A.forwardRef(function({className:t="",speed:n=30,hasGradient:r=!0,children:i},s){const[o,a]=A.useState(0),[c,d]=A.useState(0),[h,y]=A.useState(1),[g,x]=A.useState(!1),_=A.useRef(null),S=s||_,I=A.useRef(null),L=A.useCallback(()=>
697{if(I.current&&S.current){const $=S.current.getBoundingClientRect(),z=I.current.getBoundingClientRect(),V=$.width,K=z.width;y(V&&K&&K<V?Math.ceil(V/K):1),a(V),d(K)}},[S]);A.useEffect(()=>{if(g&&(L(),I.current&&S.current)){const $=new ResizeObserver(()=>L());return $.observe(S.current),$.observe(I.current),()=>{$&&$.disconnect()}}},[L,S,g]),A.useEffect(()=>{L()},[L,i]),A.useEffect(()=>{x(!0)},[]);const D=A.useMemo(()=>c*h/n,[o,c,h,n]),F=A.useCallback($=>[...Array(Number.isFinite($)&&$>=0?$:0)].map((z,V)=>u.jsx(A.Fragment,{children:A.Children.map(i,K=>u.jsx("div",{children:K}))},V)),[i]);return g?u.jsxs("div",{ref:S,className:It("relative flex w-auto flex-row overflow-hidden",r&&"[mask-image:linear-gradient(90deg,transparent,rgba(0,0,0,.1)_5%,black_20%,black_80%,rgba(0,0,0,.1)_95%,transparent)]",t),children:[u.jsxs("div",{className:"min-w-auto flex flex-[0_0_auto] animate-marquee flex-row items-center",style:{animationDuration:`${D}s`},children:[u.jsx("div",{className:"min-w-auto flex flex-[0_0_auto] flex-row items-center",ref:I,children:A.Children.map(i,$=>u.jsx("div",{children:$}))}),F(h-1)]}),u.jsx("div",{className:"min-w-auto flex flex-[0_0_auto] animate-marquee flex-row items-center",style:{animationDuration:`${D}s`},children:F(h)})]}):null});function Dge({title:e,imgSrc:t,list:n}){return u.jsx("div",{className:xi("smw-full w-11/12 rounded-2xl px-6 py-5 text-white first:bg-primary sm:px-9 sm:py-7","bg-[#1645BB] last:bg-[#123284]"),children:u.jsxs("div",{className:"flex h-full w-full flex-col justify-between space-y-12",children:[u.jsx("h3",{className:"text-lg font-semibold sm:text-2xl",children:e}),u.jsx(_r,{src:t,className:"mx-5 size-48 sm:mx-7 sm:size-64"}),u.jsx("ul",{children:n.map(r=>u.jsx("li",{className:"after:block after:h-px after:bg-gradient-to-r after:from-white/10 after:to-white/0 last:after:hidden lg:after:w-1/2",children:u.jsxs("div",{className:"flex items-start gap-3 text-balance py-3 text-xs sm:text-sm",children:[u.jsx(kL,{className:"mt-1 hidden size-4 shrink-0 sm:flex","aria-hidden":!0,role:"presentation"}),r]})},r))})]})})}function $ge({className:e}){return u.jsx("div",{className:It("[filter:blur(clamp(60px,8vw,160px))]",e),children:u.jsx("div",{className:"aspect-[2000/768] h-auto w-full",style:{backgroundImage:"linear-gradient(26deg, #0A0F22 0%, #2660F5 59%, #4000FF 100%)",clipPath:"polygon( 100% 11.153%,100% 11.153%,103.818% 20.847%,106.294% 31.781%,107.503% 43.422%,107.525% 55.239%,106.437% 66.698%,104.316% 77.267%,101.239% 86.414%,97.285% 93.607%,92.531% 98.313%,87.055% 100%,4.141% 100%,4.141% 100%,3.469% 99.868%,2.832% 99.487%,2.238% 98.876%,1.695% 98.057%,1.213% 97.051%,0.799% 95.878%,0.462% 94.559%,0.211% 93.114%,0.054% 91.565%,0% 89.932%,0% 89.932%,0.03% 88.722%,0.118% 87.547%,0.26% 86.417%,0.455% 85.341%,0.7% 84.331%,0.991% 83.397%,1.325% 82.549%,1.7% 81.797%,2.114% 81.152%,2.562% 80.624%,79.216% 3.775%,79.216% 3.775%,81.332% 1.975%,83.489% 0.756%,85.67% 0.113%,87.854% 0.038%,90.025% 0.525%,92.162% 1.567%,94.246% 3.157%,96.26% 5.29%,98.184% 7.957%,100% 11.153% )"}})})}function Uge({className:e,style:t}){return u.jsxs("svg",{className:e,style:t,viewBox:"0 0 1602 401",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("path",{opacity:"0.1",d:"M1600.75 126.302C1537.06 171.666 1237.04 359.368 800.65 221.917C364.716 84.6087 64.8685 271.776 0.75 317.389",stroke:"white",strokeLinecap:"round"}),u.jsx("path",{opacity:"0.2",d:"M1600.75 110.6C1541.71 154.737 1243.67 352.669 800.797 221.911C357.685 91.0832 59.5685 289.298 0.75 333.293",stroke:"white",strokeLinecap:"round"}),u.jsx("path",{opacity:"0.3",d:"M1600.75 94.4536C1548.12 135.903 1251.8 346.283 800.738 221.911C349.749 97.5582 53.45 307.856 0.75 349.35",stroke:"white",strokeLinecap:"round"}),u.jsx("path",{opacity:"0.4",d:"M1600.75 77.9097C1556.77 114.553 1261.95 340.207 800.601 221.91C340.276 103.878 45.7464 328.263 0.75 365.663",stroke:"white",strokeLinecap:"round"}),u.jsx("path",{opacity:"0.5",d:"M1600.75 61.145C1568.52 89.717 1275.11 334.476 800.717 221.911C326.651 109.424 33.3158 353.769 0.75 382.618",stroke:"white",strokeLinecap:"round"}),u.jsx("path",{opacity:"0.6",d:"M0.75 400C0.75 400 295.266 111.738 800.75 222.072C1306.23 332.406 1600.75 44.144 1600.75 44.144",stroke:"white",strokeLinecap:"round"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M975.533 262.32L948.21 250.504L948.531 249.764L975.855 261.58C1053.22 295.037 1140.73 296.453 1219.13 265.517C1297.54 234.58 1360.41 173.826 1393.93 96.6186L1394.67 96.9393C1361.07 174.343 1298.03 235.252 1219.43 266.267C1140.83 297.281 1053.09 295.862 975.533 262.32Z",fill:"url(#paint0_linear_4282_2964)"}),u.jsx("path",{d:"M1394.51 94.9029C1393.62 94.7715 1392.79 95.3846 1392.66 96.2723C1392.53 97.1601 1393.14 97.9864 1394.03 98.1179C1394.92 98.2493 1395.75 97.6362 1395.88 96.7485C1396.01 95.8607 1395.4 95.
6970344 1394.51 94.9029Z",fill:"white"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1347.22 38.0379C1343.93 62.7499 1333.43 98.3235 1328.6 113.014L1327.65 112.704C1332.48 98.0239 1342.96 62.5232 1346.22 37.9075L1347.22 38.0379Z",fill:"url(#paint1_linear_4282_2964)"}),u.jsx("path",{d:"M1336.7 30.2332L1343 29.8947L1343.2 28.4607C1343.21 28.4208 1343.1 28.3342 1343.04 28.3626L1336.98 29.4108C1337.41 29.0863 1338.01 28.9979 1338.52 28.877C1340.07 28.511 1341.65 28.2707 1343.21 27.9674L1343.72 24.692L1343.66 24.5987L1340.68 26.3557C1339.63 26.8164 1338.67 27.4471 1337.67 28.0057C1337.53 28.0876 1336.91 28.3338 1336.9 28.4514C1336.89 28.4964 1336.94 28.5531 1336.93 28.5739L1336.7 30.2328L1336.7 30.2332Z",fill:"white"}),u.jsx("path",{d:"M1352.97 29.286C1353.85 29.7726 1354.74 30.248 1355.63 30.7125C1356.61 31.2245 1357.54 31.619 1358.48 32.2334C1358.54 32.2726 1358.63 32.2834 1358.63 32.3838L1355.96 31.2435L1352.99 29.7175C1352.88 29.6925 1352.92 29.6978 1352.93 29.769C1352.96 30.251 1352.69 30.7818 1352.69 31.2829L1358.66 33.3057L1358.93 31.3429C1358.81 31.3094 1358.72 31.2532 1358.62 31.1694C1357.56 30.223 1356.45 29.1316 1355.43 28.1292C1354.75 27.4538 1354.08 26.756 1353.42 26.0527L1352.97 29.2861L1352.97 29.286Z",fill:"white"}),u.jsx("path",{d:"M1335.59 13.6335L1334.99 18.5379L1336.06 18.2477C1336.08 17.9058 1336.2 17.5712 1336.26 17.2535C1336.39 16.5218 1336.42 15.7224 1336.57 15.0022C1336.61 14.8195 1336.67 14.4458 1336.84 14.4376C1336.96 14.4279 1336.9 14.5043 1336.9 14.5866C1336.84 15.4114 1336.63 16.2883 1336.54 17.1202C1336.51 17.4514 1336.55 17.8224 1336.45 18.1653L1337.45 17.8948L1338.05 14.0048L1335.59 13.6336L1335.59 13.6335Z",fill:"white"}),u.jsx("path",{d:"M1364.14 17.641C1364.14 17.6275 1364.25 17.5799 1364.18 17.5603L1361.74 17.2546L1361.26 21.1627L1362.29 21.7701C1362.4 21.1085 1362.45 20.4324 1362.56 19.7712C1362.64 19.3273 1362.75 18.6873 1362.88 18.2707C1362.91 18.1812 1362.86 18.1687 1363 18.2004L1362.6 21.8913L1363.48 22.449C1363.72 20.8513 1363.89 19.2377 1364.14 17.641Z",fill:"white"}),u.jsx("path",{d:"M1343.12 13.2358L1340.71 12.9046C1340.51 14.2879 1340.34 15.6991 1340.11 17.0617L1341.23 16.808C1341.51 15.7673 1341.47 14.6393 1341.84 13.6332L1341.93 13.7308L1341.58 16.6346L1342.69 16.3567L1343.12 13.2358L1343.12 13.2358Z",fill:"white"}),u.jsx("path",{d:"M1341.14 17.538L1338.31 18.278C1335.05 19.2914 1331.72 20.0197 1328.44 20.9329C1327.37 21.229 1326.32 21.5897 1325.25 21.833L1325.08 23.1917L1326.51 23.1025L1326.94 23.2181L1325.04 23.4441C1325 23.4714 1324.83 24.1989 1324.81 24.3287C1324.79 24.4518 1324.83 24.4262 1324.93 24.4254C1325.6 24.4202 1326.28 24.3166 1326.96 24.2826L1327.03 24.1762C1327.03 23.8467 1327.04 23.2923 1327.14 22.9867C1327.16 22.9225 1327.17 22.8755 1327.24 22.8689C1330.69 22.3989 1334.15 22.1681 1337.61 21.8469C1339.57 21.6644 1341.53 21.3657 1343.5 21.2693C1343.73 21.258 1343.97 21.2393 1344.2 21.2906L1344.72 17.523C1342.84 17.9976 1340.95 18.455 1339.06 18.9378C1336.83 19.5105 1334.57 20.2138 1332.3 20.6316C1331.92 20.7008 1331.51 20.7697 1331.13 20.7562L1344.65 17.3896C1344.84 17.3023 1344.79 16.7724 1344.85 16.567L1341.14 17.5381",fill:"white"}),u.jsx("path",{d:"M1343.46 29.6143L1344.98 29.8794L1347.22 13.3393L1345.32 15.8553C1345.16 18.4268 1344.67 20.9649 1344.31 23.5149C1344.26 23.8639 1344.21 24.227 1344.16 24.5788C1343.92 26.2563 1343.71 27.938 1343.46 29.6148L1343.46 29.6143Z",fill:"white"}),u.jsx("path",{d:"M1354.16 17.2433L1353.15 14.0965C1353.03 14.1116 1353.03 14.2358 1353.01 14.3315C1352.96 14.5657 1352.93 14.8766 1352.9 15.1215C1352.51 18.573 1352 22.0411 1351.52 25.4736C1351.28 27.1767 1351.05 28.8818 1350.81 30.5841C1350.82 30.7897 1352.06 30.7981 1352.27 30.8237L1354.16 17.2433Z",fill:"white"}),u.jsx("path",{d:"M1332.96 22.6124L1333.21 23.9022C1334.64 23.8923 1336.07 23.7275 1337.5 23.6557C1338.39 23.6113 1339.27 23.6294 1340.15 23.5855C1340.2 23.5836 1340.29 23.5813 1340.31 23.5267L1340.48 21.926L1332.96 22.6124Z",fill:"white"}),u.jsx("path",{d:"M1327.49 23.1793L1327.44 24.3183L1332.77 23.9898L1332.46 22.608L1327.49 23.1793Z",fill:"white"}),u.jsx("path",{d:"M1344.15 21.6285L1340.85 21.8965C1340.86 22.346 1340.7 22.9394 1340.71 23.3623C1340.71 23.4208 1340.71 23.4717 1340.76 23.4999L1343.92 23.2874L1344.15 21.6279L1344.15 21.6285Z",fill:"white"}),u.jsx("path",{d:"M1354.54 17.9553L1354.43 18.7426L1368.79 26.903L1363.99 24.4538C1361.01 22.827 1358.14 20.7418 1355.09 19.2764C1354.87 19.1689 1354.64 19.0403 1354.39 19.0233L1353.89 22.6784C1354.25 22.6981 1354.67 22.89 1355.02 23.0243C1357.07 23.796 1359.1 24.5984 1361.14 25.3761C1364.03 26.4769 1366.95 27.4946 1369.79 28.7525L1369.57 30.1616L1371.67 30.7947L1371.79 29.9231L1370.84 29.4488L1370.89 29.3109L1371.83 29.6132L1372.03 28.2355L1354.54 17.9549L1354.54 17.9553Z",fill:"white"}),u.jsx("path",{d:"M1357.3 24.2928L1357.07 25.9236L1363.72 28.1599L1364.41 26.9608L1357.3 24.2928Z",fill:"white"}),u.jsx("path",{d:"M1364.81 27.1022C1364.66 27.5473 1364.38 27.9283 1364.16 28.3307L1369.21 30.001L1369.41 28.9398L1364.81 27.1022Z",fill:"white"}),u.jsx("path",{d:"M1353.61 24.7515L1356.67 25.6981L1356.94 24.1326L1353.86 23.0221L1353.79 23.1279C1353.85 23.6818 1353.49 24.2016 1353.61 24.7515Z",fill:"white"}),u.jsx("path",{d:"M1357.17 15.1643L1356.68 18.3061C1357.09 18.3869 1357.4 18.7058 1357.75 18.9113C1357.96 18.1526 1358.08 17.3694 1358.15 16.5886C1358.2 16.1801 1358.49 15.9825 1358.55 15.6085C1358.56 15.5385 1358.58 15.3576 1358.51 15.3478L1357.17 15.1642L1357.17 15.1643Z",fill:"white"}),u.jsx("path",{d:"M1359.59 15.4395L1358.96 15.4182L1358.65 15.999L1358.58 15.7604C1358.58 16.023 1358.47 16.258 1358.42 16.5091C1358.35 16.9122 1358.04 18.9026 1358.12 19.1525C1358.19 19.3522 1358.84 19.4514 1359 19.6575L1359.59 15.4399L1359.59 15.4395Z",fill:"white"}),u.jsx("path",{d:"M1350.73 31.1286L1350.62 31.9443C1350.61 32.0225 1350.96 32.9929 1351.02 33.1135C1351.23 33.4991 1351.39 33.2358 1351.59 32.983C1351.66 32.8894 1352.1 32.2567 1352.13 32.1929C1352.19 32.0343 1352.11 31.5427 1352.2 31.3297L1350.73 31.1281L1350.73 31.1286Z",fill:"white"}),u.jsx("path",{d:"M1343.45 30.128C1343.46 30.4273 1343.24 30.748 1343.28 31.0388C1343.29 31.0878 1343.59 31.8618 1343.64 31.9488C1343.7 32.0782 1343.79 32.1903 1343.87 32.305C1343.97 32.3183 1344.71 31.4074 1344.76 31.277C1344.8 31.1883 1344.75 31.1562 1344.75 31.1376L1344.87 30.3219L1343.45 30.1275L1343.45 30.128Z",fill:"white"}),u.jsx("path",{d:"M1358.39 27.1379L1357.47 26.8959C1357.39 27.522 1357.19 28.1157 1357.21 28.7503C1357.59 28.8052 1357.78 29.2311 1358.07 29.4438L1358.39 27.1373L1358.39 27.1379Z",fill:"white"}),u.jsx("path",{d:"M1338.45 26.5474C1338.44 26.5841 1338.31 26.682 1338.39 26.7407C1338.63 26.6001 1338.86 26.3779 1339.11 26.2747C1339.21 26.2328 1339.35 26.2532 1339.4 26.2216C1339.57 26.1252 1339.6 24.6739 1339.65 24.3913C1339.49 24.4995 1338.71 24.4031 1338.69 24.5165C1338.69 24.5431 1338.72 24.5666 1338.72 24.5784C1338.63 25.2113 1338.57 25.932 1338.45 26.5474Z",fill:"white"}),u.jsx("path",{d:"M1355.74 26.313L1355.6 27.2694C1355.85 27.3367 1356.1 27.5565 1356.26 27.7579C1356.33 27.8484 1356.33 27.9714 1356.41 28.0106L1356.6 26.6323C1356.6 26.6205 1356.69 26.5795 1356.66 26.5557L1355.74 26.313Z",fill:"white"}),u.jsx("path",{d:"M1340.57 24.3453L1340.39 25.6392C1340.7 25.4477 1340.98 25.1417 1341.36 25.1357L1341.53 24.3354L1340.57 24.3458L1340.57 24.3453Z",fill:"white"}),u.jsx("path",{d:"M1352.15 0.464585L1352.04 0.36294C1351.85 0.379653 1351.78 1.6408 1351.63 1.8695C1351.55 1.98726 1351.29 2.06301 1351.17 2.16453C1349.93 3.20366 1349.35 5.61986 1348.83 7.14236L1349.48 7.05992C1349.59 7.7479 1349.1 7.50441 1348.68 7.47227C1348.51 8.10885 1348.26 8.77493 1348.13 9.42305C1347.92 10.525 1347.7 12.0797 1347.61 13.1958C1347.51 14.4064 1347.92 15.7457 1347.97 16.9949C1347.99 17.502 1347.94 18.0025 1347.96 18.4976C1348 19.4722 1348.23 20.2697 1348.15 21.2902C1348.04 22.5345 1347.78 23.866 1347.61 25.1156C1347.2 28.1988 1346.72 31.296 1346.22 34.3752C1346.18 34.632 1346.05 35.2266 1346.24 35.4096C1346.49 35.6429 1347.98 35.8966 1348.14 35.5463L1348.69 31.218C1349.45 27.9044 1349.46 24.1731 1350.18 20.882C1350.3 20.3279 1350.62 19.9528 1350.82 19.4409C1351.22 18.4583 1351.48 17.3218 1351.84 16.3129C1352.17 15.4132 1352.66 14.5215 1352.85 13.5718C1353.02 12.6995 1353.17 11.532 1353.26 10.6431C1353.33 9.81426 1353.31 8.96047 1353.29 8.1324C1352.87 7.93077 1352.32 8.10811 1352.47 7.41482C1352.69 7.59152 1352.96 7.71651 1353.24 7.66235C1353.21 6.58118 1353.18 5.47227 1353.01 4.40797C1352.93 3.85882 1352.74 2.92263 1352.44 2.47956C1352.33 2.3
6971669 1351.94 2.01502 1351.97 1.81595L1352.16 0.464657L1352.15 0.464585ZM1351.79 1.99321C1351.87 1.97891 1351.91 2.01794 1351.96 2.06839C1352.19 2.28418 1352.69 3.11517 1352.65 3.45844C1352.64 3.5454 1352.48 3.53291 1352.51 3.69348L1352.27 3.1167C1352.08 2.86027 1351.94 2.5527 1351.61 2.47733L1351.79 1.99378L1351.79 1.99321ZM1350.78 5.34766L1351.88 5.49886L1351.78 6.2299L1350.68 6.0787L1350.78 5.34766ZM1351.45 9.79168L1350.11 9.61756C1350.01 9.32891 1349.91 8.5926 1350.13 8.35568C1350.27 8.20213 1351.07 8.2988 1351.29 8.35538C1352.31 8.62962 1351.58 9.07585 1351.45 9.79112L1351.45 9.79168ZM1351.96 9.17709C1352.09 9.16639 1352.04 9.20605 1352.07 9.26576C1352.16 9.46604 1352.4 10.15 1352.41 10.3388C1352.41 10.5531 1352.23 10.6705 1352.21 10.8725C1352.08 10.9616 1351.64 10.1884 1351.63 10.0638C1351.62 9.75398 1351.94 9.48228 1351.96 9.17653L1351.96 9.17709ZM1349.69 8.9798C1349.59 9.17766 1349.88 9.63436 1349.84 9.76537C1349.81 9.84651 1349.24 10.3665 1349.16 10.3368C1349.06 10.2089 1348.93 10.0145 1348.99 9.84296L1349.69 8.97973L1349.69 8.9798ZM1350.13 10.0713L1351.2 10.2189C1351.25 10.2679 1351.25 10.2761 1351.24 10.3415C1351.21 10.6405 1351.01 10.9695 1350.95 11.2762C1350.64 11.3961 1350.32 11.2919 1350.02 11.2594L1350.13 10.0708L1350.13 10.0713ZM1351.36 10.4134C1351.49 10.3903 1351.45 10.4652 1351.47 10.5013C1351.68 10.7974 1351.87 11.1083 1352.07 11.41C1352 11.9689 1351.95 12.6745 1351.65 13.1458C1351.63 12.8416 1351.61 12.5532 1351.51 12.2649C1351.45 12.0942 1351.17 11.6489 1351.16 11.5465C1351.13 11.2838 1351.5 10.7281 1351.36 10.4134ZM1348.84 12.416L1349 11.2913L1349.08 11.4738C1349.21 11.2581 1349.26 10.9276 1349.38 10.7302C1349.51 10.5327 1349.76 10.4828 1349.84 10.2604C1349.92 10.257 1349.87 10.343 1349.87 10.4064C1349.85 10.6078 1349.83 11.2017 1349.75 11.3104C1349.62 11.4789 1349.25 11.6258 1349.13 11.8519L1348.84 12.4155L1348.84 12.416ZM1349.91 11.7153C1349.96 11.6937 1350.83 11.8095 1350.92 11.8434C1351.23 11.9507 1351.31 12.785 1351.41 13.0951C1351.5 13.3643 1351.69 13.308 1351.49 13.6629C1351.45 13.7466 1351.1 14.1982 1351.04 14.2324C1350.78 14.3823 1349.62 14.2135 1349.34 14.0769C1348.55 13.213 1349.35 12.4236 1349.91 11.7148L1349.91 11.7153ZM1348.42 26.2262C1348.42 26.0817 1348.41 25.9463 1348.43 25.7996C1348.65 23.1868 1349.27 20.4898 1349.53 17.8656L1349.9 16.1142C1349.61 19.262 1349.12 22.4134 1348.62 25.5369L1348.42 26.2255L1348.42 26.2262Z",fill:"white"}),u.jsx("path",{d:"M1346.03 34.6641C1346.16 34.6257 1346.03 34.3467 1346.04 34.2317C1346.05 33.9886 1346.11 33.748 1346.13 33.5051C1346.52 28.9692 1347.47 24.3736 1347.97 19.8336L1347.74 16.3792L1347.47 15.0356L1347.37 15.3344C1346.92 20.035 1345.78 24.8822 1345.4 29.5636C1345.32 30.486 1345.45 31.6887 1345.58 32.6099C1345.67 33.3222 1345.8 33.9899 1346.03 34.664L1346.03 34.6641Z",fill:"white"}),u.jsx("path",{d:"M1348.66 34.511C1348.75 34.4768 1348.84 34.2874 1348.89 34.198C1349.56 33.0138 1350.05 31.7357 1350.46 30.4302C1351.07 26.0297 1351.69 21.6001 1352.29 17.2185L1352.54 15.3895L1352.2 16.1438C1351.7 17.8719 1350.84 19.3306 1350.58 21.1056C1350.14 24.1052 1349.77 27.1352 1349.27 30.0951L1348.66 34.5121L1348.66 34.511Z",fill:"white"}),u.jsx("path",{d:"M1350.97 5.5464L1350.94 5.77185C1351.17 5.7742 1351.34 5.94479 1351.56 5.85317L1351.59 5.68988L1350.97 5.54697L1350.97 5.5464Z",fill:"white"}),u.jsx("ellipse",{cx:"1.29633",cy:"1.29828",rx:"1.29633",ry:"1.29828",transform:"matrix(-0.24103 -0.970518 -0.970733 0.240161 1313.97 165.894)",fill:"white"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1296.54 190.729C1283.12 204.394 1259.1 220.113 1216.65 228.499C1174.37 236.851 1150.54 252.486 1137.28 265.989C1130.64 272.742 1126.65 278.97 1124.32 283.5C1123.15 285.765 1122.4 287.606 1121.94 288.877C1121.71 289.512 1121.55 290.005 1121.45 290.337C1121.4 290.503 1121.37 290.628 1121.35 290.711C1121.34 290.753 1121.33 290.784 1121.32 290.804L1121.32 290.826L1121.32 290.831C1121.32 290.831 1121.32 290.831 1120.83 290.715C1120.34 290.599 1120.34 290.597 1120.34 290.597L1120.34 290.595L1120.35 290.587L1120.35 290.559C1120.36 290.535 1120.37 290.499 1120.38 290.453C1120.41 290.362 1120.44 290.227 1120.49 290.052C1120.6 289.703 1120.76 289.191 1121 288.537C1121.47 287.229 1122.24 285.348 1123.43 283.042C1125.8 278.43 1129.85 272.119 1136.56 265.288C1149.98 251.623 1174.01 235.904 1216.45 227.518C1258.73 219.166 1282.57 203.531 1295.83 190.028C1302.46 183.275 1306.45 177.047 1308.79 172.517C1309.95 170.252 1310.71 168.411 1311.16 167.14C1311.39 166.505 1311.55 166.012 1311.65 165.68C1311.7 165.514 1311.73 165.389 1311.76 165.306C1311.77 165.264 1311.77 165.233 1311.78 165.213L1311.79 165.191L1311.79 165.187C1311.79 165.187 1311.79 
697165.186 1312.27 165.302C1312.76 165.418 1312.76 165.42 1312.76 165.42L1312.76 165.43L1312.75 165.458C1312.74 165.483 1312.73 165.518 1312.72 165.564C1312.7 165.656 1312.66 165.79 1312.61 165.965C1312.5 166.315 1312.34 166.826 1312.11 167.48C1311.63 168.788 1310.86 170.669 1309.68 172.975C1307.3 177.587 1303.25 183.898 1296.54 190.729Z",fill:"url(#paint2_linear_4282_2964)"}),u.jsxs("defs",{children:[u.jsxs("linearGradient",{id:"paint0_linear_4282_2964",x1:"1360.86",y1:"24.8336",x2:"926.919",y2:"196.767",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{stopColor:"white"}),u.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]}),u.jsxs("linearGradient",{id:"paint1_linear_4282_2964",x1:"1346.19",y1:"0.21429",x2:"1325.25",y2:"0.661253",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{stopColor:"white"}),u.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]}),u.jsxs("linearGradient",{id:"paint2_linear_4282_2964",x1:"1310.77",y1:"101.815",x2:"1120.34",y2:"101.815",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{stopColor:"white"}),u.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]})]})]})}function zge({children:e}){return u.jsxs("section",{className:"full-bleed wrapper relative z-0 -mt-[var(--header-height)] flex flex-col pt-[var(--header-height)]",children:[u.jsxs("div",{className:"relative z-20 pt-4 sm:pt-12",children:[u.jsxs("div",{className:"max-w-sx mx-auto mb-12 text-center sm:mb-24 sm:max-w-xl",children:[u.jsxs("h1",{className:"sr-only","data-testid":"landing-heading",children:[ls.appName," Finance"]}),u.jsxs("h2",{className:"mb-5 snap-center text-4xl font-semibold sm:mb-8 sm:text-7xl",children:["Swap, deposit,",u.jsx("br",{})," ",ls.home.swapHeadline]}),u.jsxs("p",{className:"mx-auto hidden w-5/6 text-sm sm:block sm:text-lg",children:[ls.appName," is a"," ",u.jsx("span",{className:"font-bold",children:"decentralized exchange"})," where you can execute low-fee swaps, deposit tokens to earn rewards, and actively participate in the onchain economy."]})]}),u.jsx("div",{className:"relative z-10 mx-auto max-w-xl",children:u.jsx("div",{className:"sm:-m-2 sm:rounded-[20px] sm:bg-white/5 sm:p-2 sm:outline sm:outline-1 sm:outline-white/15 sm:backdrop-blur-[1px]",children:e})})]}),u.jsxs("div",{className:"pointer-events-none absolute inset-0 z-10 overflow-x-clip bg-background",children:[u.jsx("div",{className:"relative -z-20",children:u.jsx($ge,{className:"absolute left-1/2 top-48 w-full min-w-[1000px] max-w-[1600px] -translate-x-[60%] sm:top-96"})}),u.jsx("div",{className:"absolute inset-x-0 top-0 hidden h-[900px] lg:block",children:u.jsx(Uge,{className:"absolute bottom-0 left-1/2 -z-10 w-full min-w-[1400px] max-w-[1600px] -translate-x-1/2 mix-blend-overlay invert dark:invert-0"})})]})]})}const Vge=({title:e,description:t})=>u.jsx("div",{className:"rounded-2xl bg-accent-0 p-7 md:p-8 lg:p-9",children:u.jsxs("div",{className:"isolate w-full",children:[u.jsx("h3",{className:"mb-7 text-xs uppercase tracking-wider",children:e}),u.jsx("div",{className:"text-balance text-sm text-accent-50 lg:max-w-64 lg:text-base",children:u.jsx("p",{children:t})})]})});function qge(){return u.jsxs("div",{className:"flex flex-col gap-6 lg:relative",children:[u.jsxs("div",{className:"space-y-8 px-6 pb-6 md:px-20 lg:pb-96",children:[u.jsx("h2",{className:"mb-8 text-3xl",children:"How it works"}),u.jsx("p",{className:"text-xl sm:max-w-sm md:text-xl",children:"Protocol incentives and mechanics are thoughtfully designed to sustain long term value creation."}),u.jsx(qn,{href:"/docs#tokenomics",color:"secondary",size:"lg",useButton:!0,children:"Tokenomics"})]}),u.jsxs("div",{className:"right-56 top-28 mx-auto mb-6 max-w-72 md:max-w-fit lg:absolute lg:mb-20",children:[u.jsx(_r,{src:`/svg/${oo}/landing-how-it-works-dark.svg`,className:"hidden h-auto w-full max-w-full dark:block"}),u.jsx(_r,{src:`/svg/${oo}/landing-how-it-works-light.svg`,className:"h-auto w-full max-w-full dark:hidden"})]}),u.jsx("div",{className:"grid grid-cols-1 justify-stretch gap-3 px-6 sm:px-0 lg:grid-cols-3 lg:flex-row lg:gap-6",children:ls.home.audie
697nces.map(e=>u.jsx(Vge,{...e},e.title))})]})}function Hge(){const[e,t]=A.useState(0),n=A.useCallback(()=>t(r=>r+1),[t]);return u.jsxs(u.Fragment,{children:[u.jsx(zge,{children:u.jsx(qD,{token0Tag:"from",token1Tag:"to",syncQueryParams:!1,placeholder:u.jsx(A$,{}),children:u.jsx(g$,{reset:n,children:u.jsx(T$,{autofocus:!1})},e)})}),u.jsx("section",{className:"relative z-10 mx-auto max-w-screen-xl",children:u.jsxs("div",{className:"flex flex-col gap-12 pb-6 pt-12 sm:gap-28 sm:pb-12 sm:pt-32",children:[u.jsxs("div",{className:"flex flex-col px-6 md:gap-6 md:px-20",children:[u.jsx("div",{className:"mb-8 md:mb-3",children:u.jsx("h2",{className:"text-xl font-semibold sm:text-3xl",children:ls.home.foundation.title})}),u.jsx("div",{className:"order-3 sm:max-w-md md:max-w-[810px]",children:u.jsx("p",{className:"text-xl sm:text-3xl",children:ls.home.foundation.description})})]}),u.jsx("div",{className:"full-bleed wrapper scrollbar-none mb-12 flex gap-4 overflow-x-auto sm:gap-6",children:ls.home.features.map(r=>u.jsx(Dge,{title:r.title,imgSrc:r.imgSrc,list:[...r.list]},r.title))})]})}),u.jsx("section",{className:"mx-auto max-w-screen-xl",children:u.jsx(qge,{})}),u.jsxs("section",{className:"mx-auto max-w-screen-xl",children:[u.jsxs("div",{className:"mx-auto mb-24 mt-32 w-full max-w-2xl text-center lg:mb-16",children:[u.jsxs("div",{className:"mb-12",children:[u.jsx(_r,{src:`/svg/${oo}/landing-essential-dark.svg`,className:"mx-auto hidden w-full max-w-48 dark:block"}),u.jsx(_r,{src:`/svg/${oo}/landing-essential-light.svg`,className:"mx-auto w-full max-w-48 dark:hidden"})]}),u.jsxs("div",{className:"flex flex-col gap-5 text-balance md:gap-7",children:[u.jsx("h2",{className:"text-3xl md:text-5xl lg:text-6xl",children:ls.home.essential.heading}),u.jsx("p",{className:xi("text-sm text-accent-50",""),children:ls.home.essential.subheading})]})]}),!1]})]})}const Wge=[{link:"https://portal.soneium.org/en",visible:!1,position:1,sources:[{media:"(max-width: 1023px)",type:"image/jpeg",src:"/banners/VELO/soneium-1x3.jpg"},{media:"(min-width: 1024px)",type:"image/jpeg",src:"/banners/VELO/soneium-2x3.jpg"}]},{link:"/launcher",visible:!1,position:2,sources:[{media:"(max-width: 1023px)",type:"image/jpeg",src:"/banners/VELO/launcher-1x3.jpg"},{media:"(min-width: 1024px)",type:"image/jpeg",src:"/banners/VELO/launcher-2x3.jpg"}]},{link:"/autopilot",visible:!1,position:3,sources:[{media:"(max-width: 1023px)",type:"image/jpeg",src:"/banners/VELO/autopilot-1x3.jpg"},{media:"(min-width: 1024px)",type:"image/jpeg",src:"/banners/VELO/autopilot-2x3.jpg"}]},{link:"/superswaps",visible:!1,position:4,sources:[{media:"(max-width: 1023px)",type:"image/jpeg",src:"/banners/VELO/superswaps-1x3.jpg"},{media:"(min-width: 1024px)",type:"image/jpeg",src:"/banners/VELO/superswaps-2x3.jpg"}]},{link:"https://aero.xyz/articles/aero-lite-is-live-on-arc/",visible:!0,position:0,sources:[{media:"(max-width: 1023px)",type:"image/jpeg",src:"/banners/AERO/aero-lite-1x3.jpg"},{media:"(min-width: 1024px)",type:"image/jpeg",src:"/banners/AERO/aero-lite-2x3.jpg"}]},{link:"/liquidity/stocks",visible:!0,position:0,sources:[{media:"(max-width: 1023px)",type:"image/jpeg",src:"/banners/AERO/stocks-1x3.jpg"},{media:"(min-width: 1024px)",type:"image/jpeg",src:"/banners/AERO/stocks-2x3.jpg"}]},{link:"/launcher",visible:!1,position:1,sources:[{media:"(max-width: 1023px)",type:"image/jpeg",src:"/banners/AERO/launcher-1x3.jpg"},{media:"(min-width: 1024px)",type:"image/jpeg",src:"/banners/AERO/launcher-2x3.jpg"}]},{link:"/autopilot",visible:!1,position:2,sources:[{media:"(max-width: 1023px)",type:"image/jpeg",src:"/banners/AERO/autopilot-1x3.jpg"},{media:"(min-width: 1024px)",type:"image/jpeg",src:"/banners/AERO/autopilot-2x3.jpg"}]},{link:"/launch",visible:!1,position:3,sources:[{media:"(max-width: 1023px)",type:"image/jpeg",src:"/banners/AERO/solana-1x3.jpg"},{media:"(min-width: 1024px)",type:"image/jpeg",src:"/banners/AERO/solana-2x3.jpg"}]},{link:"https://dromos.xyz/a-new-horizon",visible:!1,position:3,sources:[{media:"(max-width: 1023px)",type:"image/jpeg",src:"/banners/dromos-1x3.jpg"},{media:"(min-width: 1024px)",type:"image/jpeg",src:"/banners/dromos-2x3.jpg"}]}],k$=5e3;function Gge(){const e=Wge.filter(o=>o.visible).sort((o,a)=>o.position-a.position),[t,n]=A.useState(0);if(A.useEffect(()=>{if(e.length<=1)return;const o=setInterval(()=>{n(a=>(a+1)%e.length)},k$);return()=>clearInterval(o)},[e.length]),e.length===0)return null;const r=e[t],i=r.link.includes("https://"),s=i?"a":qn;return u.jsxs(s,{href:r.link,target:i?"_blank":void 0,rel:i?"noopener noreferrer":void 0,className:"relative flex w-full overflow-hidden rounded-2xl border-4 border-accent-0 md:max-w-2xl",children:[u.jsx(Kge,{sources:r.sources,className:"aspect-2/1 min-h-full w-full bg-accent-5 object-cover lg:aspect-3/1"}),e.length>1&&u.jsx(Yge,{className:"absolute right-4 top-4 size-5 text-white"})]})}function Kge({sources:e,className:t}){const[n,r]=A.useState(!1);return u.jsxs(u.Fragment,{children:[u.jsxs("picture",{className:n?"block":"hidden",children:[e.map(({media:i,type:s,src:o})=>u.jsx("source",{media:i,type:s,srcSet:o},o)),u.jsx("img",{src:e[0].src,onLoad:()=>r(!0),className:t})]}),!n&&u.jsx("div",{className:t})]})}function Yge({className:e,strokeWidth:t=4}){const r=2*Math.PI*20;return u.jsxs("svg",{viewBox:"0 0 50 50",className:e,children:[u.jsx("circle",{cx:"25",cy:"25",r:20,fill:"none",stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeDasharray:r,strokeDashoffset:r,className:"animate-[circleProgress_linear_infinite]",style:{animationDuration:`${k$/1e3}s`}}),u.jsx("style",{children:`
698          @keyframes circleProgress {
699            0% {
700              stroke-dashoffset: ${r};
701            }
702            100% {
703              stroke-dashoffset: 0;
704            }
705          }
706        `})]})}function Zge({currentFilters:e,fallbackFilter:t}){const[,n]=xd(),r=A.useMemo(()=>e.filter(s=>s!==t).length,[e,t]),i=()=>{n({filters:""})};return u.jsxs("button",{onClick:i,className:It("flex cursor-default flex-col items-end gap-1.5 whitespace-nowrap px-6 py-4 lg:min-w-36",r!==0&&"cursor-pointer hover:opacity-80"),children:[u.jsx("div",{className:"text-2xs font-semibold uppercase tracking-widest text-accent-50",children:"Filters"}),u.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold",children:[r>0&&u.jsx("span",{className:"rounded-full bg-primary/10 px-1.5 text-primary",children:r}),u.jsx("span",{className:r===0?"text-accent-40":"text-primary",children:r>0?"Reset":"Default"})]})]})}function Xge({title:e,options:t,selected:n,onSortChange:r,names:i}){const[s,o]=n.split(":"),a=o==="desc";return u.jsxs(sE,{value:s,onChange:c=>{r(c===s?`${c}:${a?"asc":"desc"}`:`${c}:${o}`)},children:[u.jsxs(rw,{className:"flex cursor-pointer flex-col items-stretch gap-1.5 whitespace-nowrap px-6 py-4 text-left hover:opacity-80 focus:outline-none lg:min-w-36",children:[u.jsx("div",{className:"flex items-center gap-1.5 text-2xs font-semibold uppercase tracking-widest",children:e}),u.jsxs("div",{className:"flex items-center justify-between gap-2 text-xs font-semibold text-primary",children:[i[s],a?u.jsx(a6,{className:"size-2.5",strokeWidth:2}):u.jsx(qS,{className:"size-2.5",strokeWidth:2})]})]}),u.jsx(iw,{anchor:"bottom start",transition:!0,className:xi("[--anchor-gap:theme(sp
706acing.2)]","z-10 flex min-w-64 origin-top flex-col","rounded-xl border border-accent-10 bg-accent-0 p-3 shadow-2xl","space-y-1 transition duration-100 ease-out data-[closed]:scale-95 data-[closed]:opacity-0"),children:t.map(c=>u.jsxs(pg,{value:c,className:"group flex w-full cursor-pointer items-center justify-between rounded-lg p-3 text-xs data-[focus]:bg-accent-5 data-[selected]:bg-accent-5",children:[i[c],c===s&&(a?u.jsx(a6,{className:"size-3 text-primary",strokeWidth:2}):u.jsx(qS,{className:"size-3 text-primary",strokeWidth:2}))]},`filter-${c}`))})]})}const Qge=({unfiltered:e,handleFilter:t,fallbackFilter:n,getFilterOverride:r,discriminatedFilters:i=[]})=>{const[s,o]=xd(),a=s.get("filters"),c=A.useMemo(()=>{const y=a?.split(",");return l_(y)?[n]:y},[a,n]),d=A.useCallback(y=>{const g=Object.fromEntries(s.entries()),x=g.filters?.split(",");let _=l_(x)?[]:x;const S=_.length===0;if(_.includes(y))_=_.filter(L=>L!==y);else{const L=i.find(D=>D.includes(y));L&&(_=_.filter(D=>!L.includes(D))),_.push(y),S&&!_.includes(n)&&!L?.includes(n)&&_.push(n)}o({...g,filters:_.join(",")})},[s]);return{filtered:A.useMemo(()=>{let y=e;const g=r?.(c)??!1;return l_(c)?y=y.filter(x=>t(x)):c.forEach(x=>{y=y.filter(_=>t(_,x,g))}),y},[c,e,t]),onFilterChange:d,currentFilters:c}};function l_(e){return!e||e.length===0||e.length===1&&!e[0]}const Jge=fd("500"),dM=fd("300"),e1e={default:"Active",listed:"Listed",emerging:"Emerging",verified:"Listed & Emerging",unknown:"Unknown",basicStable:"Basic Stable",basicVolatile:"Basic Volatile",concentrated:"Concentrated",incentivized:"Show only incentivized",alm:"Show only Autopilot available",lowTvl:"Show only low TVL",tvv:"Most rewarded",lowTvv:"Least rewarded",migrating:"Migrating",stock:"Stocks",all:"All pools"},t1e={tvl:"TVL",apr:"APR",feeApr:"Fee APR",volume:"Volume",feesValue:"Fees",votes:"Votes",tvv:"Rewards",vapr:"vAPR",tfv:"Fees",tbv:"Incentives"},C$=e=>AJ[e.chainId].some(t=>t.toLowerCase()===e.address.toLowerCase()),Uf={default:()=>!0,verified:({pool:e,tokens:t})=>Uf.emerging({pool:e,tokens:t})||Uf.listed({pool:e,tokens:t}),unknown:({pool:e,tokens:t})=>!Uf.verified({pool:e,tokens:t}),listed:({pool:e,tokens:t})=>t.all[`${e.chainId}:${e.token0.toLowerCase()}`]?.listed&&t.all[`${e.chainId}:${e.token1.toLowerCase()}`]?.listed,emerging:({pool:e,tokens:t})=>!!e.emerging&&!Uf.listed({pool:e,tokens:t}),lowTvl:({pool:e})=>e.tvl<Jge,concentrated:({pool:e})=>Ox.concentrated(e.type),basic:({pool:e})=>Ox.basic(e.type),basicStable:({pool:e})=>e.type===0,basicVolatile:({pool:e})=>e.type===-1,cl1:({pool:e})=>e.type===1,cl10:({pool:e})=>e.type===10,cl50:({pool:e})=>e.type===50,cl80:({pool:e})=>e.type===80,cl100:({pool:e})=>e.type===100,cl150:({pool:e})=>e.type===150,cl200:({pool:e})=>e.type===200,cl500:({pool:e})=>e.type===500,cl2000:({pool:e})=>e.type===2e3,incentivized:({pool:e})=>e.gauge_alive,alm:({pool:e})=>e.alm!==Pn,tvv:({pool:e})=>!e.oldCL&&e.gauge_alive&&"tvv"in e&&e.tvv>=dM,lowTvv:({pool:e})=>!e.oldCL&&e.gauge_alive&&"tvv"in e&&e.tvv<dM,migrating:({pool:e})=>!!e.oldCL,stock:({pool:e})=>C$(e),all:()=>!0},I$=[{name:"Superchain",id:0},...p3];I$.forEach(e=>{Uf[e.name]=({pool:t})=>t.chainId===e.id||e.id===0});function n1e({pools:e,setFiltered:t,filterOptions:n=[],fallbackFilter:r="default",sort:i,setSort:s,sortOptions:o=[],onFiltersChange:a}){const{data:c}=ys(),d=A.useCallback((_,S)=>S?Uf[S]({pool:_,tokens:c}):Uf[r]({pool:_,tokens:c}),[r,c]),h=I$.map(_=>_.name),{currentFilters:y,onFilterChange:g,filtered:x}=Qge({unfiltered:e,handleFilter:d,fallbackFilter:r,discriminatedFilters:n.filter(_=>_.discriminated).map(_=>_.options??[]).concat([h]),getFilterOverride:_=>_.includes("lowTvl")||_.includes("all")});return A.useEffect(()=>t(x),[x]),A.useEffect(()=>a?.(y),[y]),u.jsx("div",{className:"scrollbar-none overflow-x-auto border-t border-accent-10",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center divide-x divide-accent-10 border-r border-accent-10",children:[n.map(_=>u.jsx(_.component,{title:_.title,options:_.options,currentFilters:y,onFilterChange:g,extraContent:_.extraContent,names:e1e,defaultFilter:_.default},_.title)),u.jsx(Xge,{title:"Sort",options:o,selected:i,onSortChange:s,names:t1e})]}),u.jsx(Zge,{currentFilters:y,fallbackFilter:r})]})})}function r1e(){const{data:e}=ys(),{data:t}=Yg(e,{allPools:!1}),[n,r,i]=A.useMemo(()=>
706{if(!t||!e)return[0n,0n,0n];const s=t.all.filter(o=>Uf.verified({pool:o,tokens:e}));return[s.reduce((o,a)=>o+a.tvl,0n),s.reduce((o,a)=>o+a.feesValue,0n),s.reduce((o,a)=>o+a.volume,0n)]},[t,e]);return u.jsxs(ow,{content:u.jsx(wD,{}),className:"flex grow flex-col justify-between gap-5 rounded-2xl bg-accent-5 p-6 text-start",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:"hidden rounded-full border border-accent-30 p-4 lg:block",children:u.jsx(uA,{className:"size-6",strokeWidth:1.5})}),u.jsxs("div",{className:"max-w-sm text-balance",children:["Provide liquidity to enable low-slippage swaps and earn"," ",ls.appToken," emissions."]})]}),u.jsx("div",{className:"flex w-full flex-col justify-end overflow-x-auto text-end sm:flex-row sm:gap-5",children:[{amount:i,label:"Volume"},{amount:r,label:"Fees"},{amount:n,label:"TVL"}].map(s=>u.jsxs("div",{className:"flex flex-row-reverse justify-between gap-1 border-b border-accent-10 py-2 last:border-b-0 last:border-r-0 last:pr-0 dark:border-accent-20 sm:flex-col sm:items-end sm:justify-center sm:border-b-0 sm:border-r sm:py-1 sm:pr-5",children:[u.jsx("div",{className:"text-sm font-semibold lg:text-base",children:s.amount>0n?u.jsx("div",{"data-testid":`hero-${s.label.toLowerCase()}`,"data-test-amount":Ns(s.amount,18),children:u.jsx(Gt,{amount:s.amount,symbol:"$",showLogo:!1,showSymbol:!0,plain:!0})}):u.jsx("div",{className:"my-1.5 h-3 w-16 animate-loop rounded bg-gradient-to-r from-accent-10 via-accent-20 to-accent-10 bg-2x sm:h-4 sm:w-20"})}),u.jsx("div",{className:"text-sm text-accent-50",children:s.label})]},s.label))})]})}const i1e=A.memo(r1e);function s1e(){return u.jsxs(u.Fragment,{children:[u.jsx("h4",{className:"font-semibold",children:"Put your deposit on Autopilot"}),u.jsx("p",{children:"Instead of choosing a price range and manually rebalancing over time, this feature helps optimize rewards by automatically adjusting your position as prices change."})]})}function fM({title:e,options:t,currentFilters:n,onFilterChange:r,names:i,allowBlank:s=!0,blankLabel:o,icons:a}){const c=A.useMemo(()=>t.find(d=>n.includes(d)),[n,t]);return u.jsxs(sE,{value:c??null,onChange:d=>{d!==c&&r(d??c)},children:[u.jsxs(rw,{className:"flex cursor-pointer flex-col items-stretch gap-1.5 whitespace-nowrap px-6 py-4 text-left hover:opacity-80 focus:outline-none lg:min-w-36",children:[u.jsxs("div",{className:It("flex items-center gap-1.5 text-2xs font-semibold uppercase tracking-widest",!c&&"text-accent-50"),children:[e,c&&u.jsx("span",{className:"size-1.5 rounded-full bg-green"})]}),u.jsxs("div",{className:"flex items-center justify-between gap-2 text-xs font-semibold text-primary",children:[c?i[c]:"Any",u.jsx(Ju,{className:"size-2.5",strokeWidth:2})]})]}),u.jsx(iw,{anchor:"bottom start",transition:!0,className:xi("[--anchor-gap:theme(spacing.2)]","z-10 flex min-w-64 origin-top flex-col","rounded-xl border border-accent-10 bg-accent-0 p-3 shadow-2xl","space-y-1 transition duration-100 ease-out data-[closed]:scale-95 data-[closed]:opacity-0"),children:(s?[null,...t]:t).map(d=>u.jsxs(pg,{value:d,"data-testid":`filter-${d??e}`,className:"group flex w-full cursor-pointer items-center justify-between rounded-lg p-3 text-xs data-[focus]:bg-accent-5 data-[selected]:bg-accent-5",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[a?.[d]??null,d?i[d]:o??"Any"]}),u.jsx(u0,{className:"invisible size-3 text-primary group-data-[selected]:visible"})]},`filter-${d}`))})]})}function hM({title:e,options:t,currentFilters:n,onFilterChange:r,names:i,extraContent:s}){const o=A.useMemo(()=>!!t.find(a=>n.includes(a)),[n,t]);return u.jsxs(qF,{children:[u.jsxs(YA,{className:"flex cursor-pointer flex-col items-stretch gap-1.5 whitespace-nowrap px-6 py-4 text-left hover:opacity-80 focus:outline-none lg:min-w-36",children:[u.jsxs("div",{className:It("flex items-center gap-1.5 text-2xs font-semibold uppercase tracking-widest",!o&&"text-accent-50"),children:[e,o&&u.jsx("span",{className:"size-1.5 rounded-full bg-green"})]}),u.jsxs("div",{className:"flex items-center justify-between gap-2 text-xs font-semibold text-primary",children:[o?"Active":"Inactive",u.jsx(Ju,{className:"size-2.5",strokeWidth:2})]})]}),u.jsxs(ZA,{transition:!0,anchor:"bottom start",className:xi("[--anchor-gap:theme(sp
706acing.2)]","z-10 flex min-w-64 origin-top flex-col","rounded-xl border border-accent-10 bg-accent-0 p-3 shadow-2xl","transition duration-100 ease-out data-[closed]:scale-95 data-[closed]:opacity-0"),children:[t.map(a=>u.jsxs("div",{className:"group flex w-full items-center gap-2 px-2 py-3 text-xs",children:[u.jsx(Ufe,{checked:n.includes(a),onChange:()=>r(a),className:"group relative flex w-7 cursor-pointer rounded-full bg-accent-10 p-0.5 ease-in-out data-[checked]:bg-primary",children:u.jsx("span",{className:"pointer-events-none inline-block size-3 translate-x-0 rounded-full bg-white ring-0 transition duration-200 ease-in-out group-data-[checked]:translate-x-3"})}),i[a]]},`filter-${a}`)),s&&u.jsx("div",{className:"-mx-3 -mb-3 mt-3 max-w-72 space-y-2 border-t border-accent-10 p-5 text-xs text-accent-50",children:s})]})]})}function d_({children:e,active:t,disabled:n,onClick:r,className:i=""}){return u.jsx("button",{type:"button",className:It("mx-0.5 inline-flex h-8 min-w-[32px] items-center justify-center rounded-xl px-2 text-sm font-semibold transition",t?"bg-primary/10 text-primary":"hover:bg-accent-5",n&&"pointer-events-none text-accent-40",i),onClick:r,disabled:n,children:e})}function o1e({totalPages:e,currentPage:t,onPageChange:n,delta:r=2}){const i=A.useMemo(()=>{const o=[];for(let a=Math.max(2,t-r);a<=Math.min(e-1,t+r);a++)o.push(a);return t-r>2&&o.unshift(null),t+r<e-1&&o.push(null),o.unshift(1),e>1&&o.push(e),Array.from(new Set(o))},[t,e,r]),s=o=>{o!==t&&o>=1&&o<=e&&n(o)};return e<=1?null:u.jsxs("div",{className:"flex items-center justify-center gap-1 sm:justify-end",children:[u.jsx(d_,{onClick:()=>s(t-1),disabled:t===1,children:u.jsx(oA,{className:"size-4",strokeWidth:1.5})}),u.jsx("div",{className:"hidden items-center gap-1 sm:flex",children:i.map(o=>o?u.jsx(d_,{active:o===t,onClick:()=>s(o),children:o},o):u.jsx("span",{className:"text-accent-40",children:u.jsx(ML,{className:"size-4",strokeWidth:1.5})},"pagination-ellipsis"))}),u.jsxs("div",{className:"flex items-center gap-2 px-2 text-sm font-semibold sm:hidden",children:[t," ",u.jsx("span",{className:"text-accent-40",children:"out of"})," ",e]}),u.jsx(d_,{onClick:()=>s(t+1),disabled:t===e,children:u.jsx(kL,{className:"size-4",strokeWidth:1.5})})]})}function a1e({tabs:e}){const t=C3();return u.jsx("div",{className:"flex items-center gap-5 text-xl font-semibold sm:gap-8",children:e.map(n=>{const r=n.active??n.href===t;return u.jsxs(qn,{href:n.href,className:It("flex items-center gap-2",!r&&"text-accent-50 hover:opacity-80"),children:[n.label,n.isNew&&u.jsx(Qp,{className:"bg-primary text-white",children:"New"})]},n.label)})})}function c1e({data:e,onFound:t}){const[n,r]=xd(),i=s=>{const o=Object.fromEntries(n.entries());r({...o,query:s})};return A.useEffect(()=>{const s=String(n.get("query")||"").toLowerCase();if(en.isEmpty(s))t(e);else{const o=e.filter(a=>"symbol"in a&&a.symbol.toLowerCase().includes(s)||"address"in a&&Sr(s)&&a.address.toLowerCase().includes(s)||"token0"in a&&Sr(s)&&a.token0.toLowerCase().includes(s)||"token1"in a&&Sr(s)&&a.token1.toLowerCase().includes(s));t(o)}},[e,n]),u.jsx(gh,{placeholder:"Symbol or address...",icon:Lx,value:n.get("query")||"",onChange:s=>i(s.target.value),className:"w-full rounded-full sm:w-auto"})}function u1e({data:e,onFound:t,tabs:n}){return u.jsxs("div",{className:"flex flex-col justify-between gap-4 p-5 sm:flex-row sm:items-center sm:pl-6",children:[u.jsx(a1e,{tabs:n}),u.jsxs("div",{className:"flex flex-row items-center gap-4",children:[u.jsxs(qn,{href:"/launch",useButton:!0,className:"shrink-0 sm:flex",children:[u.jsx(uA,{className:"size-4",strokeWidth:1.5}),"Launch pool"]}),u.jsx(c1e,{data:e,onFound:t})]})]})}function l1e({pool:e}){return u.jsxs(qn,{"data-testid":"liquidity-pool",className:"group grid grid-cols-1 gap-4 rounded-2xl bg-accent-0 p-6 last:border-b-0 sm:grid-cols-5 sm:gap-8 sm:px-8 sm:py-7 lg:grid-cols-7 lg:rounded-none lg:border-b lg:border-accent-10 lg:bg-transparent",href:ST(e),children:[u.jsxs("div",{className:"space-y-4 pb-2 sm:col-span-5 sm:border-b sm:border-accent-10 sm:pb-8 lg:col-span-2 lg:border-b-0 lg:pb-0",children:[u.jsx(aw,{pair:e}),!1]}),u.jsxs("div",{className:"flex justify-between gap-4 border-b border-accent-10 pb-4 text-xs sm:flex-col sm:border-b-0 sm:pb-0 lg:text-right",children:[u.jsx("div",{className:"text-accent-50 lg:hidden",children:"Volume"}),u.jsx("div",{className:"lg:text-sm",children:u.jsx(Gt,{amount:e.volume,decimals:e.decimals,symbol:"$",showLogo:!1,showSymbol:!0,plain:!0})}),u.jsxs("div",{className:"hidden space-y-1 text-accent-50 sm:block",children:[u.jsx("div",{children:u.jsx(Gt,{amount:e.token0Volume,tokenAddress:e.token0,chainId:e.chainId,showLogo:!1,showSymbol:!0,plain:!1}
706)}),u.jsx("div",{children:u.jsx(Gt,{amount:e.token1Volume,tokenAddress:e.token1,chainId:e.chainId,showLogo:!1,showSymbol:!0,plain:!1})})]})]}),u.jsxs("div",{className:"flex justify-between gap-4 border-b border-accent-10 pb-4 text-xs sm:flex-col sm:border-b-0 sm:pb-0 lg:text-right",children:[u.jsx("div",{className:"text-accent-50 lg:hidden",children:"Fees"}),u.jsx("div",{className:"lg:text-sm",children:u.jsx(Gt,{amount:e.feesValue,decimals:e.decimals,symbol:"$",showLogo:!1,showSymbol:!0,plain:!0})}),u.jsxs("div",{className:"hidden space-y-1 text-accent-50 sm:block",children:[u.jsx("div",{children:u.jsx(Gt,{amount:e.token0_fees,tokenAddress:e.token0,chainId:e.chainId,showLogo:!1,showSymbol:!0,plain:!1})}),u.jsx("div",{children:u.jsx(Gt,{amount:e.token1_fees,tokenAddress:e.token1,chainId:e.chainId,showLogo:!1,showSymbol:!0,plain:!1})})]})]}),u.jsxs("div",{className:"flex justify-between gap-4 border-b border-accent-10 pb-4 text-xs sm:flex-col sm:border-b-0 sm:pb-0 lg:text-right",children:[u.jsx("div",{className:"text-accent-50 lg:hidden",children:"TVL"}),u.jsx("div",{className:"flex gap-2 lg:place-self-end lg:text-sm",children:u.jsx(Gt,{amount:e.tvl,showLogo:!1,showSymbol:!0,symbol:"$",plain:!0})}),u.jsxs("div",{className:"hidden space-y-1 text-accent-50 sm:block",children:[u.jsx("div",{"data-testid":`pool-balance-${e.token0.toLowerCase()}`,children:u.jsx(Gt,{amount:e.reserve0,tokenAddress:e.token0,chainId:e.chainId,showLogo:!1,showSymbol:!0,plain:!1})}),u.jsx("div",{"data-testid":`pool-balance-${e.token1.toLowerCase()}`,children:u.jsx(Gt,{amount:e.reserve1,chainId:e.chainId,tokenAddress:e.token1,showLogo:!1,showSymbol:!0,plain:!1})})]})]}),u.jsxs("div",{className:"flex items-start gap-4 border-b border-accent-10 pb-4 text-xs sm:flex-col sm:items-end sm:border-b-0 sm:pb-0 lg:justify-between",children:[u.jsx("div",{className:"text-accent-50 lg:hidden",children:"Fee APR"}),u.jsx("div",{className:"flex grow flex-col items-end justify-between gap-4",children:e.feeApr===0n?u.jsx("div",{className:"pb-1 text-accent-50 lg:text-sm",children:"N/A"}):u.jsx("div",{className:"lg:text-sm",children:u.jsx(Gt,{amount:e.feeApr,symbol:"%",showLogo:!1,showSymbol:!0})})})]}),u.jsxs("div",{className:"flex items-start gap-4 text-xs sm:flex-col sm:items-end lg:justify-between",children:[u.jsx("div",{className:"text-accent-50 lg:hidden",children:"Emission APR"}),u.jsxs("div",{className:"flex grow flex-col items-end justify-between gap-4",children:[e.apr===0n?u.jsx("div",{className:"text-accent-50 lg:text-sm",children:"N/A"}):u.jsx("div",{className:"lg:text-sm",children:u.jsx(Gt,{amount:e.apr,symbol:"%",showLogo:!1,showSymbol:!0})}),u.jsxs("div",{className:"flex items-center gap-1 rounded-lg bg-primary/10 px-2 py-1.5 text-xs text-primary hover:opacity-80 group-hover:bg-primary/10 lg:-mr-2 lg:-mt-1.5 lg:inline-flex lg:bg-transparent",children:[u.jsx(zre,{className:"size-4",strokeWidth:1.5}),"New deposit"]})]})]})]})}function d1e({sortBy:e,sort:t,setSort:n,className:r,children:i}){const[s,o]=t.split(":"),a=o==="desc",c=s===e,d=()=>{n(s===e?`${e}:${a?"asc":"desc"}`:`${e}:${o}`)};return u.jsxs("button",{type:"button",className:It(c&&"text-foreground",r),onClick:d,children:[i,c&&(a?u.jsx(a6,{className:"size-3",strokeWidth:2}):u.jsx(qS,{className:"size-3",strokeWidth:2}))]})}const f1e=[{sortBy:"volume",label:"Volume",tooltip:"Estimated volume based on pool fees."},{sortBy:"feesValue",label:"Fees",tooltip:"Trading fees for the upcoming voting epoch."},{sortBy:"tvl",label:"TVL",tooltip:"Total Value Locked (TVL) in the pool."},{sortBy:"feeApr",label:"Fee APR",tooltip:"Annual Percentage Rate (APR) based on fees."},{sortBy:"apr",label:"Emission APR",tooltip:"Annual Percentage Rate (APR) based on emissions."}];function h1e({setSort:e,sort:t}){return u.jsxs("div",{className:"sticky top-0 z-10 hidden grid-cols-7 gap-8 rounded-t-2xl border-b border-accent-10 bg-accent-0 px-8 py-3.5 text-xs text-accent-50 lg:grid",children:[u.jsx("div",{className:"col-span-2",children:"Pools"}),f1e.map(n=>u.jsx(d1e,{sortBy:n.sortBy,sort:t,setSort:e,className:"flex cursor-pointer items-center justify-end gap-1 hover:opacity-80",children:n.tooltip?u.jsx(jr,{content:u.jsx("span",{className:"normal-case",children:n.tooltip}),children:n.label}):n.label},n.sortBy))]})}function p1e(){const{data:e}=ys(),n=C3()==="/liquidity/stocks",[r,i]=xd(),[s,o]=A.useState(r.get("filters")?.includes("unknown")||!1),{data:{all:a}={all:[]},error:c}=Yg(e,{allPools:s});A.useEffect(()=>{c&&toast.error(c)},[c]);const d=A.useMemo(()=>n?a.filter(C$):a,[a,n]),[h,y]=A.useState([]),[g,x]=A.useState([]),_=A.useRef(null),S=parseInt(r.get("limit")||"25"),I=parseInt(r.get("page")||"1"),L=r.get("sort")||"tvl:desc",D=Math.ceil(h.length/S),F=Math.max(1,Math.min(D,I)),$=Object.fromEntries(r.entries()),[z,V]=A.useState([]),K=A.useMemo(()=>z.includes("unknown"),[z]),te=A.useMemo(()=>en.orderBy(h,...L.split(":")),[h,L]),Q=A.useMemo(()=>te.slice((F-1)*S,F*S),[te,F,S]),ee=()=>{_.current?.scrollIntoView({behavior:"smooth"})},ne=M=>{i({...$,page:M.toString()}),ee()},J=M=>{i({...$,sort:M}),ee()};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{ref:_,className:"overflow-hidden rounded-2xl bg-accent-0",children:[u.jsx(u1e,{data:d,onFound:x,tabs:[{label:"Pools",href:"/liquidity"},...kJ?[{label:"Stocks",href:"/liquidity/stocks",isNew:!0}]:[],{label:"Tokens",href:"/tokenlist"}]}),u.jsx(n1e,{pools:g,setFiltered:y,fallbackFilter:n?"default":"verified",sort:L,setSort:J,onFiltersChange:M=>{M.includes("unknown")&&o(!0),V(M)},filterOptions:[{title:"Token",component:M=>u.jsx(fM,{...M,allowBlank:!1,blankLabel:"All",icons:{verified:u.jsx("img",{className:"size-3.5",src:"/svg/alltokens.svg"}),listed:u.jsx("img",{className:"size-3.5",src:`/svg/${oo}/listed.svg`}),emerging:u.jsx("img",{className:"size-3.5",src:"/svg/emerging.svg"}),unknown:u.jsx(jv,{className:"size-3.5 text-amber-500"})}}),options:["verified","listed","emerging","unknown"],discriminated:!0},{title:"Type",component:fM,options:["basicStable","basicVolatile","concentrated"],discriminated:!0},{title:"Autopilot",component:hM,options:["alm"],extraContent:u.jsx(s1e,{})},{title:"Advanced",component:hM,options:["incentivized"]}],sortOptions:["volume","feesValue","tvl","feeApr","apr"]})]}
706),!a?.length||!e?.sorted.length?u.jsx(Xl,{message:"Loading onchain data..."}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"isolate rounded-2xl lg:bg-accent-0",children:[Q.length>0&&u.jsx(h1e,{setSort:J,sort:L}),u.jsx("div",{"data-testid":"liquidity-pools-container",className:"space-y-3 lg:space-y-0",children:Q.map(M=>u.jsx(l1e,{pool:M},M.address+"-"+M.chainId))})]}),!Q.length&&u.jsx("div",{className:"-mt-3 rounded-2xl bg-accent-0",children:u.jsx(WD,{icon:u.jsx(Lx,{}),title:"No results found",description:K?"There are no pools matching your criteria. Refine your filters or reset them all and try again.":"There might also be some unknown pools that match your filters.",children:u.jsx(wn,{color:"secondary",onClick:()=>{K?i({filters:""}):(i({filters:"unknown"},{preserveParams:!0}),o(!0))},children:K?"Reset filters":"Search unknown pools"})})}),!!Q.length&&u.jsxs("div",{className:"mt-5 flex items-center justify-center sm:justify-between",children:[u.jsxs("div",{"data-testid":"pools-count-text","data-test-amount":te.length,className:"hidden text-xs text-accent-50 sm:flex",children:["Showing ",Q.length," out of ",te.length," ","pools"]}),u.jsx(o1e,{currentPage:F,onPageChange:ne,totalPages:D})]})]})]})}const m1e=A.memo(p1e);function y1e(){return u.jsxs("div",{className:"mx-auto flex max-w-screen-xl flex-col gap-3",children:[u.jsxs("div",{className:"flex flex-col-reverse gap-3 md:flex-row",children:[u.jsx(i1e,{}),u.jsx(Gge,{})]}),u.jsx(m1e,{})]})}const R$=A.createContext(void 0);function g1e({children:e,placeholder:t}){const[n]=xd(),r=n.get("position")||"0",i=String(n.get("pool")).toLowerCase(),s=Number(n.get("chain0")??n.get("chain")??Pt.id),[,o]=Jf(),{address:a}=Rr(),{data:c}=ys(),{data:d,error:h}=Yg(c),{data:y=[],error:g,refetch:x,isLoading:_}=ED(a,d,c),S=A.useRef(),I=A.useMemo(()=>{if(_||en.isEmpty(d))return S.current;const $=y.filter(V=>V.pool.superchainKey===`${s}:${i}`),z=$.find(V=>String(V.id)===r)||$[$.length-1];return z&&(S.current=z),z??S.current},[y,_,d,s,i,r]),L=Ox.basic(I?.pool.type??-1),D=I?.pool.gauge!=Pn,F=!!I&&sh(I);return A.useEffect(()=>{!_&&!en.isEmpty(d)&&!I&&o("/dash")},[_,d,I,o]),A.useEffect(()=>{(h||g)&&toast.error(h||g)},[h,g]),u.jsx(R$.Provider,{value:{position:I,positions:y,isBasicPool:L,refetch:x,hasGauge:D,isAlm:F},children:I?e:t})}function M$(){const e=A.useContext(R$);if(!e)throw new Error("usePositionContext must be used within a PositionProvider");return e}function b1e({pool:e}){return u.jsxs("div",{className:"space-y-5",children:[u.jsxs("div",{className:"space-y-4",children:[u.jsx(aw,{pair:e}),!1]}),u.jsxs("div",{className:"divide-y divide-accent-10 text-xs",children:[u.jsxs("div",{className:"flex justify-between py-3",children:[u.jsx("div",{className:"font-semibold",children:"APR"}),u.jsx(Gt,{amount:e.apr,decimals:e.decimals,symbol:"%",showLogo:!1,showSymbol:!0,plain:!0})]}),u.jsxs("div",{className:"flex justify-between py-3",children:[u.jsx("div",{className:"font-semibold",children:"TVL"}),u.jsx(Gt,{amount:e.tvl,decimals:e.decimals,showLogo:!1,showSymbol:!0,symbol:"$",plain:!0})]}),u.jsxs("div",{className:"flex justify-between py-3",children:[u.jsx("div",{className:"font-semibold",children:"Volume"}),u.jsx(Gt,{amount:e.volume,decimals:e.decimals,symbol:"$",showLogo:!1,showSymbol:!0,plain:!0})]}),u.jsxs("div",{className:"flex justify-between py-3",children:[u.jsx("div",{className:"font-semibold",children:"Fees"}),u.jsx(Gt,{amount:e.feesValue,decimals:e.decimals,symbol:"$",showLogo:!1,showSymbol:!0,plain:!0})]}),u.jsxs("div",{className:"flex justify-between py-3",children:[u.jsx("div",{className:"font-semibold",children:"Trading fee"}),u.jsx(Gt,{amount:e.poolFee,symbol:"%",showLogo:!1,showSymbol:!0,plain:!0})]})]})]})}function x1e({pool:e,title:t,help:n,changeUrl:r}){const i=A.useRef(null),[s,o]=A.useState(!1),{isSm:a}=M3();return E$({ref:i,offset:-48}),u.jsxs("div",{ref:i,className:"space-y-5 rounded-2xl bg-accent-0 p-5 sm:space-y-8 sm:p-8",children:[u.jsxs("h2",{className:"flex items-center gap-2 border-b border-accent-10 pb-3 text-lg font-semibold sm:pb-5 sm:text-xl",children:[t,n&&u.jsx(ow,{content:n,children:u.jsx("span",{className:"flex cursor-pointer items-center text-accent-50 hover:opacity-80",children:u.jsx(S3,{className:"size-5",strokeWidth:1.5})})})]}),u.jsxs("div",{className:"flex flex-col items-start gap-5 sm:flex-row sm:justify-between",children:[u.jsxs("div",{className:"space-y-4",children:[u.jsx(aw,{pair:e}),!1]}),u.jsxs("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto",children:["address"in e&&u.jsx(wn,{color:"secondary",size:a?"md":"sm",className:"flex-1 sm:flex-none",pill:!0,onClick:()=>o(!0),children:"Pool info"}),r&&u.jsx(qn,{href:r,color:"secondary",size:a?"md":"sm",className:"flex-1 sm:flex-none","data-testid":"change-pool-button",useButton:!0,pill:!0,children:"Change"})]}),"address"in e&&s&&u.jsx(mh,{isOpen:s,onClose:()=>o(!1),className:"max-w-sm",title:"Pool info",children:u.jsx(b1e,{pool:e})})]})]})}function v1e({position:e,contract:t,onSuccess:n,onEdit:r}){const{id:i,chainId:s,pool:{nfpm:o}}=e,[a,c]=A.useState(!1),[d,h]=A.useState(),[,y]=Jf(),{data:g}=Xp({chainId:s,address:o,abi:ox,functionName:"getApproved",args:[i]},{enabled:t!=Pn}),x=String(g).toLowerCase()==String(t).toLowerCase();return A.useEffect(()=>{x&&n()},[x]),u.jsxs("div",{className:"space-y-4",children:[u.jsx(m0,{title:"Confirm access to deposit",loading:a,error:d}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r&&u.jsx(wn,{size:"lg",color:"secondary",onClick:r,disabled:a,children:"Edit amount"}),!r&&u.jsx(wn,{size:"lg",color:"secondary",onClick:()=>y("/dash"),disabled:a,children:"Cancel"}),u.jsx(Fr,{write:{chainId:s,address:o,abi:ox,functionName:"approve",args:[t,i],query:{enabled:!x}},onPendingStateChange:c,onError:h,onSuccess:n,autoExecute:!0,children:"Allow"})]})]})}function pM({title:e,onEdit:t,children:n}){return u.jsxs("div",{className:"flex items-center justify-between rounded-2xl bg-accent-0 px-5 py-4 outline outline-1 outline-accent-10",children:[u.jsxs("div",{className:"flex items-center gap-3 text-sm font-semibold",children:[u.jsx("div",{className:"rounded-full bg-primary p-1.5 text-white",children:u.jsx(u0,{className:"size-3",strokeWidth:2})}),e]}),u.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[u.jsx("div",{className:"hidden sm:block",children:n}),t&&u.jsx(wn,{size:"sm",pill:!0,color:"secondary",onClick:t,children:"Edit"})]})]})}function w1e({slippage:e,setSlippage:t,auto:n}){const[r,i]=A.useState(!1),[s,o]=A.useState(e);return A.useEffect(()=>{r||t(s)},[s,r]),u.jsxs(u.Fragment,{children:[u.jsxs("button",{className:"-mx-2 -my-1 flex items-center gap-1 rounded-lg px-2 py-1 text-xs text-primary transition hover:bg-primary/10",onClick:()=>i(!0),children:[n&&e==="100"?"Auto":`Slippage ${e}%`,u.jsx(Ju,{className:"-mr-0.5 h-3 w-3",strokeWidth:1.5})]}),u.jsx(mh,{isOpen:r,onClose:()=>i(!1),className:"max-w-sm",title:"Slippage tolerance",children:u.jsx(w$,{auto:n,slippage:s,setSlippage:o,showHelp:!0})})]})}function E1e({position:e,lpAmount:t,setTx:n,refetch:r,onError:i,onPendingStateChange:s,className:o,autoExecute:a=!0}){const c=e.pool,d=Number(c.type)>0,h=()=>e.unlocks_at?{chainId:e.chainId,address:e.locker,abi:h3,functionName:"unstake"}:{...{chainId:c.chainId,address:c.gauge,abi:Cn(["function withdraw(uint amount) public"]),functionName:"withdraw",args:[d?e.id:t]},query:{enabled:t!==0n}};return u.jsx(Fr,{className:o,write:h(),successMessage:u.jsxs(u.Fragment,{children:[u.jsx("strong",{children:c.symbol})," unstaked"]}),onSuccess:y=>{n?.(y),r()},onError:i,onPendingStateChange:s,autoExecute:a,children:"Unstake"})}function _1e({position:e,pool:t,tokens:n,setTx:r,slippage:i,className:s=""}){const[o]=yh("router-deadline",{defaultValue:Mg.toString()}),a=n?.all[`${e.chainId}:${e.pool.token0.toLowerCase()}`],c=n?.all[`${e.chainId}:${e.pool.token1.toLowerCase()}`],d=Zf(e.amount0,a.decimals,i),h=Zf(e.amount1,c.decimals,i),{address:y}=Fo(),{chain:g}=Zn(e.chainId),x=BigInt(Math.round(Date.now()/1e3)+60*Number(o))/60n*60n;return u.jsx(Fr,{className:s,write:{chainId:e.chainId,address:g.superchainConfig.migrator,abi:gJ,functionName:"migrateSlipstreamToSlipstream",args:[{nft:e.pool.nfpm,tokenId:e.id,amount0Min:d,amount1Min:h,amount0Extra:0n,amount1Extra:0n},{nft:g.superchainConfig.nfpm,tickSpacing:e.pool.type,tickLower:e.tick_lower,tickUpper:e.tick_upper,amount0Min:d,amount1Min:h,recipient:y,deadline:x,pool:t?.address||Pn}],query:{enabled:!!y&&e.staked===0n&&!!g.superchainConfig.migrator}},onSuccess:r,successMessage:u.jsxs(u.Fragment,{children:[u.jsxs("strong",{children:["Deposit #",String(e.id)]})," migrated"]}),children:"Migrate"})}function S1e({pool:e,tokens:t}){const{position:n,positions:r,refetch:i}=M$(),s=A.useRef(n.staked>0n).current,[o,a]=A.useState(!1),[c,d]=A.useState(!1),[h,y]=A.useState("0.5"),{chain:g}=Zn(n.chainId),x=r.filter(S=>S.pool.superchainKey===e.superchainKey).sort((S,I)=>Number(I.id)-Number(S.id))[0],_=A.useMemo(()=>
706c?"stake-new-pos":n.staked>0n?"unstake":o?"migrate":"allow-migrate",[n,c,o]);return u.jsxs("div",{className:"w-full rounded-2xl bg-accent-0 p-5 sm:space-y-8 sm:px-8 sm:py-6",children:[o&&u.jsx(pM,{title:"Approved position"}),c&&u.jsx(pM,{title:"Migrated position"}),_==="unstake"&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex flex-col items-center justify-center gap-6 pb-4 pt-8",children:[u.jsx("div",{className:"relative mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-primary text-white",children:u.jsx(Sy,{className:"size-5",strokeWidth:1.5})}),u.jsxs("h3",{className:"w-3/5 w-full text-balance text-center text-xl font-semibold",children:["Unstake your deposit",u.jsx("br",{})," before you migrate"]})]}),u.jsx(E1e,{onError:toast.error,position:n,lpAmount:n.staked,refetch:()=>{i()},className:"flex w-full",autoExecute:!1})]}),_==="allow-migrate"&&u.jsx(v1e,{position:n,contract:g.superchainConfig.migrator,onSuccess:()=>{a(!0)}}),_==="migrate"&&u.jsxs("div",{className:"flex flex-col gap-12",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("div",{className:"text-xs text-accent-50"}),u.jsx(w1e,{slippage:h,setSlippage:y})]}),u.jsxs("div",{className:"flex flex-col items-center justify-center gap-6",children:[u.jsx("div",{className:"relative mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-primary text-white",children:u.jsx(Sy,{className:"size-5",strokeWidth:1.5})}),u.jsxs("h3",{className:"w-3/5 w-full text-balance text-center text-xl font-semibold",children:["Deposit is",u.jsx("br",{})," ready to migrate"]})]}),u.jsx("div",{className:"flex w-full",children:u.jsx(_1e,{position:n,pool:e,setTx:()=>{d(!0),setTimeout(i,2e3)},tokens:t,slippage:h,className:"flex w-full"})})]}),_==="stake-new-pos"&&x&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex flex-col items-center justify-center gap-6 pb-4 pt-8",children:[u.jsx("div",{className:"relative mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-primary text-white",children:u.jsx(Sy,{className:"size-5",strokeWidth:1.5})}),u.jsxs("h3",{className:"w-3/5 w-full text-balance text-center text-xl font-semibold",children:["Stake your deposit"," ",s&&u.jsxs(u.Fragment,{children:["to",u.jsx("br",{})," complete the migration"]})]})]}),u.jsx(qn,{size:"lg",className:"flex w-full",href:`/stake?pool=${e.address}&chain=${e.chainId}&position=${x.id}`,useButton:!0,children:"Stake Your Deposit"})]})]})}function T1e({position:e,pool:t,tokens:n}){return u.jsxs("div",{className:"mx-auto w-full max-w-screen-sm space-y-2",children:[u.jsx(x1e,{pool:t,title:"Migrate deposit"}),u.jsx("div",{className:"rounded-2xl bg-accent-0 p-5 sm:space-y-8 sm:px-8 sm:py-6",children:u.jsx(OD,{position:e})}),u.jsxs("div",{className:"space-y-5 rounded-2xl bg-accent-0 p-5 sm:space-y-4 sm:p-8",children:[u.jsxs("div",{className:"text-sm text-white",children:[u.jsx("span",{className:"font-semibold",children:"Slipstream"})," (CL Pools) received a new release!"]}),u.jsx("div",{className:"pb-2 text-sm text-white/70",children:"Any pending fees will be migrated over to the corresponding new pools. To continue receiving emissions consider migrating your deposit to the new version."}),u.jsxs("div",{className:"flex items-center gap-2.5 border-t border-accent-10 pt-5",children:[u.jsx(dh,{size:16,strokeWidth:1,className:"text-amber-600"}),u.jsx("div",{className:"text-sm text-amber-600",children:"Before migrating, please claim any pending emissions and fees!"})]})]}),u.jsxs("div",{className:"w-full",children:[!sh(e)&&u.jsx(S1e,{pool:t,tokens:n}),sh(e)&&u.jsxs("div",{className:"rounded-2xl bg-accent-0 p-5 sm:space-y-8 sm:px-8 sm:py-6",children:[u.jsxs("div",{className:"flex flex-col items-center justify-center gap-6 pb-4 pt-8",children:[u.jsx("div",{className:"relative mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-primary text-white",children:u.jsx(Sy,{className:"size-5",strokeWidth:1.5})}),u.jsxs("h3",{className:"w-3/5 w-full text-balance text-center text-xl font-semibold",children:["Withdraw from",u.jsx("br",{})," Autopilot to migrate"]})]}),u.jsx(qn,{size:"lg",className:"flex w-full",href:`/withdraw?pool=${t.address}&chain=${t.chainId}&position=${e.id}`,useButton:!0,children:"Withdraw"})]})]})]})}function A1e(){const{position:e}=M$(),[t,n]=A.useState(),{address:r}=Fo(),{data:i}=ys(r),{data:s,error:o}=Yg(i);return A.useEffect(()=>{if(!e||!s)return;const a=SL(s[e.chainId],e.pool.token0,e.pool.token1,e.pool.type,Zu(e.chainId).chain.superchainConfig.slipstreamFactory,e.chainId);n(a)},[e]),A.useEffect(()=>{o&&toast.error(o)}
vendor: 2,106 bytes, line 706
706,[o]),u.jsx("div",{className:"mx-auto w-full max-w-screen-sm space-y-2",children:!i||!t?u.jsx(Xl,{message:"Loading onchain data..."}):u.jsx("div",{className:"mx-auto w-full max-w-screen-sm space-y-2",children:u.jsx(T1e,{pool:t,position:e,tokens:i})})})}function k1e(){return u.jsx(g1e,{placeholder:u.jsx(Xl,{message:"Loading onchain data..."}),children:u.jsx(A1e,{})})}var Jn;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},e.getValidEnumValues=i=>{const s=e.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},e.find=(i,s)=>{for(const o of i)if(s(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Jn||(Jn={}));var mM;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(mM||(mM={}));const jt=Jn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_f=e=>{switch(typeof e){case"undefined":return jt.undefined;case"string":return jt.string;case"number":return Number.isNaN(e)?jt.nan:jt.number;case"boolean":return jt.boolean;case"function":return jt.function;case"bigint":return jt.bigint;case"symbol":return jt.symbol;case"object":return Array.isArray(e)?jt.array:e===null?jt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?jt.promise:typeof Map<"u"&&e instanceof Map?jt.map:typeof Set<"u"&&e instanceof Set?jt.set:typeof Date<"u"&&e instanceof Date?jt.date:jt.object;default:return jt.unknown}}
vendor: 14,740 bytes, line 706
706,rt=Jn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class cd extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},r={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,c=0;for(;c<o.path.length;){const d=o.path[c];c===o.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(n(o))):a[d]=a[d]||{_errors:[]},a=a[d],c++}}};return i(this),r}static assert(t){if(!(t instanceof cd))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Jn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const s=i.path[0];n[s]=n[s]||[],n[s].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}cd.create=e=>new cd(e);const CT=(e,t)=>{let n;switch(e.code){case rt.invalid_type:e.received===jt.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case rt.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Jn.jsonStringifyReplacer)}`;break;case rt.unrecognized_keys:n=`Unrecognized key(s) in object: ${Jn.joinValues(e.keys,", ")}`;break;case rt.invalid_union:n="Invalid input";break;case rt.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Jn.joinValues(e.options)}`;break;case rt.invalid_enum_value:n=`Invalid enum value. Expected ${Jn.joinValues(e.options)}, received '${e.received}'`;break;case rt.invalid_arguments:n="Invalid function arguments";break;case rt.invalid_return_type:n="Invalid function return type";break;case rt.invalid_date:n="Invalid date";break;case rt.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Jn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case rt.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case rt.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case rt.custom:n="Invalid input";break;case rt.invalid_intersection_types:n="Intersection results could not be merged";break;case rt.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case rt.not_finite:n="Number must be finite";break;default:n=t.defaultError,Jn.assertNever(e)}return{message:n}};let C1e=CT;function I1e(){return C1e}const R1e=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,s=[...n,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="";const c=r.filter(d=>!!d).slice().reverse();for(const d of c)a=d(o,{data:t,defaultError:a}).message;return{...i,path:s,message:a}};function vt(e,t){const n=I1e(),r=R1e({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===CT?void 0:CT].filter(i=>!!i)});e.common.issues.push(r)}class xa{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return yn;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const s=await i.key,o=await i.value;r.push({key:s,value:o})}return xa.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return yn;s.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[s.value]=o.value)}return{status:t.value,value:r}}}const yn=Object.freeze({status:"aborted"}),rx=e=>({status:"dirty",value:e}),uc=e=>({status:"valid",value:e}),yM=e=>e.status==="aborted",gM=e=>e.status==="dirty",gg=e=>e.status==="valid",I6=e=>typeof Promise<"u"&&e instanceof Promise;var Bt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Bt||(Bt={}));class ah{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const bM=(e,t)=>{if(gg(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new cd(e.common.issues);return this._error=n,this._error}}};function jn(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,a)=>{const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??r??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??n??a.defaultError}},description:i}}class Xn{get description(){return this._def.description}_getType(t){return _f(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:_f(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new xa,ctx:{common:t.parent.common,data:t.data,parsedType:_f(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(I6(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_f(t)},i=this._parseSync({data:t,path:r.path,parent:r});return bM(r,i)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_f(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return gg(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>gg(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_f(t)},i=this._parse({data:t,path:r.path,parent:r}),s=await(I6(i)?i:Promise.resolve(i));return bM(r,s)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const o=t(i),a=()=>s.addIssue({code:rt.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new r0({schema:this,typeName:xn.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Jl.create(this,this._def)}nullable(){return i0.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Vu.create(this)}promise(){return P6.create(this,this._def)}or(t){return M6.create([this,t],this._def)}and(t){return N6.create(this,t,this._def)}transform(t){return new r0({...jn(this._def),schema:this,typeName:xn.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new O6({...jn(this._def),innerType:this,defaultValue:n,typeName:xn.ZodDefault})}brand(){return new O$({typeName:xn.ZodBranded,type:this,...jn(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new L6({...jn(this._def),innerType:this,catchValue:n,typeName:xn.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return kk.create(this,t)}readonly(){return B6.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const M1e=/^c[^\s-]{8,}$/i,N1e=/^[0-9a-z]+$/,j1e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,P1e=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,O1e=/^[a-z0-9_-]{21}$/i,L1e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,B1e=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,F1e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,D1e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let f_;const $1e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,U1e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,z1e=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,V1e=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,q1e=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,H1e=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,N$="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",W1e=new RegExp(`^${N$}$`);function j$(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function G1e(e){return new RegExp(`^${j$(e)}$`)}function K1e(e){let t=`${N$}
706T${j$(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Y1e(e,t){return!!((t==="v4"||!t)&&$1e.test(e)||(t==="v6"||!t)&&z1e.test(e))}function Z1e(e,t){if(!L1e.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function X1e(e,t){return!!((t==="v4"||!t)&&U1e.test(e)||(t==="v6"||!t)&&V1e.test(e))}class zf extends Xn{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==jt.string){const s=this._getOrReturnCtx(t);return vt(s,{code:rt.invalid_type,expected:jt.string,received:s.parsedType}),yn}const r=new xa;let i;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(i=this._getOrReturnCtx(t,i),vt(i,{code:rt.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(i=this._getOrReturnCtx(t,i),vt(i,{code:rt.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const o=t.data.length>s.value,a=t.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(t,i),o?vt(i,{code:rt.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&vt(i,{code:rt.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")F1e.test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"email",code:rt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")f_||(f_=new RegExp(D1e,"u")),f_.test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"emoji",code:rt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")P1e.test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"uuid",code:rt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")O1e.test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"nanoid",code:rt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")M1e.test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"cuid",code:rt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")N1e.test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"cuid2",code:rt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")j1e.test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"ulid",code:rt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),vt(i,{validation:"url",code:rt.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"regex",code:rt.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(t,i),vt(i,{code:rt.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(i=this._getOrReturnCtx(t,i),vt(i,{code:rt.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(i=this._getOrReturnCtx(t,i),vt(i,{code:rt.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?K1e(s).test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{code:rt.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?W1e.test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{code:rt.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?G1e(s).test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{code:rt.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?B1e.test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"duration",code:rt.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Y1e(t.data,s.version)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"ip",code:rt.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?Z1e(t.data,s.alg)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"jwt",code:rt.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?X1e(t.data,s.version)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"cidr",code:rt.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?q1e.test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"base64",code:rt.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?H1e.test(t.data)||(i=this._getOrReturnCtx(t,i),vt(i,{validation:"base64url",code:rt.invalid_string,message:s.message}),r.dirty()):Jn.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:rt.invalid_string,...Bt.errToObj(r)})}_addCheck(t){return new zf({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Bt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Bt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Bt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Bt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Bt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Bt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Bt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Bt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Bt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Bt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Bt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Bt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Bt.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Bt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Bt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Bt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Bt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Bt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Bt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Bt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Bt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Bt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Bt.errToObj(n)})}nonempty(t){return this.min(1,Bt.errToObj(t))}trim(){return new zf({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new zf({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new zf({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 15,137 bytes, line 706
706get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}zf.create=e=>new zf({checks:[],typeName:xn.ZodString,coerce:e?.coerce??!1,...jn(e)});function Q1e(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,s=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return s%o/10**i}class bg extends Xn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==jt.number){const s=this._getOrReturnCtx(t);return vt(s,{code:rt.invalid_type,expected:jt.number,received:s.parsedType}),yn}let r;const i=new xa;for(const s of this._def.checks)s.kind==="int"?Jn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),vt(r,{code:rt.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),vt(r,{code:rt.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),vt(r,{code:rt.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Q1e(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),vt(r,{code:rt.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),vt(r,{code:rt.not_finite,message:s.message}),i.dirty()):Jn.assertNever(s);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Bt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Bt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Bt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Bt.toString(n))}setLimit(t,n,r,i){return new bg({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Bt.toString(i)}]})}_addCheck(t){return new bg({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Bt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Bt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Bt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Bt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Bt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Bt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Bt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Bt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Bt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Jn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}bg.create=e=>new bg({checks:[],typeName:xn.ZodNumber,coerce:e?.coerce||!1,...jn(e)});class Yx extends Xn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==jt.bigint)return this._getInvalidInput(t);let r;const i=new xa;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),vt(r,{code:rt.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),vt(r,{code:rt.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),vt(r,{code:rt.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Jn.assertNever(s);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return vt(n,{code:rt.invalid_type,expected:jt.bigint,received:n.parsedType}),yn}gte(t,n){return this.setLimit("min",t,!0,Bt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Bt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Bt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Bt.toString(n))}setLimit(t,n,r,i){return new Yx({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Bt.toString(i)}]})}_addCheck(t){return new Yx({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Bt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Bt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Bt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Bt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Bt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Yx.create=e=>new Yx({checks:[],typeName:xn.ZodBigInt,coerce:e?.coerce??!1,...jn(e)});class IT extends Xn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==jt.boolean){const r=this._getOrReturnCtx(t);return vt(r,{code:rt.invalid_type,expected:jt.boolean,received:r.parsedType}),yn}return uc(t.data)}}IT.create=e=>new IT({typeName:xn.ZodBoolean,coerce:e?.coerce||!1,...jn(e)});class R6 extends Xn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==jt.date){const s=this._getOrReturnCtx(t);return vt(s,{code:rt.invalid_type,expected:jt.date,received:s.parsedType}),yn}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return vt(s,{code:rt.invalid_date}),yn}const r=new xa;let i;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(i=this._getOrReturnCtx(t,i),vt(i,{code:rt.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(i=this._getOrReturnCtx(t,i),vt(i,{code:rt.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Jn.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new R6({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Bt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Bt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}R6.create=e=>new R6({checks:[],coerce:e?.coerce||!1,typeName:xn.ZodDate,...jn(e)});class xM extends Xn{_parse(t){if(this._getType(t)!==jt.symbol){const r=this._getOrReturnCtx(t);return vt(r,{code:rt.invalid_type,expected:jt.symbol,received:r.parsedType}),yn}return uc(t.data)}}xM.create=e=>new xM({typeName:xn.ZodSymbol,...jn(e)});class RT extends Xn{_parse(t){if(this._getType(t)!==jt.undefined){const r=this._getOrReturnCtx(t);return vt(r,{code:rt.invalid_type,expected:jt.undefined,received:r.parsedType}),yn}return uc(t.data)}}RT.create=e=>new RT({typeName:xn.ZodUndefined,...jn(e)});class MT extends Xn{_parse(t){if(this._getType(t)!==jt.null){const r=this._getOrReturnCtx(t);return vt(r,{code:rt.invalid_type,expected:jt.null,received:r.parsedType}),yn}return uc(t.data)}}MT.create=e=>new MT({typeName:xn.ZodNull,...jn(e)});class vM extends Xn{constructor(){super(...arguments),this._any=!0}_parse(t){return uc(t.data)}}vM.create=e=>new vM({typeName:xn.ZodAny,...jn(e)});class wM extends Xn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return uc(t.data)}}wM.create=e=>new wM({typeName:xn.ZodUnknown,...jn(e)});class ch extends Xn{_parse(t){const n=this._getOrReturnCtx(t);return vt(n,{code:rt.invalid_type,expected:jt.never,received:n.parsedType}),yn}}ch.create=e=>new ch({typeName:xn.ZodNever,...jn(e)});class EM extends Xn{_parse(t){if(this._getType(t)!==jt.undefined){const r=this._getOrReturnCtx(t);return vt(r,{code:rt.invalid_type,expected:jt.void,received:r.parsedType}),yn}return uc(t.data)}}EM.create=e=>new EM({typeName:xn.ZodVoid,...jn(e)});class Vu extends Xn{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==jt.array)return vt(n,{code:rt.invalid_type,expected:jt.array,received:n.parsedType}),yn;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(o||a)&&(vt(n,{code:o?rt.too_big:rt.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(vt(n,{code:rt.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(vt(n,{code:rt.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>i.type._parseAsync(new ah(n,o,n.path,a)))).then(o=>xa.mergeArray(r,o));const s=[...n.data].map((o,a)=>i.type._parseSync(new ah(n,o,n.path,a)));return xa.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Vu({...this._def,minLength:{value:t,message:Bt.toString(n)}})}max(t,n){return new Vu({...this._def,maxLength:{value:t,message:Bt.toString(n)}})}length(t,n){return new Vu({...this._def,exactLength:{value:t,message:Bt.toString(n)}})}nonempty(t){return this.min(1,t)}}Vu.create=(e,t)=>new Vu({type:e,minLength:null,maxLength:null,exactLength:null,typeName:xn.ZodArray,...jn(t)});function ay(e){if(e instanceof ki){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Jl.create(ay(r))}return new ki({...e._def,shape:()=>t})}else return e instanceof Vu?new Vu({...e._def,type:ay(e.element)}):e instanceof Jl?Jl.create(ay(e.unwrap())):e instanceof i0?i0.create(ay(e.unwrap())):e instanceof t0?t0.create(e.items.map(t=>ay(t))):e}class ki extends Xn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Jn.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==jt.object){const d=this._getOrReturnCtx(t);return vt(d,{code:rt.invalid_type,expected:jt.object,received:d.parsedType}),yn}const{status:r,ctx:i}=this._processInputParams(t),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof ch&&this._def.unknownKeys==="strip"))for(const d in i.data)o.includes(d)||a.push(d);const c=[];for(const d of o){const h=s[d],y=i.data[d];c.push({key:{status:"valid",value:d},value:h._parse(new ah(i,y,i.path,d)),alwaysSet:d in i.data})}if(this._def.catchall instanceof ch){const d=this._def.unknownKeys;if(d==="passthrough")for(const h of a)c.push({key:{status:"valid",value:h},value:{status:"valid",value:i.data[h]}});else if(d==="strict")a.length>0&&(vt(i,{code:rt.unrecognized_keys,keys:a}),r.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const h of a){const y=i.data[h];c.push({key:{status:"valid",value:h},value:d._parse(new ah(i,y,i.path,h)),alwaysSet:h in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const d=[];for(const h of c){const y=await h.key,g=await h.value;d.push({key:y,value:g,alwaysSet:h.alwaysSet})}return d}).then(d=>xa.mergeObjectSync(r,d)):xa.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Bt.errToObj,new ki({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const i=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Bt.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new ki({...this._def,unknownKeys:"strip"})}passthrough(){return new ki({...this._def,unknownKeys:"passthrough"})}extend(t){return new ki({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ki({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:xn.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ki({...this._def,catchall:t})}pick(t){const n={};for(const r of Jn.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new ki({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Jn.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new ki({...this._def,shape:()=>n})}deepPartial(){return ay(this)}partial(t){const n={};for(const r of Jn.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new ki({...this._def,shape:()=>n})}required(t){const n={};for(const r of Jn.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Jl;)s=s._def.innerType;n[r]=s}return new ki({...this._def,shape:()=>n})}keyof(){return P$(Jn.objectKeys(this.shape))}}ki.create=(e,t)=>
vendor: 4,305 bytes, line 706
706new ki({shape:()=>e,unknownKeys:"strip",catchall:ch.create(),typeName:xn.ZodObject,...jn(t)});ki.strictCreate=(e,t)=>new ki({shape:()=>e,unknownKeys:"strict",catchall:ch.create(),typeName:xn.ZodObject,...jn(t)});ki.lazycreate=(e,t)=>new ki({shape:e,unknownKeys:"strip",catchall:ch.create(),typeName:xn.ZodObject,...jn(t)});class M6 extends Xn{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new cd(a.ctx.common.issues));return vt(n,{code:rt.invalid_union,unionErrors:o}),yn}if(n.common.async)return Promise.all(r.map(async s=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const c of r){const d={...n,common:{...n.common,issues:[]},parent:null},h=c._parseSync({data:n.data,path:n.path,parent:d});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:d}),d.common.issues.length&&o.push(d.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(c=>new cd(c));return vt(n,{code:rt.invalid_union,unionErrors:a}),yn}}get options(){return this._def.options}}M6.create=(e,t)=>new M6({options:e,typeName:xn.ZodUnion,...jn(t)});const Ol=e=>e instanceof jT?Ol(e.schema):e instanceof r0?Ol(e.innerType()):e instanceof j6?[e.value]:e instanceof n0?e.options:e instanceof PT?Jn.objectValues(e.enum):e instanceof O6?Ol(e._def.innerType):e instanceof RT?[void 0]:e instanceof MT?[null]:e instanceof Jl?[void 0,...Ol(e.unwrap())]:e instanceof i0?[null,...Ol(e.unwrap())]:e instanceof O$||e instanceof B6?Ol(e.unwrap()):e instanceof L6?Ol(e._def.innerType):[];class Ak extends Xn{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==jt.object)return vt(n,{code:rt.invalid_type,expected:jt.object,received:n.parsedType}),yn;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(vt(n,{code:rt.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),yn)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const s of n){const o=Ol(s.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(i.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);i.set(a,s)}}return new Ak({typeName:xn.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...jn(r)})}}function NT(e,t){const n=_f(e),r=_f(t);if(e===t)return{valid:!0,data:e};if(n===jt.object&&r===jt.object){const i=Jn.objectKeys(t),s=Jn.objectKeys(e).filter(a=>i.indexOf(a)!==-1),o={...e,...t};for(const a of s){const c=NT(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(n===jt.array&&r===jt.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let s=0;s<e.length;s++){const o=e[s],a=t[s],c=NT(o,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===jt.date&&r===jt.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class N6 extends Xn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(s,o)=>{if(yM(s)||yM(o))return yn;const a=NT(s.value,o.value);return a.valid?((gM(s)||gM(o))&&n.dirty(),{status:n.value,value:a.data}):(vt(r,{code:rt.invalid_intersection_types}),yn)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}N6.create=(e,t,n)=>new N6({left:e,right:t,typeName:xn.ZodIntersection,...jn(n)});class t0 extends Xn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==jt.array)return vt(r,{code:rt.invalid_type,expected:jt.array,received:r.parsedType}),yn;
vendor: 8,807 bytes, line 706
706if(r.data.length<this._def.items.length)return vt(r,{code:rt.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),yn;!this._def.rest&&r.data.length>this._def.items.length&&(vt(r,{code:rt.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((o,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new ah(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(s).then(o=>xa.mergeArray(n,o)):xa.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new t0({...this._def,rest:t})}}t0.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new t0({items:e,typeName:xn.ZodTuple,rest:null,...jn(t)})};class _M extends Xn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==jt.map)return vt(r,{code:rt.invalid_type,expected:jt.map,received:r.parsedType}),yn;const i=this._def.keyType,s=this._def.valueType,o=[...r.data.entries()].map(([a,c],d)=>({key:i._parse(new ah(r,a,r.path,[d,"key"])),value:s._parse(new ah(r,c,r.path,[d,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of o){const d=await c.key,h=await c.value;if(d.status==="aborted"||h.status==="aborted")return yn;(d.status==="dirty"||h.status==="dirty")&&n.dirty(),a.set(d.value,h.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of o){const d=c.key,h=c.value;if(d.status==="aborted"||h.status==="aborted")return yn;(d.status==="dirty"||h.status==="dirty")&&n.dirty(),a.set(d.value,h.value)}return{status:n.value,value:a}}}}_M.create=(e,t,n)=>new _M({valueType:t,keyType:e,typeName:xn.ZodMap,...jn(n)});class Zx extends Xn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==jt.set)return vt(r,{code:rt.invalid_type,expected:jt.set,received:r.parsedType}),yn;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(vt(r,{code:rt.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(vt(r,{code:rt.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function o(c){const d=new Set;for(const h of c){if(h.status==="aborted")return yn;h.status==="dirty"&&n.dirty(),d.add(h.value)}return{status:n.value,value:d}}const a=[...r.data.values()].map((c,d)=>s._parse(new ah(r,c,r.path,d)));return r.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,n){return new Zx({...this._def,minSize:{value:t,message:Bt.toString(n)}})}max(t,n){return new Zx({...this._def,maxSize:{value:t,message:Bt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Zx.create=(e,t)=>new Zx({valueType:e,minSize:null,maxSize:null,typeName:xn.ZodSet,...jn(t)});class jT extends Xn{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}jT.create=(e,t)=>new jT({getter:e,typeName:xn.ZodLazy,...jn(t)});class j6 extends Xn{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return vt(n,{received:n.data,code:rt.invalid_literal,expected:this._def.value}),yn}return{status:"valid",value:t.data}}get value(){return this._def.value}}j6.create=(e,t)=>new j6({value:e,typeName:xn.ZodLiteral,...jn(t)});function P$(e,t){return new n0({values:e,typeName:xn.ZodEnum,...jn(t)})}class n0 extends Xn{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return vt(n,{expected:Jn.joinValues(r),received:n.parsedType,code:rt.invalid_type}),yn}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return vt(n,{received:n.data,code:rt.invalid_enum_value,options:r}),yn}return uc(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return n0.create(t,{...this._def,...n})}exclude(t,n=this._def){return n0.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}n0.create=P$;class PT extends Xn{_parse(t){const n=Jn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==jt.string&&r.parsedType!==jt.number){const i=Jn.objectValues(n);return vt(r,{expected:Jn.joinValues(i),received:r.parsedType,code:rt.invalid_type}),yn}if(this._cache||(this._cache=new Set(Jn.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=Jn.objectValues(n);return vt(r,{received:r.data,code:rt.invalid_enum_value,options:i}),yn}return uc(t.data)}get enum(){return this._def.values}}PT.create=(e,t)=>new PT({values:e,typeName:xn.ZodNativeEnum,...jn(t)});class P6 extends Xn{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==jt.promise&&n.common.async===!1)return vt(n,{code:rt.invalid_type,expected:jt.promise,received:n.parsedType}),yn;const r=n.parsedType===jt.promise?n.data:Promise.resolve(n.data);return uc(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}P6.create=(e,t)=>new P6({type:e,typeName:xn.ZodPromise,...jn(t)});class r0 extends Xn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===xn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,s={addIssue:o=>{vt(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(r.data,s);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return yn;const c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?yn:c.status==="dirty"||n.value==="dirty"?rx(c.value):c});{if(n.value==="aborted")return yn;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?yn:a.status==="dirty"||n.value==="dirty"?rx(a.value):a}}if(i.type==="refinement"){const o=a=>{const c=i.refinement(a,s);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?yn:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?yn:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!gg(o))return yn;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>gg(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:n.value,value:a})):yn);Jn.assertNever(i)}}r0.create=(e,t,n)=>new r0({schema:e,typeName:xn.ZodEffects,effect:t,...jn(n)});r0.createWithPreprocess=(e,t,n)=>new r0({schema:t,effect:{type:"preprocess",transform:e},typeName:xn.ZodEffects,...jn(n)});class Jl extends Xn{_parse(t){return this._getType(t)===jt.undefined?uc(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jl.create=(e,t)=>new Jl({innerType:e,typeName:xn.ZodOptional,...jn(t)});class i0 extends Xn{_parse(t){return this._getType(t)===jt.null?uc(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}i0.create=(e,t)=>new i0({innerType:e,typeName:xn.ZodNullable,...jn(t)});class O6 extends Xn{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===jt.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}O6.create=(e,t)=>new O6({innerType:e,typeName:xn.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...jn(t)});class L6 extends Xn{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return I6(i)?i.then(s=>
vendor: 2,736 bytes, line 706
706({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new cd(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new cd(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}L6.create=(e,t)=>new L6({innerType:e,typeName:xn.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...jn(t)});class SM extends Xn{_parse(t){if(this._getType(t)!==jt.nan){const r=this._getOrReturnCtx(t);return vt(r,{code:rt.invalid_type,expected:jt.nan,received:r.parsedType}),yn}return{status:"valid",value:t.data}}}SM.create=e=>new SM({typeName:xn.ZodNaN,...jn(e)});class O$ extends Xn{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class kk extends Xn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?yn:s.status==="dirty"?(n.dirty(),rx(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?yn:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new kk({in:t,out:n,typeName:xn.ZodPipeline})}}class B6 extends Xn{_parse(t){const n=this._def.innerType._parse(t),r=i=>(gg(i)&&(i.value=Object.freeze(i.value)),i);return I6(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}B6.create=(e,t)=>new B6({innerType:e,typeName:xn.ZodReadonly,...jn(t)});var xn;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(xn||(xn={}));const ri=zf.create,L$=bg.create,J1e=IT.create;ch.create;
706const Mp=Vu.create,ms=ki.create,F6=M6.create,B$=Ak.create;N6.create;t0.create;const Rs=j6.create,Ck=n0.create;P6.create;Jl.create;i0.create;const ebe=/[@#$%^&*+=/\\|~«»]/,tbe=/(!{2,}|\?{2,}|-{2,})/,nbe=/[\u{1F300}-\u{1F9FF}]|[\u{2702}-\u{27B0}]|[\u{2600}-\u{26FF}]|[\u{2B00}-\u{2BFF}]/u,Jg=({max:e,noSpaces:t}={})=>(t?ri().max(e??Number.POSITIVE_INFINITY).regex(/^\S*$/,"Spaces are not allowed"):ri().max(e??Number.POSITIVE_INFINITY)).refine(r=>!nbe.test(r),{message:"Emojis and symbols are not allowed"}).refine(r=>!ebe.test(r),{message:"Special characters (@, #, $, %, ^, &, *, +, =, /, \\, |, ~, «, ») are not allowed"}).refine(r=>!tbe.test(r),{message:"Repeated punctuations (!!, ??, --) are not allowed"}),Qs=ri().url().startsWith("https://",{message:"Must be an https url"}).max(1024).refine(e=>!e.includes(" "),{message:"URL must not contain spaces"}).refine(e=>{try{const t=new URL(e).hostname;return!(t==="localhost"||t.endsWith(".localhost")||/^(\d{1,3}\.){3}\d{1,3}$/.test(t)||t.startsWith("[")&&t.endsWith("]"))}catch{return!1}},{message:"URL must not use IP addresses or localhost"}),Ik=ri().max(32),F$=ri().max(32),rbe=/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/(?:[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}(?:\/[-.%a-zA-Z0-9]{1,78})?|native)$/,ibe=ri().regex(rbe,{message:"Invalid CAIP-19 asset ID"}),Rk=ri().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i,{message:"Invalid hex color code. It should be in the format #RRGGBB or #RGB."}),sbe=/^(?!.*\.\.)([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,obe=ri().max(1024).regex(sbe,{message:"Must be a valid domain name (e.g., example.com, sub.example.com)"}).refine(e=>!e.includes("://"),{message:"Domain must not include protocol (http://, https://, etc.)"}).refine(e=>!e.includes("/"),{message:"Domain must not include path separators"}).refine(e=>!e.includes("@"),{message:"Domain must not include @ symbol"}).refine(e=>!e.includes(":"),{message:"Domain must not include port numbers"}),abe=F6([Rs("1:1"),Rs("3:2")]),cbe=ms({header:ri(),payload:ri(),signature:ri()});ms({fid:L$(),type:Rs("app_key"),key:ri().startsWith("0x")});const ube=ms({type:Rs("launch_frame"),name:Ik,url:Qs.optional(),splashImageUrl:Qs.optional(),splashBackgroundColor:Rk.optional()}),lbe=ms({type:Rs("launch_miniapp"),name:Ik,url:Qs.optional(),splashImageUrl:Qs.optional(),splashBackgroundColor:Rk.optional()}),dbe=ms({type:Rs("view_token"),token:ibe}),fbe=B$("type",[lbe,dbe,ube]),hbe=ms({title:F$,action:fbe});ms({version:F6([ri(),L$()]).transform(e=>String(e)).pipe(F6([Rs("next"),Rs("1")])),imageUrl:Qs,aspectRatio:abe.optional(),button:hbe});const D$=ms({url:ri(),token:ri()});ms({notificationId:ri().max(128),title:ri().max(32),body:ri().max(128),targetUrl:Qs,tokens:ri().array().max(100)});ms({result:ms({successfulTokens:Mp(ri()),invalidTokens:Mp(ri()),rateLimitedTokens:Mp(ri())})});const pbe=ms({event:Rs("miniapp_added"),notificationDetails:D$.optional()}),mbe=ms({event:Rs("miniapp_removed")}),ybe=ms({event:Rs("notifications_enabled"),notificationDetails:D$.required()}),gbe=ms({event:Rs("notifications_disabled")});B$("event",[pbe,mbe,ybe,gbe]);const bbe=["wallet.getEthereumProvider","wallet.getSolanaProvider","actions.ready","actions.openUrl","actions.close","actions.setPrimaryButton","actions.addMiniApp","actions.signIn","actions.viewCast","actions.viewProfile","actions.composeCast","actions.viewToken","actions.sendToken","actions.swapToken","actions.openMiniApp","actions.requestCameraAndMicrophoneAccess","experimental.signManifest","haptics.impactOccurred","haptics.notificationOccurred","haptics.selectionChanged","back"],xbe=["games","social","finance","utility","productivity","health-fitness","news-media","music","shopping","education","developer-tools","entertainment","art-creativity"],vbe=Ck(xbe),wbe=F6([Rs("0.0.0"),Rs("0.0.1"),Rs("1"),Rs("next")]),Ebe=Jg({max:30}),_be=Jg({max:170}),Sbe=Mp(Qs).max(3),Tbe=Mp(Jg({max:20,noSpaces:!0})).max(5),Abe=Jg({max:30}),kbe=Jg({max:30}),Cbe=Jg({max:100}),Ibe=J1e(),Rbe=["eip155:1","eip155:8453","eip155:42161","eip155:421614","eip155:84532","eip155:666666666","eip155:100","eip155:10","eip155:11155420","eip155:137","eip155:11155111","eip155:7777777","eip155:130","eip155:10143","eip155:42220","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"];function $$(e){const t=new Set(e);return Array.from(t)}const Mbe=Mp(Ck(Rbe)).transform($$),Nbe=Mp(Ck(bbe)).transform($$),TM=ms({version:wbe,name:Ik,iconUrl:Qs,homeUrl:Qs,imageUrl:Qs.optional(),buttonTitle:F$.optional(),splashImageUrl:Qs.optional(),splashBackgroun
706dColor:Rk.optional(),webhookUrl:Qs.optional(),subtitle:Ebe.optional(),description:_be.optional(),screenshotUrls:Sbe.optional(),primaryCategory:vbe.optional(),tags:Tbe.optional(),heroImageUrl:Qs.optional(),tagline:Abe.optional(),ogTitle:kbe.optional(),ogDescription:Cbe.optional(),ogImageUrl:Qs.optional(),noindex:Ibe.optional(),requiredChains:Mbe.optional(),requiredCapabilities:Nbe.optional(),castShareUrl:Qs.optional(),canonicalDomain:obe.optional()}).refine(e=>{if(e.castShareUrl===void 0)return!0;try{const t=new URL(e.homeUrl).hostname,n=new URL(e.castShareUrl).hostname;return t===n}catch{return!1}},{message:"castShareUrl must have the same domain as homeUrl",path:["castShareUrl"]});ms({accountAssociation:cbe,miniapp:TM.optional(),frame:TM.optional()}).refine(e=>e.frame&&e.miniapp?JSON.stringify(e.frame)===JSON.stringify(e.miniapp):!0,{message:'If both "frame" and "miniapp" are provided, they must be identical',path:["frame","miniapp"]}).transform(e=>({...e,frame:e.frame??e.miniapp}));const ty=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function uw(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function OT(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function y0(e,...t){if(!uw(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function U$(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");OT(e.outputLen),OT(e.blockLen)}function D6(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function jbe(e,t){y0(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function xg(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function h_(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Tu(e,t){return e<<32-t|e>>>t}const z$=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Pbe=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Np(e){if(y0(e),z$)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=Pbe[e[n]];return t}const Nl={_0:48,_9:57,A:65,F:70,a:97,f:102};function AM(e){if(e>=Nl._0&&e<=Nl._9)return e-Nl._0;if(e>=Nl.A&&e<=Nl.F)return e-(Nl.A-10);if(e>=Nl.a&&e<=Nl.f)return e-(Nl.a-10)}function $6(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(z$)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,s=0;i<n;i++,s+=2){const o=AM(e.charCodeAt(s)),a=AM(e.charCodeAt(s+1));if(o===void 0||a===void 0){const c=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}r[i]=o*16+a}return r}function Obe(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Mk(e){return typeof e=="string"&&(e=Obe(e)),y0(e),e}function Fu(...e){let t=0;for(let r=0;r<e.length;r++){const i=e[r];y0(i),t+=i.length}const n=new Uint8Array(t);for(let r=0,i=0;r<e.length;r++){const s=e[r];n.set(s,i),i+=s.length}return n}class V${}function q$(e){const t=r=>e().update(Mk(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Nk(e=32){if(ty&&typeof ty.getRandomValues=="function")return ty.getRandomValues(new Uint8Array(e));if(ty&&typeof ty.randomBytes=="function")return Uint8Array.from(ty.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function Lbe(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(n>>i&s),a=Number(n&s),c=r?4:0,d=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+d,a,r)}function Bbe(e,t,n){return e&t^~e&n}function Fbe(e,t,n){return e&t^e&n^t&n}let H$=class extends V${constructor(t,n,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(t),this.view=h_(this.buffer)}update(t){D6(this),t=Mk(t),y0(t);const{view:n,buffer:r,blockLen:i}=this,s=t.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=h_(t);for(;i<=s-o;o+=i)this.process(c,o);continue}r.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){D6(this),jbe(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:s}=this;let{pos:o}=this;n[o++]=128,xg(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(r,0),o=0);for(let y=o;y<i;y++)n[y]=0;Lbe(r,i-8,BigInt(this.length*8),s),this.process(r,0);const a=h_(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=c/4,h=this.get();if(d>h.length)throw new Error("_sha2: outputLen bigger than state");for(let y=0;y<d;y++)a.setUint32(4*y,h[y],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:s,destroyed:o,pos:a}=this;return t.destroyed=o,t.finished=s,t.length=i,t.pos=a,i%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}};const ff=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_s=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),y5=BigInt(2**32-1),kM=BigInt(32);function Dbe(e,t=!1){return t?{h:Number(e&y5),l:Number(e>>kM&y5)}:{h:Number(e>>kM&y5)|0,l:Number(e&y5)|0}}
706function $be(e,t=!1){const n=e.length;let r=new Uint32Array(n),i=new Uint32Array(n);for(let s=0;s<n;s++){const{h:o,l:a}=Dbe(e[s],t);[r[s],i[s]]=[o,a]}return[r,i]}const CM=(e,t,n)=>e>>>n,IM=(e,t,n)=>e<<32-n|t>>>n,ny=(e,t,n)=>e>>>n|t<<32-n,ry=(e,t,n)=>e<<32-n|t>>>n,g5=(e,t,n)=>e<<64-n|t>>>n-32,b5=(e,t,n)=>e>>>n-32|t<<64-n;function jl(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}const Ube=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),zbe=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,Vbe=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),qbe=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,Hbe=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),Wbe=(e,t,n,r,i,s)=>t+n+r+i+s+(e/2**32|0)|0,Gbe=Uint32Array.from([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]),hf=new Uint32Array(64);let Kbe=class extends H${constructor(t=32){super(64,t,8,!1),this.A=ff[0]|0,this.B=ff[1]|0,this.C=ff[2]|0,this.D=ff[3]|0,this.E=ff[4]|0,this.F=ff[5]|0,this.G=ff[6]|0,this.H=ff[7]|0}get(){const{A:t,B:n,C:r,D:i,E:s,F:o,G:a,H:c}=this;return[t,n,r,i,s,o,a,c]}set(t,n,r,i,s,o,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(t,n){for(let y=0;y<16;y++,n+=4)hf[y]=t.getUint32(n,!1);for(let y=16;y<64;y++){const g=hf[y-15],x=hf[y-2],_=Tu(g,7)^Tu(g,18)^g>>>3,S=Tu(x,17)^Tu(x,19)^x>>>10;hf[y]=S+hf[y-7]+_+hf[y-16]|0}let{A:r,B:i,C:s,D:o,E:a,F:c,G:d,H:h}=this;for(let y=0;y<64;y++){const g=Tu(a,6)^Tu(a,11)^Tu(a,25),x=h+g+Bbe(a,c,d)+Gbe[y]+hf[y]|0,S=(Tu(r,2)^Tu(r,13)^Tu(r,22))+Fbe(r,i,s)|0;
706h=d,d=c,c=a,a=o+x|0,o=s,s=i,i=r,r=x+S|0}r=r+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,i,s,o,a,c,d,h)}roundClean(){xg(hf)}destroy(){this.set(0,0,0,0,0,0,0,0),xg(this.buffer)}};const W$=$be(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
7065771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Ybe=W$[0],Zbe=W$[1],pf=new Uint32Array(80),mf=new Uint32Array(80);class Xbe extends H${constructor(t=64){super(128,t,16,!1),this.Ah=_s[0]|0,this.Al=_s[1]|0,this.Bh=_s[2]|0,this.Bl=_s[3]|0,this.Ch=_s[4]|0,this.Cl=_s[5]|0,this.Dh=_s[6]|0,this.Dl=_s[7]|0,this.Eh=_s[8]|0,this.El=_s[9]|0,this.Fh=_s[10]|0,this.Fl=_s[11]|0,this.Gh=_s[12]|0,this.Gl=_s[13]|0,this.Hh=_s[14]|0,this.Hl=_s[15]|0}get(){const{Ah:t,Al:n,Bh:r,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:d,El:h,Fh:y,Fl:g,Gh:x,Gl:_,Hh:S,Hl:I}=this;return[t,n,r,i,s,o,a,c,d,h,y,g,x,_,S,I]}set(t,n,r,i,s,o,a,c,d,h,y,g,x,_,S,I){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=d|0,this.El=h|0,this.Fh=y|0,this.Fl=g|0,this.Gh=x|0,this.Gl=_|0,this.Hh=S|0,this.Hl=I|0}process(t,n){for(let F=0;F<16;F++,n+=4)pf[F]=t.getUint32(n),mf[F]=t.getUint32(n+=4);for(let F=16;F<80;F++){const $=pf[F-15]|0,z=mf[F-15]|0,V=ny($,z,1)^ny($,z,8)^CM($,z,7),K=ry($,z,1)^ry($,z,8)^IM($,z,7),te=pf[F-2]|0,Q=mf[F-2]|0,ee=ny(te,Q,19)^g5(te,Q,61)^CM(te,Q,6),ne=ry(te,Q,19)^b5(te,Q,61)^IM(te,Q,6),J=Vbe(K,ne,mf[F-7],mf[F-16]),M=qbe(J,V,ee,pf[F-7],pf[F-16]);pf[F]=M|0,mf[F]=J|0}let{Ah:r,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:d,Dl:h,Eh:y,El:g,Fh:x,Fl:_,Gh:S,Gl:I,Hh:L,Hl:D}=this;for(let F=0;F<80;F++){const $=ny(y,g,14)^ny(y,g,18)^g5(y,g,41),z=ry(y,g,14)^ry(y,g,18)^b5(y,g,41),V=y&x^~y&S,K=g&_^~g&I,te=Hbe(D,z,K,Zbe[F],mf[F]),Q=Wbe(te,L,$,V,Ybe[F],pf[F]),ee=te|0,ne=ny(r,i,28)^g5(r,i,34)^g5(r,i,39),J=ry(r,i,28)^b5(r,i,34)^b5(r,i,39),M=r&s^r&a^s&a,m=i&o^i&c^o&c;L=S|0,D=I|0,S=x|0,I=_|0,x=y|0,_=g|0,{h:y,l:g}=jl(d|0,h|0,Q|0,ee|0),d=a|0,h=c|0,a=s|0,c=o|0,s=r|0,o=i|0;const E=Ube(ee,J,m);r=zbe(E,Q,ne,M),i=E|0}({h:r,l:i}=jl(this.Ah|0,this.Al|0,r|0,i|0)),{h:s,l:o}=jl(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=jl(this.Ch|0,this.Cl|0,a|0,c|0),{h:d,l:h}=jl(this.Dh|0,this.Dl|0,d|0,h|0),{h:y,l:g}=jl(this.Eh|0,this.El|0,y|0,g|0),{h:x,l:_}=jl(this.Fh|0,this.Fl|0,x|0,_|0),{h:S,l:I}=jl(this.Gh|0,this.Gl|0,S|0,I|0),{h:L,l:D}=jl(this.Hh|0,this.Hl|0,L|0,D|0),this.set(r,i,s,o,a,c,d,h,y,g,x,_,S,I,L,D)}roundClean(){xg(pf,mf)}destroy(){xg(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Qbe=q$(()=>new Kbe),Jbe=q$(()=>new Xbe);const jk=BigInt(0),LT=BigInt(1);function s0(e,t=""){if(typeof e!="boolean"){const n=t&&`"${t}"`;throw new Error(n+"expected boolean, got type="+typeof e)}return e}function Pc(e,t,n=""){const r=uw(e),i=e?.length,s=t!==void 0;if(!r||s&&i!==t){const o=n&&`"${n}" `,a=s?` of length ${t}`:"",c=r?`length=${i}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+a+", got "+c)}return e}function x5(e){const t=e.toString(16);return t.length&1?"0"+t:t}function G$(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?jk:BigInt("0x"+e)}function vE(e){return G$(Np(e))}function Xx(e){return y0(e),G$(Np(Uint8Array.from(e).reverse()))}function Pk(e,t){return $6(e.toString(16).padStart(t*2,"0"))}function K$(e,t){return Pk(e,t).reverse()}function ti(e,t,n){let r;if(typeof t=="string")try{r=$6(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(uw(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const i=r.length;if(typeof n=="number"&&i!==n)throw new Error(e+" of length "+n+" expected, got "+i);return r}function RM(e){return Uint8Array.from(e)}const p_=e=>typeof e=="bigint"&&jk<=e;function exe(e,t,n){return p_(e)&&p_(t)&&p_(n)&&t<=e&&e<n}function BT(e,t,n,r){if(!exe(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function Y$(e){let t;for(t=0;e>jk;e>>=LT,t+=1);return t}const lw=e=>(LT<<BigInt(e))-LT;function txe(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");const r=x=>new Uint8Array(x),i=x=>Uint8Array.of(x);let s=r(e),o=r(e),a=0;const c=()=>{s.fill(1),o.fill(0),a=0},d=(...x)=>n(o,s,...x),h=(x=r(0))=>{o=d(i(0),x),s=d(),x.length!==0&&(o=d(i(1),x),s=d())},y=()=>
706{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let x=0;const _=[];for(;x<t;){s=d();const S=s.slice();_.push(S),x+=s.length}return Fu(..._)};return(x,_)=>{c(),h(x);let S;for(;!(S=_(y()));)h();return c(),S}}function dw(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(i,s,o){const a=e[i];if(o&&a===void 0)return;const c=typeof a;if(c!==s||a===null)throw new Error(`param "${i}" is invalid: expected ${s}, got ${c}`)}Object.entries(t).forEach(([i,s])=>r(i,s,!1)),Object.entries(n).forEach(([i,s])=>r(i,s,!0))}function U6(e){const t=new WeakMap;return(n,...r)=>{const i=t.get(n);if(i!==void 0)return i;const s=e(n,...r);return t.set(n,s),s}}const No=BigInt(0),fs=BigInt(1),xp=BigInt(2),Z$=BigInt(3),X$=BigInt(4),Q$=BigInt(5),nxe=BigInt(7),J$=BigInt(8),rxe=BigInt(9),eU=BigInt(16);function Ci(e,t){const n=e%t;return n>=No?n:t+n}function ei(e,t,n){let r=e;for(;t-- >No;)r*=r,r%=n;return r}function MM(e,t){if(e===No)throw new Error("invert: expected non-zero number");if(t<=No)throw new Error("invert: expected positive modulus, got "+t);let n=Ci(e,t),r=t,i=No,s=fs;for(;n!==No;){const a=r/n,c=r%n,d=i-s*a;r=n,n=c,i=s,s=d}if(r!==fs)throw new Error("invert: does not exist");return Ci(i,t)}function Ok(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function tU(e,t){const n=(e.ORDER+fs)/X$,r=e.pow(t,n);return Ok(e,r,t),r}function ixe(e,t){const n=(e.ORDER-Q$)/J$,r=e.mul(t,xp),i=e.pow(r,n),s=e.mul(t,i),o=e.mul(e.mul(s,xp),i),a=e.mul(s,e.sub(o,e.ONE));return Ok(e,a,t),a}function sxe(e){const t=g0(e),n=nU(e),r=n(t,t.neg(t.ONE)),i=n(t,r),s=n(t,t.neg(r)),o=(e+nxe)/eU;return(a,c)=>{let d=a.pow(c,o),h=a.mul(d,r);const y=a.mul(d,i),g=a.mul(d,s),x=a.eql(a.sqr(h),c),_=a.eql(a.sqr(y),c);d=a.cmov(d,h,x),h=a.cmov(g,y,_);const S=a.eql(a.sqr(h),c),I=a.cmov(d,h,S);return Ok(a,I,c),I}}function nU(e){if(e<Z$)throw new Error("sqrt is not defined for small field");let t=e-fs,n=0;for(;t%xp===No;)t/=xp,n++;let r=xp;const i=g0(e);for(;NM(i,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return tU;let s=i.pow(r,t);const o=(t+fs)/xp;return function(c,d){if(c.is0(d))return d;if(NM(c,d)!==1)throw new Error("Cannot find square root");let h=n,y=c.mul(c.ONE,s),g=c.pow(d,t),x=c.pow(d,o);for(;!c.eql(g,c.ONE);){if(c.is0(g))return c.ZERO;let _=1,S=c.sqr(g);for(;!c.eql(S,c.ONE);)if(_++,S=c.sqr(S),_===h)throw new Error("Cannot find square root");const I=fs<<BigInt(h-_-1),L=c.pow(y,I);h=_,y=c.sqr(L),g=c.mul(g,y),x=c.mul(x,L)}return x}}function oxe(e){return e%X$===Z$?tU:e%J$===Q$?ixe:e%eU===rxe?sxe(e):nU(e)}const axe=(e,t)=>(Ci(e,t)&fs)===fs,cxe=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function uxe(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},n=cxe.reduce((r,i)=>(r[i]="function",r),t);return dw(e,n),e}function lxe(e,t,n){if(n<No)throw new Error("invalid exponent, negatives unsupported");if(n===No)return e.ONE;if(n===fs)return t;let r=e.ONE,i=t;for(;n>No;)n&fs&&(r=e.mul(r,i)),i=e.sqr(i),n>>=fs;return r}function rU(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((o,a,c)=>e.is0(a)?o:(r[c]=o,e.mul(o,a)),e.ONE),s=e.inv(i);return t.reduceRight((o,a,c)=>e.is0(a)?o:(r[c]=e.mul(o,r[c]),e.mul(o,a)),s),r}function NM(e,t){const n=(e.ORDER-fs)/xp,r=e.pow(t,n),i=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),o=e.eql(r,e.neg(e.ONE));if(!i&&!s&&!o)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function iU(e,t){t!==void 0&&OT(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function g0(e,t,n=!1,r={}){if(e<=No)throw new Error("invalid field: expected ORDER > 0, got "+e);let i,s,o=!1,a;if(typeof t=="object"&&t!=null){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const g=t;g.BITS&&(i=g.BITS),g.sqrt&&(s=g.sqrt),typeof g.isLE=="boolean"&&(n=g.isLE),typeof g.modFromBytes=="boolean"&&(o=g.modFromBytes),a=g.allowedLengths}else typeof t=="number"&&(i=t),r.sqrt&&(s=r.sqrt);const{nBitLength:c,nByteLength:d}=iU(e,i);if(d>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let h;const y=Object.freeze({ORDER:e,isLE:n,BITS:c,BYTES:d,MASK:lw(c),ZERO:No,ONE:fs,allowedLengths:a,create:g=>Ci(g,e),isValid:g=>{if(typeof g!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof g);return No<=g&&g<e},is0:g=>g===No,isValidNot0:g=>!y.is0(g)&&y.isValid(g),isOdd:g=>(g&fs)===fs,neg:g=>Ci(-g,e),eql:(g,x)=>g===x,sqr:g=>Ci(g*g,e),add:(g,x)=>Ci(g+x,e),sub:(g,x)=>Ci(g-x,e),mul:(g,x)=>Ci(g*x,e),pow:(g,x)=>lxe(y,g,x),div:(g,x)=>Ci(g*MM(x,e),e),sqrN:g=>g*g,addN:(g,x)=>g+x,subN:(g,x)=>g-x,mulN:(g,x)=>g*x,inv:g=>MM(g,e),sqrt:s||(g=>(h||(h=oxe(e)),h(y,g))),toBytes:g=>n?K$(g,d):Pk(g,d),fromBytes:(g,x=!0)=>
706{if(a){if(!a.includes(g.length)||g.length>d)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+g.length);const S=new Uint8Array(d);S.set(g,n?0:S.length-g.length),g=S}if(g.length!==d)throw new Error("Field.fromBytes: expected "+d+" bytes, got "+g.length);let _=n?Xx(g):vE(g);if(o&&(_=Ci(_,e)),!x&&!y.isValid(_))throw new Error("invalid field element: outside of range 0..ORDER");return _},invertBatch:g=>rU(y,g),cmov:(g,x,_)=>_?x:g});return Object.freeze(y)}function sU(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function oU(e){const t=sU(e);return t+Math.ceil(t/2)}function dxe(e,t,n=!1){const r=e.length,i=sU(t),s=oU(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const o=n?Xx(e):vE(e),a=Ci(o,t-fs)+fs;return n?K$(a,i):Pk(a,i)}const vg=BigInt(0),vp=BigInt(1);function z6(e,t){const n=t.negate();return e?n:t}function wp(e,t){const n=rU(e.Fp,t.map(r=>r.Z));return t.map((r,i)=>e.fromAffine(r.toAffine(n[i])))}function aU(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function m_(e,t){aU(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),i=2**e,s=lw(e),o=BigInt(e);return{windows:n,windowSize:r,mask:s,maxNumber:i,shiftBy:o}}function jM(e,t,n){const{windowSize:r,mask:i,maxNumber:s,shiftBy:o}=n;let a=Number(e&i),c=e>>o;a>r&&(a-=s,c+=vp);const d=t*r,h=d+Math.abs(a)-1,y=a===0,g=a<0,x=t%2!==0;return{nextN:c,offset:h,isZero:y,isNeg:g,isNegF:x,offsetF:d}}function fxe(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function hxe(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,r)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+r)})}const y_=new WeakMap,cU=new WeakMap;function g_(e){return cU.get(e)||1}function PM(e){if(e!==vg)throw new Error("invalid wNAF")}class uU{constructor(t,n){this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=n}_unsafeLadder(t,n,r=this.ZERO){let i=t;for(;n>vg;)n&vp&&(r=r.add(i)),i=i.double(),n>>=vp;return r}precomputeWindow(t,n){const{windows:r,windowSize:i}=m_(n,this.bits),s=[];let o=t,a=o;for(let c=0;c<r;c++){a=o,s.push(a);for(let d=1;d<i;d++)a=a.add(o),s.push(a);o=a.double()}return s}wNAF(t,n,r){if(!this.Fn.isValid(r))throw new Error("invalid scalar");let i=this.ZERO,s=this.BASE;const o=m_(t,this.bits);for(let a=0;a<o.windows;a++){const{nextN:c,offset:d,isZero:h,isNeg:y,isNegF:g,offsetF:x}=jM(r,a,o);r=c,h?s=s.add(z6(g,n[x])):i=i.add(z6(y,n[d]))}return PM(r),{p:i,f:s}}wNAFUnsafe(t,n,r,i=this.ZERO){const s=m_(t,this.bits);for(let o=0;o<s.windows&&r!==vg;o++){const{nextN:a,offset:c,isZero:d,isNeg:h}=jM(r,o,s);if(r=a,!d){const y=n[c];i=i.add(h?y.negate():y)}}return PM(r),i}getPrecomputes(t,n,r){let i=y_.get(n);return i||(i=this.precomputeWindow(n,t),t!==1&&(typeof r=="function"&&(i=r(i)),y_.set(n,i))),i}cached(t,n,r){const i=g_(t);return this.wNAF(i,this.getPrecomputes(i,t,r),n)}unsafe(t,n,r,i){const s=g_(t);return s===1?this._unsafeLadder(t,n,i):this.wNAFUnsafe(s,this.getPrecomputes(s,t,r),n,i)}createCache(t,n){aU(n,this.bits),cU.set(t,n),y_.delete(t)}hasCache(t){return g_(t)!==1}}function pxe(e,t,n,r){let i=t,s=e.ZERO,o=e.ZERO;for(;n>vg||r>vg;)n&vp&&(s=s.add(i)),r&vp&&(o=o.add(i)),i=i.double(),n>>=vp,r>>=vp;return{p1:s,p2:o}}function lU(e,t,n,r){fxe(n,e),hxe(r,t);const i=n.length,s=r.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,a=Y$(BigInt(i));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const d=lw(c),h=new Array(Number(d)+1).fill(o),y=Math.floor((t.BITS-1)/c)*c;let g=o;for(let x=y;x>=0;x-=c){h.fill(o);for(let S=0;S<s;S++){const I=r[S],L=Number(I>>BigInt(x)&d);h[L]=h[L].add(n[S])}let _=o;for(let S=h.length-1,I=o;S>0;S--)I=I.add(h[S]),_=_.add(I);if(g=g.add(_),x!==0)for(let S=0;S<c;S++)g=g.double()}return g}function OM(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return uxe(t),t}else return g0(e,{isLE:n})}function dU(e,t,n={},r){if(r===void 0&&(r=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);for(const c of["p","n","h"]){const d=t[c];if(!(typeof d=="bigint"&&d>vg))throw new Error(`CURVE.${c} must be positive bigint`)}const i=OM(t.p,n.Fp,r),s=OM(t.n,n.Fn,r),a=["Gx","Gy","a",e==="weierstrass"?"b":"d"];for(const c of a)if(!i.isValid(t[c]))throw new Error(`CURVE.${c} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:i,Fn:s}}const yf=BigInt(0),Yi=BigInt(1),b_=BigInt(2),mxe=BigInt(8);function yxe(e,t,n,r){const i=e.sqr(n),s=e.sqr(r),o=e.add(e.mul(t.a,i),s),a=e.add(e.ONE,e.mul(t.d,e.mul(i,s)));return e.eql(o,a)}function gxe(e,t={}){const n=dU("edwards",e,t,t.FpFnLE),{Fp:r,Fn:i}=n;let s=n.CURVE;const{h:o}=s;dw(t,{},{uvRatio:"function"});const a=b_<<BigInt(i.BYTES*8)-Yi,c=I=>r.create(I),d=t.uvRatio||((I,L)=>{try{return{isValid:!0,value:r.sqrt(r.div(I,L))}}catch{return{isValid:!1,value:yf}}});if(!yxe(r,s,s.Gx,s.Gy))throw new Error("bad curve params: generator point");function h(I,L,D=!1){const F=D?Yi:yf;return BT("coordinate "+I,L,F,a),L}function y(I){if(!(I instanceof _))throw new Error("ExtendedPoint expected")}const g=U6((I,L)=>{const{X:D,Y:F,Z:$}=I,z=I.is0();L==null&&(L=z?mxe:r.inv($));const V=c(D*L),K=c(F*L),te=r.mul($,L);if(z)return{x:yf,y:Yi};
706if(te!==Yi)throw new Error("invZ was invalid");return{x:V,y:K}}),x=U6(I=>{const{a:L,d:D}=s;if(I.is0())throw new Error("bad point: ZERO");const{X:F,Y:$,Z:z,T:V}=I,K=c(F*F),te=c($*$),Q=c(z*z),ee=c(Q*Q),ne=c(K*L),J=c(Q*c(ne+te)),M=c(ee+c(D*c(K*te)));if(J!==M)throw new Error("bad point: equation left != right (1)");const m=c(F*$),E=c(z*V);if(m!==E)throw new Error("bad point: equation left != right (2)");return!0});class _{constructor(L,D,F,$){this.X=h("x",L),this.Y=h("y",D),this.Z=h("z",F,!0),this.T=h("t",$),Object.freeze(this)}static CURVE(){return s}static fromAffine(L){if(L instanceof _)throw new Error("extended point not allowed");const{x:D,y:F}=L||{};return h("x",D),h("y",F),new _(D,F,Yi,c(D*F))}static fromBytes(L,D=!1){const F=r.BYTES,{a:$,d:z}=s;L=RM(Pc(L,F,"point")),s0(D,"zip215");const V=RM(L),K=L[F-1];V[F-1]=K&-129;const te=Xx(V),Q=D?a:r.ORDER;BT("point.y",te,yf,Q);const ee=c(te*te),ne=c(ee-Yi),J=c(z*ee-$);let{isValid:M,value:m}=d(ne,J);if(!M)throw new Error("bad point: invalid y coordinate");const E=(m&Yi)===Yi,C=(K&128)!==0;if(!D&&m===yf&&C)throw new Error("bad point: x=0 and x_0=1");return C!==E&&(m=c(-m)),_.fromAffine({x:m,y:te})}static fromHex(L,D=!1){return _.fromBytes(ti("point",L),D)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(L=8,D=!0){return S.createCache(this,L),D||this.multiply(b_),this}assertValidity(){x(this)}equals(L){y(L);const{X:D,Y:F,Z:$}=this,{X:z,Y:V,Z:K}=L,te=c(D*K),Q=c(z*$),ee=c(F*K),ne=c(V*$);return te===Q&&ee===ne}is0(){return this.equals(_.ZERO)}negate(){return new _(c(-this.X),this.Y,this.Z,c(-this.T))}double(){const{a:L}=s,{X:D,Y:F,Z:$}=this,z=c(D*D),V=c(F*F),K=c(b_*c($*$)),te=c(L*z),Q=D+F,ee=c(c(Q*Q)-z-V),ne=te+V,J=ne-K,M=te-V,m=c(ee*J),E=c(ne*M),C=c(ee*M),N=c(J*ne);return new _(m,E,N,C)}add(L){y(L);const{a:D,d:F}=s,{X:$,Y:z,Z:V,T:K}=this,{X:te,Y:Q,Z:ee,T:ne}=L,J=c($*te),M=c(z*Q),m=c(K*F*ne),E=c(V*ee),C=c(($+z)*(te+Q)-J-M),N=E-m,P=E+m,B=c(M-D*J),O=c(C*N),j=c(P*B),v=c(C*B),k=c(N*P);return new _(O,j,k,v)}subtract(L){return this.add(L.negate())}
706multiply(L){if(!i.isValidNot0(L))throw new Error("invalid scalar: expected 1 <= sc < curve.n");const{p:D,f:F}=S.cached(this,L,$=>wp(_,$));return wp(_,[D,F])[0]}multiplyUnsafe(L,D=_.ZERO){if(!i.isValid(L))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return L===yf?_.ZERO:this.is0()||L===Yi?this:S.unsafe(this,L,F=>wp(_,F),D)}isSmallOrder(){return this.multiplyUnsafe(o).is0()}isTorsionFree(){return S.unsafe(this,s.n).is0()}toAffine(L){return g(this,L)}clearCofactor(){return o===Yi?this:this.multiplyUnsafe(o)}toBytes(){const{x:L,y:D}=this.toAffine(),F=r.toBytes(D);return F[F.length-1]|=L&Yi?128:0,F}toHex(){return Np(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(L){return wp(_,L)}static msm(L,D){return lU(_,i,L,D)}_setWindowSize(L){this.precompute(L)}toRawBytes(){return this.toBytes()}}_.BASE=new _(s.Gx,s.Gy,Yi,c(s.Gx*s.Gy)),_.ZERO=new _(yf,Yi,Yi,yf),_.Fp=r,_.Fn=i;const S=new uU(_,i.BITS);return _.BASE.precompute(8),_}function bxe(e,t,n={}){if(typeof t!="function")throw new Error('"hash" function param is required');dw(n,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:r}=n,{BASE:i,Fp:s,Fn:o}=e,a=n.randomBytes||Nk,c=n.adjustScalarBytes||(Q=>Q),d=n.domain||((Q,ee,ne)=>{if(s0(ne,"phflag"),ee.length||ne)throw new Error("Contexts/pre-hash are not supported");return Q});function h(Q){return o.create(Xx(Q))}function y(Q){const ee=F.secretKey;Q=ti("private key",Q,ee);const ne=ti("hashed private key",t(Q),2*ee),J=c(ne.slice(0,ee)),M=ne.slice(ee,2*ee),m=h(J);return{head:J,prefix:M,scalar:m}}function g(Q){const{head:ee,prefix:ne,scalar:J}=y(Q),M=i.multiply(J),m=M.toBytes();return{head:ee,prefix:ne,scalar:J,point:M,pointBytes:m}}function x(Q){return g(Q).pointBytes}function _(Q=Uint8Array.of(),...ee){const ne=Fu(...ee);return h(t(d(ne,ti("context",Q),!!r)))}function S(Q,ee,ne={}){Q=ti("message",Q),r&&(Q=r(Q));const{prefix:J,scalar:M,pointBytes:m}=g(ee),E=_(ne.context,J,Q),C=i.multiply(E).toBytes(),N=_(ne.context,C,m,Q),P=o.create(E+N*M);if(!o.isValid(P))throw new Error("sign failed: invalid s");const B=Fu(C,o.toBytes(P));return Pc(B,F.signature,"result")}const I={zip215:!0};function L(Q,ee,ne,J=I){const{context:M,zip215:m}=J,E=F.signature;Q=ti("signature",Q,E),ee=ti("message",ee),ne=ti("publicKey",ne,F.publicKey),m!==void 0&&s0(m,"zip215"),r&&(ee=r(ee));const C=E/2,N=Q.subarray(0,C),P=Xx(Q.subarray(C,E));let B,O,j;try{B=e.fromBytes(ne,m),O=e.fromBytes(N,m),j=i.multiplyUnsafe(P)}catch{return!1}if(!m&&B.isSmallOrder())return!1;const v=_(M,O.toBytes(),B.toBytes(),ee);return O.add(B.multiplyUnsafe(v)).subtract(j).clearCofactor().is0()}const D=s.BYTES,F={secretKey:D,publicKey:D,signature:2*D,seed:D};function $(Q=a(F.seed)){return Pc(Q,F.seed,"seed")}function z(Q){const ee=te.randomSecretKey(Q);return{secretKey:ee,publicKey:x(ee)}}function V(Q){return uw(Q)&&Q.length===o.BYTES}function K(Q,ee){try{return!!e.fromBytes(Q,ee)}catch{return!1}}const te={getExtendedPublicKey:g,randomSecretKey:$,isValidSecretKey:V,isValidPublicKey:K,toMontgomery(Q){const{y:ee}=e.fromBytes(Q),ne=F.publicKey,J=ne===32;if(!J&&ne!==57)throw new Error("only defined for 25519 and 448");const M=J?s.div(Yi+ee,Yi-ee):s.div(ee-Yi,ee+Yi);return s.toBytes(M)},toMontgomerySecret(Q){const ee=F.secretKey;Pc(Q,ee);const ne=t(Q.subarray(0,ee));return c(ne).subarray(0,ee)},randomPrivateKey:$,precompute(Q=8,ee=e.BASE){return ee.precompute(Q,!1)}};return Object.freeze({keygen:z,getPublicKey:x,sign:S,verify:L,utils:te,Point:e,lengths:F})}function xxe(e){const t={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp,r=g0(t.n,e.nBitLength,!0),i={Fp:n,Fn:r,uvRatio:e.uvRatio},s={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve};return{CURVE:t,curveOpts:i,hash:e.hash,eddsaOpts:s}}function vxe(e,t){const n=t.Point;return Object.assign({},t,{ExtendedPoint:n,CURVE:e,nBitLength:n.Fn.BITS,nByteLength:n.Fn.BYTES})}function wxe(e){const{CURVE:t,curveOpts:n,hash:r,eddsaOpts:i}=xxe(e),s=gxe(t,n),o=bxe(s,r,i);return vxe(e,o)}const Exe=BigInt(1),LM=BigInt(2);BigInt(3);const _xe=BigInt(5),Sxe=BigInt(8),Lk=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),fU={p:Lk,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:Sxe,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Txe(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),s=Lk,a=e*e%s*e%s,c=ei(a,LM,s)*
vendor: 27,771 bytes, line 706
706a%s,d=ei(c,Exe,s)*e%s,h=ei(d,_xe,s)*d%s,y=ei(h,t,s)*h%s,g=ei(y,n,s)*y%s,x=ei(g,r,s)*g%s,_=ei(x,i,s)*x%s,S=ei(_,i,s)*x%s,I=ei(S,t,s)*h%s;return{pow_p_5_8:ei(I,LM,s)*e%s,b2:a}}function Axe(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const BM=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function kxe(e,t){const n=Lk,r=Ci(t*t*t,n),i=Ci(r*r*t,n),s=Txe(e*i).pow_p_5_8;let o=Ci(e*r*s,n);const a=Ci(t*o*o,n),c=o,d=Ci(o*BM,n),h=a===e,y=a===Ci(-e,n),g=a===Ci(-e*BM,n);return h&&(o=c),(y||g)&&(o=d),axe(o,n)&&(o=Ci(-o,n)),{isValid:h||y,value:o}}const Cxe=g0(fU.p,{isLE:!0}),Ixe={...fU,Fp:Cxe,hash:Jbe,adjustScalarBytes:Axe,uvRatio:kxe},fw=wxe(Ixe);var U5={exports:{}},x_={},FM;function wE(){return FM||(FM=1,(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},n={};n.byteLength=h,n.toByteArray=g,n.fromByteArray=S;for(var r=[],i=[],s=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=o.length;a<c;++a)r[a]=o[a],i[o.charCodeAt(a)]=a;i[45]=62,i[95]=63;function d(D){var F=D.length;if(F%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var $=D.indexOf("=");$===-1&&($=F);var z=$===F?0:4-$%4;return[$,z]}function h(D){var F=d(D),$=F[0],z=F[1];return($+z)*3/4-z}function y(D,F,$){return(F+$)*3/4-$}function g(D){var F,$=d(D),z=$[0],V=$[1],K=new s(y(D,z,V)),te=0,Q=V>0?z-4:z,ee;for(ee=0;ee<Q;ee+=4)F=i[D.charCodeAt(ee)]<<18|i[D.charCodeAt(ee+1)]<<12|i[D.charCodeAt(ee+2)]<<6|i[D.charCodeAt(ee+3)],K[te++]=F>>16&255,K[te++]=F>>8&255,K[te++]=F&255;return V===2&&(F=i[D.charCodeAt(ee)]<<2|i[D.charCodeAt(ee+1)]>>4,K[te++]=F&255),V===1&&(F=i[D.charCodeAt(ee)]<<10|i[D.charCodeAt(ee+1)]<<4|i[D.charCodeAt(ee+2)]>>2,K[te++]=F>>8&255,K[te++]=F&255),K}function x(D){return r[D>>18&63]+r[D>>12&63]+r[D>>6&63]+r[D&63]}function _(D,F,$){for(var z,V=[],K=F;K<$;K+=3)z=(D[K]<<16&16711680)+(D[K+1]<<8&65280)+(D[K+2]&255),V.push(x(z));return V.join("")}function S(D){for(var F,$=D.length,z=$%3,V=[],K=16383,te=0,Q=$-z;te<Q;te+=K)V.push(_(D,te,te+K>Q?Q:te+K));return z===1?(F=D[$-1],V.push(r[F>>2]+r[F<<4&63]+"==")):z===2&&(F=(D[$-2]<<8)+D[$-1],V.push(r[F>>10]+r[F>>4&63]+r[F<<2&63]+"=")),V.join("")}var I={};I.read=function(D,F,$,z,V){var K,te,Q=V*8-z-1,ee=(1<<Q)-1,ne=ee>>1,J=-7,M=$?V-1:0,m=$?-1:1,E=D[F+M];for(M+=m,K=E&(1<<-J)-1,E>>=-J,J+=Q;J>0;K=K*256+D[F+M],M+=m,J-=8);for(te=K&(1<<-J)-1,K>>=-J,J+=z;J>0;te=te*256+D[F+M],M+=m,J-=8);if(K===0)K=1-ne;else{if(K===ee)return te?NaN:(E?-1:1)*(1/0);te=te+Math.pow(2,z),K=K-ne}return(E?-1:1)*te*Math.pow(2,K-z)},I.write=function(D,F,$,z,V,K){var te,Q,ee,ne=K*8-V-1,J=(1<<ne)-1,M=J>>1,m=V===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=z?0:K-1,C=z?1:-1,N=F<0||F===0&&1/F<0?1:0;for(F=Math.abs(F),isNaN(F)||F===1/0?(Q=isNaN(F)?1:0,te=J):(te=Math.floor(Math.log(F)/Math.LN2),F*(ee=Math.pow(2,-te))<1&&(te--,ee*=2),te+M>=1?F+=m/ee:F+=m*Math.pow(2,1-M),F*ee>=2&&(te++,ee/=2),te+M>=J?(Q=0,te=J):te+M>=1?(Q=(F*ee-1)*Math.pow(2,V),te=te+M):(Q=F*Math.pow(2,M-1)*Math.pow(2,V),te=0));V>=8;D[$+E]=Q&255,E+=C,Q/=256,V-=8);for(te=te<<V|Q,ne+=V;ne>0;D[$+E]=te&255,E+=C,te/=256,ne-=8);D[$+E-C]|=N*128};(function(D){const F=n,$=I,z=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;D.Buffer=J,D.SlowBuffer=k,D.INSPECT_MAX_BYTES=50;const V=2147483647;D.kMaxLength=V;const{Uint8Array:K,ArrayBuffer:te,SharedArrayBuffer:Q}=globalThis;J.TYPED_ARRAY_SUPPORT=ee(),!J.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 ee(){try{const oe=new K(1),G={foo:function(){return 42}};return Object.setPrototypeOf(G,K.prototype),Object.setPrototypeOf(oe,G),oe.foo()===42}catch{return!1}}Object.defineProperty(J.prototype,"parent",{enumerable:!0,get:function(){if(J.isBuffer(this))return this.buffer}}),Object.defineProperty(J.prototype,"offset",{enumerable:!0,get:function(){if(J.isBuffer(this))return this.byteOffset}});function ne(oe){if(oe>V)throw new RangeError('The value "'+oe+'" is invalid for option "size"');const G=new K(oe);return Object.setPrototypeOf(G,J.prototype),G}function J(oe,G,Z){if(typeof oe=="number"){if(typeof G=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return C(oe)}return M(oe,G,Z)}J.poolSize=8192;function M(oe,G,Z){if(typeof oe=="string")return N(oe,G);if(te.isView(oe))return B(oe);if(oe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof oe);if(si(oe,te)||oe&&si(oe.buffer,te)||typeof Q<"u"&&(si(oe,Q)||oe&&si(oe.buffer,Q)))return O(oe,G,Z);if(typeof oe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const de=oe.valueOf&&oe.valueOf();if(de!=null&&de!==oe)return J.from(de,G,Z);const Ee=j(oe);if(Ee)return Ee;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof oe[Symbol.toPrimitive]=="function")return J.from(oe[Symbol.toPrimitive]("string"),G,Z);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof oe)}J.from=function(oe,G,Z){return M(oe,G,Z)},Object.setPrototypeOf(J.prototype,K.prototype),Object.setPrototypeOf(J,K);function m(oe){if(typeof oe!="number")throw new TypeError('"size" argument must be of type number');if(oe<0)throw new RangeError('The value "'+oe+'" is invalid for option "size"')}function E(oe,G,Z){return m(oe),oe<=0?ne(oe):G!==void 0?typeof Z=="string"?ne(oe).fill(G,Z):ne(oe).fill(G):ne(oe)}J.alloc=function(oe,G,Z){return E(oe,G,Z)};function C(oe){return m(oe),ne(oe<0?0:v(oe)|0)}J.allocUnsafe=function(oe){return C(oe)},J.allocUnsafeSlow=function(oe){return C(oe)};function N(oe,G){if((typeof G!="string"||G==="")&&(G="utf8"),!J.isEncoding(G))throw new TypeError("Unknown encoding: "+G);const Z=X(oe,G)|0;let de=ne(Z);const Ee=de.write(oe,G);return Ee!==Z&&(de=de.slice(0,Ee)),de}function P(oe){const G=oe.length<0?0:v(oe.length)|0,Z=ne(G);for(let de=0;de<G;de+=1)Z[de]=oe[de]&255;return Z}function B(oe){if(si(oe,K)){const G=new K(oe);return O(G.buffer,G.byteOffset,G.byteLength)}return P(oe)}function O(oe,G,Z){if(G<0||oe.byteLength<G)throw new RangeError('"offset" is outside of buffer bounds');if(oe.byteLength<G+(Z||0))throw new RangeError('"length" is outside of buffer bounds');let de;return G===void 0&&Z===void 0?de=new K(oe):Z===void 0?de=new K(oe,G):de=new K(oe,G,Z),Object.setPrototypeOf(de,J.prototype),de}function j(oe){if(J.isBuffer(oe)){const G=v(oe.length)|0,Z=ne(G);return Z.length===0||oe.copy(Z,0,0,G),Z}if(oe.length!==void 0)return typeof oe.length!="number"||tn(oe.length)?ne(0):P(oe);if(oe.type==="Buffer"&&Array.isArray(oe.data))return P(oe.data)}function v(oe){if(oe>=V)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+V.toString(16)+" bytes");return oe|0}function k(oe){return+oe!=oe&&(oe=0),J.alloc(+oe)}J.isBuffer=function(G){return G!=null&&G._isBuffer===!0&&G!==J.prototype},J.compare=function(G,Z){if(si(G,K)&&(G=J.from(G,G.offset,G.byteLength)),si(Z,K)&&(Z=J.from(Z,Z.offset,Z.byteLength)),!J.isBuffer(G)||!J.isBuffer(Z))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(G===Z)return 0;let de=G.length,Ee=Z.length;for(let Te=0,Me=Math.min(de,Ee);Te<Me;++Te)if(G[Te]!==Z[Te]){de=G[Te],Ee=Z[Te];break}return de<Ee?-1:Ee<de?1:0},J.isEncoding=function(G){switch(String(G).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},J.concat=function(G,Z){if(!Array.isArray(G))throw new TypeError('"list" argument must be an Array of Buffers');if(G.length===0)return J.alloc(0);let de;if(Z===void 0)for(Z=0,de=0;de<G.length;++de)Z+=G[de].length;const Ee=J.allocUnsafe(Z);let Te=0;for(de=0;de<G.length;++de){let Me=G[de];if(si(Me,K))Te+Me.length>Ee.length?(J.isBuffer(Me)||(Me=J.from(Me)),Me.copy(Ee,Te)):K.prototype.set.call(Ee,Me,Te);else if(J.isBuffer(Me))Me.copy(Ee,Te);else throw new TypeError('"list" argument must be an Array of Buffers');Te+=Me.length}return Ee};function X(oe,G){if(J.isBuffer(oe))return oe.length;if(te.isView(oe)||si(oe,te))return oe.byteLength;if(typeof oe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof oe);const Z=oe.length,de=arguments.length>2&&arguments[2]===!0;if(!de&&Z===0)return 0;let Ee=!1;for(;;)switch(G){case"ascii":case"latin1":case"binary":return Z;case"utf8":case"utf-8":return ht(oe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z*2;case"hex":return Z>>>1;case"base64":return at(oe).length;default:if(Ee)return de?-1:ht(oe).length;G=(""+G).toLowerCase(),Ee=!0}}J.byteLength=X;function re(oe,G,Z){let de=!1;if((G===void 0||G<0)&&(G=0),G>this.length||((Z===void 0||Z>this.length)&&(Z=this.length),Z<=0)||(Z>>>=0,G>>>=0,Z<=G))return"";for(oe||(oe="utf8");;)switch(oe){case"hex":return Ft(this,G,Z);case"utf8":case"utf-8":return ut(this,G,Z);case"ascii":return Qt(this,G,Z);case"latin1":case"binary":return Ls(this,G,Z);case"base64":return tt(this,G,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mt(this,G,Z);default:if(de)throw new TypeError("Unknown encoding: "+oe);oe=(oe+"").toLowerCase(),de=!0}}J.prototype._isBuffer=!0;function ue(oe,G,Z){const de=oe[G];oe[G]=oe[Z],oe[Z]=de}J.prototype.swap16=function(){const G=this.length;if(G%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Z=0;Z<G;Z+=2)ue(this,Z,Z+1);return this},J.prototype.swap32=function(){const G=this.length;if(G%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Z=0;Z<G;Z+=4)ue(this,Z,Z+3),ue(this,Z+1,Z+2);return this},J.prototype.swap64=function(){const G=this.length;if(G%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Z=0;Z<G;Z+=8)ue(this,Z,Z+7),ue(this,Z+1,Z+6),ue(this,Z+2,Z+5),ue(this,Z+3,Z+4);return this},J.prototype.toString=function(){const G=this.length;return G===0?"":arguments.length===0?ut(this,0,G):re.apply(this,arguments)},J.prototype.toLocaleString=J.prototype.toString,J.prototype.equals=function(G){if(!J.isBuffer(G))throw new TypeError("Argument must be a Buffer");return this===G?!0:J.compare(this,G)===0},J.prototype.inspect=function(){let G="";const Z=D.INSPECT_MAX_BYTES;return G=this.toString("hex",0,Z).replace(/(.{2})/g,"$1 ").trim(),this.length>Z&&(G+=" ... "),"<Buffer "+G+">"},z&&(J.prototype[z]=J.prototype.inspect),J.prototype.compare=function(G,Z,de,Ee,Te){if(si(G,K)&&(G=J.from(G,G.offset,G.byteLength)),!J.isBuffer(G))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof G);if(Z===void 0&&(Z=0),de===void 0&&(de=G?G.length:0),Ee===void 0&&(Ee=0),Te===void 0&&(Te=this.length),Z<0||de>G.length||Ee<0||Te>this.length)throw new RangeError("out of range index");if(Ee>=Te&&Z>=de)return 0;if(Ee>=Te)return-1;if(Z>=de)return 1;if(Z>>>=0,de>>>=0,Ee>>>=0,Te>>>=0,this===G)return 0;let Me=Te-Ee,nn=de-Z;const wt=Math.min(Me,nn),xt=this.slice(Ee,Te),rr=G.slice(Z,de);for(let yt=0;yt<wt;++yt)if(xt[yt]!==rr[yt]){Me=xt[yt],nn=rr[yt];break}return Me<nn?-1:nn<Me?1:0};function pe(oe,G,Z,de,Ee){if(oe.length===0)return-1;if(typeof Z=="string"?(de=Z,Z=0):Z>2147483647?Z=2147483647:Z<-2147483648&&(Z=-2147483648),Z=+Z,tn(Z)&&(Z=Ee?0:oe.length-1),Z<0&&(Z=oe.length+Z),Z>=oe.length){if(Ee)return-1;Z=oe.length-1}else if(Z<0)if(Ee)Z=0;else return-1;if(typeof G=="string"&&(G=J.from(G,de)),J.isBuffer(G))return G.length===0?-1:we(oe,G,Z,de,Ee);if(typeof G=="number")return G=G&255,typeof K.prototype.indexOf=="function"?Ee?K.prototype.indexOf.call(oe,G,Z):K.prototype.lastIndexOf.call(oe,G,Z):we(oe,[G],Z,de,Ee);throw new TypeError("val must be string, number or Buffer")}function we(oe,G,Z,de,Ee){let Te=1,Me=oe.length,nn=G.length;if(de!==void 0&&(de=String(de).toLowerCase(),de==="ucs2"||de==="ucs-2"||de==="utf16le"||de==="utf-16le")){if(oe.length<2||G.length<2)return-1;Te=2,Me/=2,nn/=2,Z/=2}function wt(rr,yt){return Te===1?rr[yt]:rr.readUInt16BE(yt*Te)}let xt;if(Ee){let rr=-1;for(xt=Z;xt<Me;xt++)if(wt(oe,xt)===wt(G,rr===-1?0:xt-rr)){if(rr===-1&&(rr=xt),xt-rr+1===nn)return rr*Te}else rr!==-1&&(xt-=xt-rr),rr=-1}else for(Z+nn>Me&&(Z=Me-nn),xt=Z;xt>=0;xt--){let rr=!0;for(let yt=0;yt<nn;yt++)if(wt(oe,xt+yt)!==wt(G,yt)){rr=!1;break}if(rr)return xt}return-1}J.prototype.includes=function(G,Z,de){return this.indexOf(G,Z,de)!==-1},J.prototype.indexOf=function(G,Z,de){return pe(this,G,Z,de,!0)},J.prototype.lastIndexOf=function(G,Z,de){return pe(this,G,Z,de,!1)};function Ce(oe,G,Z,de){Z=Number(Z)||0;const Ee=oe.length-Z;de?(de=Number(de),de>Ee&&(de=Ee)):de=Ee;const Te=G.length;de>Te/2&&(de=Te/2);let Me;for(Me=0;Me<de;++Me){const nn=parseInt(G.substr(Me*2,2),16);if(tn(nn))return Me;oe[Z+Me]=nn}return Me}function St(oe,G,Z,de){return zt(ht(G,oe.length-Z),oe,Z,de)}function Ve(oe,G,Z,de){return zt(pt(G),oe,Z,de)}function et(oe,G,Z,de){return zt(at(G),oe,Z,de)}function lt(oe,G,Z,de){return zt($n(G,oe.length-Z),oe,Z,de)}J.prototype.write=function(G,Z,de,Ee){if(Z===void 0)Ee="utf8",de=this.length,Z=0;else if(de===void 0&&typeof Z=="string")Ee=Z,de=this.length,Z=0;else if(isFinite(Z))Z=Z>>>0,isFinite(de)?(de=de>>>0,Ee===void 0&&(Ee="utf8")):(Ee=de,de=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Te=this.length-Z;if((de===void 0||de>Te)&&(de=Te),G.length>0&&(de<0||Z<0)||Z>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ee||(Ee="utf8");let Me=!1;for(;;)switch(Ee){case"hex":return Ce(this,G,Z,de);case"utf8":case"utf-8":return St(this,G,Z,de);case"ascii":case"latin1":case"binary":return Ve(this,G,Z,de);case"base64":return et(this,G,Z,de);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lt(this,G,Z,de);default:if(Me)throw new TypeError("Unknown encoding: "+Ee);Ee=(""+Ee).toLowerCase(),Me=!0}},J.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function tt(oe,G,Z){return G===0&&Z===oe.length?F.fromByteArray(oe):F.fromByteArray(oe.slice(G,Z))}function ut(oe,G,Z){Z=Math.min(oe.length,Z);const de=[];let Ee=G;for(;Ee<Z;){const Te=oe[Ee];let Me=null,nn=Te>239?4:Te>223?3:Te>191?2:1;if(Ee+nn<=Z){let wt,xt,rr,yt;switch(nn){case 1:Te<128&&(Me=Te);break;case 2:wt=oe[Ee+1],(wt&192)===128&&(yt=(Te&31)<<6|wt&63,yt>127&&(Me=yt));break;case 3:wt=oe[Ee+1],xt=oe[Ee+2],(wt&192)===128&&(xt&192)===128&&(yt=(Te&15)<<12|(wt&63)<<6|xt&63,yt>2047&&(yt<55296||yt>57343)&&(Me=yt));break;case 4:wt=oe[Ee+1],xt=oe[Ee+2],rr=oe[Ee+3],(wt&192)===128&&(xt&192)===128&&(rr&192)===128&&(yt=(Te&15)<<18|(wt&63)<<12|(xt&63)<<6|rr&63,yt>65535&&yt<1114112&&(Me=yt))}}Me===null?(Me=65533,nn=1):Me>65535&&(Me-=65536,de.push(Me>>>10&1023|55296),Me=56320|Me&1023),de.push(Me),Ee+=nn}return Rt(de)}const nr=4096;function Rt(oe){const G=oe.length;if(G<=nr)return String.fromCharCode.apply(String,oe);let Z="",de=0;for(;de<G;)Z+=String.fromCharCode.apply(String,oe.slice(de,de+=nr));return Z}function Qt(oe,G,Z){let de="";Z=Math.min(oe.length,Z);for(let Ee=G;Ee<Z;++Ee)de+=String.fromCharCode(oe[Ee]&127);return de}function Ls(oe,G,Z){let de="";Z=Math.min(oe.length,Z);for(let Ee=G;Ee<Z;++Ee)de+=String.fromCharCode(oe[Ee]);return de}function Ft(oe,G,Z){const de=oe.length;(!G||G<0)&&(G=0),(!Z||Z<0||Z>de)&&(Z=de);let Ee="";for(let Te=G;Te<Z;++Te)Ee+=un[oe[Te]];return Ee}function Mt(oe,G,Z){const de=oe.slice(G,Z);let Ee="";for(let Te=0;Te<de.length-1;Te+=2)Ee+=String.fromCharCode(de[Te]+de[Te+1]*256);return Ee}J.prototype.slice=function(G,Z){const de=this.length;G=~~G,Z=Z===void 0?de:~~Z,G<0?(G+=de,G<0&&(G=0)):G>de&&(G=de),Z<0?(Z+=de,Z<0&&(Z=0)):Z>de&&(Z=de),Z<G&&(Z=G);const Ee=this.subarray(G,Z);return Object.setPrototypeOf(Ee,J.prototype),Ee};function Dn(oe,G,Z){if(oe%1!==0||oe<0)throw new RangeError("offset is not uint");if(oe+G>Z)throw new RangeError("Trying to access beyond buffer length")}J.prototype.readUintLE=J.prototype.readUIntLE=function(G,Z,de){G=G>>>0,Z=Z>>>0,de||Dn(G,Z,this.length);let Ee=this[G],Te=1,Me=0;for(;++Me<Z&&(Te*=256);)Ee+=this[G+Me]*Te;return Ee},J.prototype.readUintBE=J.prototype.readUIntBE=function(G,Z,de){G=G>>>0,Z=Z>>>0,de||Dn(G,Z,this.length);let Ee=this[G+--Z],Te=1;for(;Z>0&&(Te*=256);)Ee+=this[G+--Z]*Te;return Ee},J.prototype.readUint8=J.prototype.readUInt8=function(G,Z){return G=G>>>0,Z||Dn(G,1,this.length),this[G]},J.prototype.readUint16LE=J.prototype.readUInt16LE=function(G,Z){return G=G>>>0,Z||Dn(G,2,this.length),this[G]|this[G+1]<<8},J.prototype.readUint16BE=J.prototype.readUInt16BE=function(G,Z){return G=G>>>0,Z||Dn(G,2,this.length),this[G]<<8|this[G+1]},J.prototype.readUint32LE=J.prototype.readUInt32LE=function(G,Z){return G=G>>>0,Z||Dn(G,4,this.length),(this[G]|this[G+1]<<8|this[G+2]<<16)+this[G+3]*16777216},J.prototype.readUint32BE=J.prototype.readUInt32BE=function(G,Z){return G=G>>>0,Z||Dn(G,4,this.length),this[G]*16777216+(this[G+1]<<16|this[G+2]<<8|this[G+3])},J.prototype.readBigUInt64LE=Mi(function(G){G=G>>>0,xe(G,"offset");const Z=this[G],de=this[G+7];(Z===void 0||de===void 0)&&Se(G,this.length-8);const Ee=Z+this[++G]*2**8+this[++G]*2**16+this[++G]*2**24,Te=this[++G]+this[++G]*2**8+this[++G]*2**16+de*2**24;return BigInt(Ee)+(BigInt(Te)<<BigInt(32))}),J.prototype.readBigUInt64BE=Mi(function(G){G=G>>>0,xe(G,"offset");const Z=this[G],de=this[G+7];(Z===void 0||de===void 0)&&Se(G,this.length-8);const Ee=Z*2**24+this[++G]*2**16+this[++G]*2**8+this[++G],Te=this[++G]*2**24+this[++G]*2**16+this[++G]*2**8+de;return(BigInt(Ee)<<BigInt(32))+BigInt(Te)}),J.prototype.readIntLE=function(G,Z,de){G=G>>>0,Z=Z>>>0,de||Dn(G,Z,this.length);let Ee=this[G],Te=1,Me=0;for(;++Me<Z&&(Te*=256);)Ee+=this[G+Me]*Te;return Te*=128,Ee>=Te&&(Ee-=Math.pow(2,8*Z)),Ee},J.prototype.readIntBE=function(G,Z,de){G=G>>>0,Z=Z>>>0,de||Dn(G,Z,this.length);let Ee=Z,Te=1,Me=this[G+--Ee];for(;Ee>0&&(Te*=256);)Me+=this[G+--Ee]*Te;return Te*=128,Me>=Te&&(Me-=Math.pow(2,8*Z)),Me},J.prototype.readInt8=function(G,Z){return G=G>>>0,Z||Dn(G,1,this.length),this[G]&128?(255-this[G]+1)*-1:this[G]},J.prototype.readInt16LE=function(G,Z){G=G>>>0,Z||Dn(G,2,this.length);const de=this[G]|this[G+1]<<8;return de&32768?de|4294901760:de},J.prototype.readInt16BE=function(G,Z){G=G>>>0,Z||Dn(G,2,this.length);const de=this[G+1]|this[G]<<8;return de&32768?de|4294901760:de},J.prototype.readInt32LE=function(G,Z){return G=G>>>0,Z||Dn(G,4,this.length),this[G]|this[G+1]<<8|this[G+2]<<16|this[G+3]<<24},J.prototype.readInt32BE=function(G,Z){return G=G>>>0,Z||Dn(G,4,this.length),this[G]<<24|this[G+1]<<16|this[G+2]<<8|this[G+3]},J.prototype.readBigInt64LE=Mi(function(G){G=G>>>0,xe(G,"offset");const Z=this[G],de=this[G+7];(Z===void 0||de===void 0)&&Se(G,this.length-8);const Ee=this[G+4]+this[G+5]*2**8+this[G+6]*2**16+(de<<24);return(BigInt(Ee)<<BigInt(32))+BigInt(Z+this[++G]*2**8+this[++G]*2**16+this[++G]*2**24)}),J.prototype.readBigInt64BE=Mi(function(G){G=G>>>0,xe(G,"offset");const Z=this[G],de=this[G+7];(Z===void 0||de===void 0)&&Se(G,this.length-8);const Ee=(Z<<24)+this[++G]*2**16+this[++G]*2**8+this[++G];return(BigInt(Ee)<<BigInt(32))+BigInt(this[++G]*2**24+this[++G]*2**16+this[++G]*2**8+de)}),J.prototype.readFloatLE=function(G,Z){return G=G>>>0,Z||Dn(G,4,this.length),$.read(this,G,!0,23,4)},J.prototype.readFloatBE=function(G,Z){return G=G>>>0,Z||Dn(G,4,this.length),$.read(this,G,!1,23,4)},J.prototype.readDoubleLE=function(G,Z){return G=G>>>0,Z||Dn(G,8,this.length),$.read(this,G,!0,52,8)},J.prototype.readDoubleBE=function(G,Z){return G=G>>>0,Z||Dn(G,8,this.length),$.read(this,G,!1,52,8)};function At(oe,G,Z,de,Ee,Te){if(!J.isBuffer(oe))throw new TypeError('"buffer" argument must be a Buffer instance');if(G>Ee||G<Te)throw new RangeError('"value" argument is out of bounds');if(Z+de>oe.length)throw new RangeError("Index out of range")}J.prototype.writeUintLE=J.prototype.writeUIntLE=function(G,Z,de,Ee){if(G=+G,Z=Z>>>0,de=de>>>0,!Ee){const nn=Math.pow(2,8*de)-1;At(this,G,Z,de,nn,0)}let Te=1,Me=0;for(this[Z]=G&255;++Me<de&&(Te*=256);)this[Z+Me]=G/Te&255;return Z+de},J.prototype.writeUintBE=J.prototype.writeUIntBE=function(G,Z,de,Ee){if(G=+G,Z=Z>>>0,de=de>>>0,!Ee){const nn=Math.pow(2,8*de)-1;At(this,G,Z,de,nn,0)}let Te=de-1,Me=1;for(this[Z+Te]=G&255;--Te>=0&&(Me*=256);)this[Z+Te]=G/Me&255;return Z+de},J.prototype.writeUint8=J.prototype.writeUInt8=function(G,Z,de){return G=+G,Z=Z>>>0,de||At(this,G,Z,1,255,0),this[Z]=G&255,Z+1},J.prototype.writeUint16LE=J.prototype.writeUInt16LE=function(G,Z,de){return G=+G,Z=Z>>>0,de||At(this,G,Z,2,65535,0),this[Z]=G&255,this[Z+1]=G>>>8,Z+2},J.prototype.writeUint16BE=J.prototype.writeUInt16BE=function(G,Z,de){return G=+G,Z=Z>>>0,de||At(this,G,Z,2,65535,0),this[Z]=G>>>8,this[Z+1]=G&255,Z+2},J.prototype.writeUint32LE=J.prototype.writeUInt32LE=function(G,Z,de){return G=+G,Z=Z>>>0,de||At(this,G,Z,4,4294967295,0),this[Z+3]=G>>>24,this[Z+2]=G>>>16,this[Z+1]=G>>>8,this[Z]=G&255,Z+4},J.prototype.writeUint32BE=J.prototype.writeUInt32BE=function(G,Z,de){return G=+G,Z=Z>>>0,de||At(this,G,Z,4,4294967295,0),this[Z]=G>>>24,this[Z+1]=G>>>16,this[Z+2]=G>>>8,this[Z+3]=G&255,Z+4};function Wt(oe,G,Z,de,Ee){le(G,de,Ee,oe,Z,7);let Te=Number(G&BigInt(4294967295));oe[Z++]=Te,Te=Te>>8,oe[Z++]=Te,Te=Te>>8,oe[Z++]=Te,Te=Te>>8,oe[Z++]=Te;let Me=Number(G>>BigInt(32)&BigInt(4294967295));return oe[Z++]=Me,Me=Me>>8,oe[Z++]=Me,Me=Me>>8,oe[Z++]=Me,Me=Me>>8,oe[Z++]=Me,Z}function xr(oe,G,Z,de,Ee){le(G,de,Ee,oe,Z,7);let Te=Number(G&BigInt(4294967295));oe[Z+7]=Te,Te=Te>>8,oe[Z+6]=Te,Te=Te>>8,oe[Z+5]=Te,Te=Te>>8,oe[Z+4]=Te;let Me=Number(G>>BigInt(32)&BigInt(4294967295));return oe[Z+3]=Me,Me=Me>>8,oe[Z+2]=Me,Me=Me>>8,oe[Z+1]=Me,Me=Me>>8,oe[Z]=Me,Z+8}J.prototype.writeBigUInt64LE=Mi(function(G,Z=0){return Wt(this,G,Z,BigInt(0),BigInt("0xffffffffffffffff"))}),J.prototype.writeBigUInt64BE=Mi(function(G,Z=0){return xr(this,G,Z,BigInt(0),BigInt("0xffffffffffffffff"))}),J.prototype.writeIntLE=function(G,Z,de,Ee){if(G=+G,Z=Z>>>0,!Ee){const wt=Math.pow(2,8*de-1);At(this,G,Z,de,wt-1,-wt)}let Te=0,Me=1,nn=0;for(this[Z]=G&255;++Te<de&&(Me*=256);)G<0&&nn===0&&this[Z+Te-1]!==0&&(nn=1),this[Z+Te]=(G/Me>>0)-nn&255;return Z+de},J.prototype.writeIntBE=function(G,Z,de,Ee){if(G=+G,Z=Z>>>0,!Ee){const wt=Math.pow(2,8*de-1);At(this,G,Z,de,wt-1,-wt)}let Te=de-1,Me=1,nn=0;for(this[Z+Te]=G&255;--Te>=0&&(Me*=256);)G<0&&nn===0&&this[Z+Te+1]!==0&&(nn=1),this[Z+Te]=(G/Me>>0)-nn&255;return Z+de},J.prototype.writeInt8=function(G,Z,de){return G=+G,Z=Z>>>0,de||At(this,G,Z,1,127,-128),G<0&&(G=255+G+1),this[Z]=G&255,Z+1},J.prototype.writeInt16LE=function(G,Z,de){return G=+G,Z=Z>>>0,de||At(this,G,Z,2,32767,-32768),this[Z]=G&255,this[Z+1]=G>>>8,Z+2},J.prototype.writeInt16BE=function(G,Z,de){return G=+G,Z=Z>>>0,de||At(this,G,Z,2,32767,-32768),this[Z]=G>>>8,this[Z+1]=G&255,Z+2},J.prototype.writeInt32LE=function(G,Z,de){return G=+G,Z=Z>>>0,de||At(this,G,Z,4,2147483647,-2147483648),this[Z]=G&255,this[Z+1]=G>>>8,this[Z+2]=G>>>16,this[Z+3]=G>>>24,Z+4},J.prototype.writeInt32BE=function(G,Z,de){return G=+G,Z=Z>>>0,de||At(this,G,Z,4,2147483647,-2147483648),G<0&&(G=4294967295+G+1),this[Z]=G>>>24,this[Z+1]=G>>>16,this[Z+2]=G>>>8,this[Z+3]=G&255,Z+4},J.prototype.writeBigInt64LE=Mi(function(G,Z=0){return Wt(this,G,Z,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),J.prototype.writeBigInt64BE=Mi(function(G,Z=0){return xr(this,G,Z,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Yt(oe,G,Z,de,Ee,Te){if(Z+de>oe.length)throw new RangeError("Index out of range");if(Z<0)throw new RangeError("Index out of range")}function Ut(oe,G,Z,de,Ee){return G=+G,Z=Z>>>0,Ee||Yt(oe,G,Z,4),$.write(oe,G,Z,de,23,4),Z+4}J.prototype.writeFloatLE=function(G,Z,de){return Ut(this,G,Z,!0,de)},J.prototype.writeFloatBE=function(G,Z,de){return Ut(this,G,Z,!1,de)};function pr(oe,G,Z,de,Ee){return G=+G,Z=Z>>>0,Ee||Yt(oe,G,Z,8),$.write(oe,G,Z,de,52,8),Z+8}J.prototype.writeDoubleLE=function(G,Z,de){return pr(this,G,Z,!0,de)},J.prototype.writeDoubleBE=function(G,Z,de){return pr(this,G,Z,!1,de)},J.prototype.copy=function(G,Z,de,Ee){if(!J.isBuffer(G))throw new TypeError("argument should be a Buffer");if(de||(de=0),!Ee&&Ee!==0&&(Ee=this.length),Z>=G.length&&(Z=G.length),Z||(Z=0),Ee>0&&Ee<de&&(Ee=de),Ee===de||G.length===0||this.length===0)return 0;if(Z<0)throw new RangeError("targetStart out of bounds");if(de<0||de>=this.length)throw new RangeError("Index out of range");if(Ee<0)throw new RangeError("sourceEnd out of bounds");Ee>this.length&&(Ee=this.length),G.length-Z<Ee-de&&(Ee=G.length-Z+de);const Te=Ee-de;return this===G&&typeof K.prototype.copyWithin=="function"?this.copyWithin(Z,de,Ee):K.prototype.set.call(G,this.subarray(de,Ee),Z),Te},J.prototype.fill=function(G,Z,de,Ee){if(typeof G=="string"){if(typeof Z=="string"?(Ee=Z,Z=0,de=this.length):typeof de=="string"&&(Ee=de,de=this.length),Ee!==void 0&&typeof Ee!="string")throw new TypeError("encoding must be a string");if(typeof Ee=="string"&&!J.isEncoding(Ee))throw new TypeError("Unknown encoding: "+Ee);if(G.length===1){const Me=G.charCodeAt(0);(Ee==="utf8"&&Me<128||Ee==="latin1")&&(G=Me)}}else typeof G=="number"?G=G&255:typeof G=="boolean"&&(G=Number(G));if(Z<0||this.length<Z||this.length<de)throw new RangeError("Out of range index");if(de<=Z)return this;Z=Z>>>0,de=de===void 0?this.length:de>>>0,G||(G=0);let Te;if(typeof G=="number")for(Te=Z;Te<de;++Te)this[Te]=G;else{const Me=J.isBuffer(G)?G:J.from(G,Ee),nn=Me.length;if(nn===0)throw new TypeError('The value "'+G+'" is invalid for argument "value"');for(Te=0;Te<de-Z;++Te)this[Te+Z]=Me[Te%nn]}return this};const $t={};function se(oe,G,Z){$t[oe]=class extends Z{constructor(){super(),Object.defineProperty(this,"message",{value:G.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${oe}]`,this.stack,delete this.name}get code(){return oe}set code(Ee){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ee,writable:!0})}toString(){return`${this.name} [${oe}]: ${this.message}`}}}se("ERR_BUFFER_OUT_OF_BOUNDS",function(oe){return oe?`${oe} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),se("ERR_INVALID_ARG_TYPE",function(oe,G){return`The "${oe}" argument must be of type number. Received type ${typeof G}`},TypeError),se("ERR_OUT_OF_RANGE",function(oe,G,Z){let de=`The value of "${oe}" is out of range.`,Ee=Z;return Number.isInteger(Z)&&Math.abs(Z)>2**32?Ee=H(String(Z)):typeof Z=="bigint"&&(Ee=String(Z),(Z>BigInt(2)**BigInt(32)||Z<-(BigInt(2)**BigInt(32)))&&(Ee=H(Ee)),Ee+="n"),de+=` It must be ${G}. Received ${Ee}`,de},RangeError);function H(oe){let G="",Z=oe.length;const de=oe[0]==="-"?1:0;for(;Z>=de+4;Z-=3)G=`_${oe.slice(Z-3,Z)}${G}`;return`${oe.slice(0,Z)}${G}`}function Y(oe,G,Z){xe(G,"offset"),(oe[G]===void 0||oe[G+Z]===void 0)&&Se(G,oe.length-(Z+1))}function le(oe,G,Z,de,Ee,Te){if(oe>Z||oe<G){const Me=typeof G=="bigint"?"n":"";let nn;throw G===0||G===BigInt(0)?nn=`>= 0${Me} and < 2${Me} ** ${(Te+1)*8}${Me}`:nn=`>= -(2${Me} ** ${(Te+1)*8-1}${Me}) and < 2 ** ${(Te+1)*8-1}${Me}`,new $t.ERR_OUT_OF_RANGE("value",nn,oe)}Y(de,Ee,Te)}function xe(oe,G){if(typeof oe!="number")throw new $t.ERR_INVALID_ARG_TYPE(G,"number",oe)}function Se(oe,G,Z){throw Math.floor(oe)!==oe?(xe(oe,Z),new $t.ERR_OUT_OF_RANGE("offset","an integer",oe)):G<0?new $t.ERR_BUFFER_OUT_OF_BOUNDS:new $t.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${G}`,oe)}const Re=/[^+/0-9A-Za-z-_]/g;function Zt(oe){if(oe=oe.split("=")[0],oe=oe.trim().replace(Re,""),oe.length<2)return"";for(;oe.length%4!==0;
706)oe=oe+"=";return oe}function ht(oe,G){G=G||1/0;let Z;const de=oe.length;let Ee=null;const Te=[];for(let Me=0;Me<de;++Me){if(Z=oe.charCodeAt(Me),Z>55295&&Z<57344){if(!Ee){if(Z>56319){(G-=3)>-1&&Te.push(239,191,189);continue}else if(Me+1===de){(G-=3)>-1&&Te.push(239,191,189);continue}Ee=Z;continue}if(Z<56320){(G-=3)>-1&&Te.push(239,191,189),Ee=Z;continue}Z=(Ee-55296<<10|Z-56320)+65536}else Ee&&(G-=3)>-1&&Te.push(239,191,189);if(Ee=null,Z<128){if((G-=1)<0)break;Te.push(Z)}else if(Z<2048){if((G-=2)<0)break;Te.push(Z>>6|192,Z&63|128)}else if(Z<65536){if((G-=3)<0)break;Te.push(Z>>12|224,Z>>6&63|128,Z&63|128)}else if(Z<1114112){if((G-=4)<0)break;Te.push(Z>>18|240,Z>>12&63|128,Z>>6&63|128,Z&63|128)}else throw new Error("Invalid code point")}return Te}function pt(oe){const G=[];for(let Z=0;Z<oe.length;++Z)G.push(oe.charCodeAt(Z)&255);return G}function $n(oe,G){let Z,de,Ee;const Te=[];for(let Me=0;Me<oe.length&&!((G-=2)<0);++Me)Z=oe.charCodeAt(Me),de=Z>>8,Ee=Z%256,Te.push(Ee),Te.push(de);return Te}function at(oe){return F.toByteArray(Zt(oe))}function zt(oe,G,Z,de){let Ee;for(Ee=0;Ee<de&&!(Ee+Z>=G.length||Ee>=oe.length);++Ee)G[Ee+Z]=oe[Ee];return Ee}function si(oe,G){return oe instanceof G||oe!=null&&oe.constructor!=null&&oe.constructor.name!=null&&oe.constructor.name===G.name}function tn(oe){return oe!==oe}const un=(function(){const oe="0123456789abcdef",G=new Array(256);for(let Z=0;Z<16;++Z){const de=Z*16;for(let Ee=0;Ee<16;++Ee)G[de+Ee]=oe[Z]+oe[Ee]}return G})();function Mi(oe){return typeof BigInt>"u"?an:oe}function an(){throw new Error("BigInt not supported")}})(t);const L=t.Buffer;e.Blob=t.Blob,e.BlobOptions=t.BlobOptions,e.Buffer=t.Buffer,e.File=t.File,e.FileOptions=t.FileOptions,e.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,e.SlowBuffer=t.SlowBuffer,e.TranscodeEncoding=t.TranscodeEncoding,e.atob=t.atob,e.btoa=t.btoa,e.constants=t.constants,e.default=L,e.isAscii=t.isAscii,e.isUtf8=t.isUtf8,e.kMaxLength=t.kMaxLength,e.kStringMaxLength=t.kStringMaxLength,e.resolveObjectURL=t.resolveObjectURL,e.transcode=t.transcode})(x_)),x_}var Rxe=U5.exports,DM;function Mxe(){return DM||(DM=1,(function(e){(function(t,n){function r(M,m){if(!M)throw new Error(m||"Assertion failed")}function i(M,m){M.super_=m;var E=function(){};E.prototype=m.prototype,M.prototype=new E,M.prototype.constructor=M}function s(M,m,E){if(s.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((m==="le"||m==="be")&&(E=m,m=10),this._init(M||0,m||10,E||"be"))}
vendor: 14,327 bytes, line 706
706typeof t=="object"?t.exports=s:n.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=wE().Buffer}catch{}s.isBN=function(m){return m instanceof s?!0:m!==null&&typeof m=="object"&&m.constructor.wordSize===s.wordSize&&Array.isArray(m.words)},s.max=function(m,E){return m.cmp(E)>0?m:E},s.min=function(m,E){return m.cmp(E)<0?m:E},s.prototype._init=function(m,E,C){if(typeof m=="number")return this._initNumber(m,E,C);if(typeof m=="object")return this._initArray(m,E,C);E==="hex"&&(E=16),r(E===(E|0)&&E>=2&&E<=36),m=m.toString().replace(/\s+/g,"");var N=0;m[0]==="-"&&(N++,this.negative=1),N<m.length&&(E===16?this._parseHex(m,N,C):(this._parseBase(m,E,N),C==="le"&&this._initArray(this.toArray(),E,C)))},s.prototype._initNumber=function(m,E,C){m<0&&(this.negative=1,m=-m),m<67108864?(this.words=[m&67108863],this.length=1):m<4503599627370496?(this.words=[m&67108863,m/67108864&67108863],this.length=2):(r(m<9007199254740992),this.words=[m&67108863,m/67108864&67108863,1],this.length=3),C==="le"&&this._initArray(this.toArray(),E,C)},s.prototype._initArray=function(m,E,C){if(r(typeof m.length=="number"),m.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(m.length/3),this.words=new Array(this.length);for(var N=0;N<this.length;N++)this.words[N]=0;var P,B,O=0;if(C==="be")for(N=m.length-1,P=0;N>=0;N-=3)B=m[N]|m[N-1]<<8|m[N-2]<<16,this.words[P]|=B<<O&67108863,this.words[P+1]=B>>>26-O&67108863,O+=24,O>=26&&(O-=26,P++);else if(C==="le")for(N=0,P=0;N<m.length;N+=3)B=m[N]|m[N+1]<<8|m[N+2]<<16,this.words[P]|=B<<O&67108863,this.words[P+1]=B>>>26-O&67108863,O+=24,O>=26&&(O-=26,P++);return this._strip()};function a(M,m){var E=M.charCodeAt(m);if(E>=48&&E<=57)return E-48;if(E>=65&&E<=70)return E-55;if(E>=97&&E<=102)return E-87;r(!1,"Invalid character in "+M)}function c(M,m,E){var C=a(M,E);return E-1>=m&&(C|=a(M,E-1)<<4),C}s.prototype._parseHex=function(m,E,C){this.length=Math.ceil((m.length-E)/6),this.words=new Array(this.length);for(var N=0;N<this.length;N++)this.words[N]=0;var P=0,B=0,O;if(C==="be")for(N=m.length-1;N>=E;N-=2)O=c(m,E,N)<<P,this.words[B]|=O&67108863,P>=18?(P-=18,B+=1,this.words[B]|=O>>>26):P+=8;else{var j=m.length-E;for(N=j%2===0?E+1:E;N<m.length;N+=2)O=c(m,E,N)<<P,this.words[B]|=O&67108863,P>=18?(P-=18,B+=1,this.words[B]|=O>>>26):P+=8}this._strip()};function d(M,m,E,C){for(var N=0,P=0,B=Math.min(M.length,E),O=m;O<B;O++){var j=M.charCodeAt(O)-48;N*=C,j>=49?P=j-49+10:j>=17?P=j-17+10:P=j,r(j>=0&&P<C,"Invalid character"),N+=P}return N}s.prototype._parseBase=function(m,E,C){this.words=[0],this.length=1;for(var N=0,P=1;P<=67108863;P*=E)N++;N--,P=P/E|0;for(var B=m.length-C,O=B%N,j=Math.min(B,B-O)+C,v=0,k=C;k<j;k+=N)v=d(m,k,k+N,E),this.imuln(P),this.words[0]+v<67108864?this.words[0]+=v:this._iaddn(v);if(O!==0){var X=1;for(v=d(m,k,m.length,E),k=0;k<O;k++)X*=E;this.imuln(X),this.words[0]+v<67108864?this.words[0]+=v:this._iaddn(v)}this._strip()},s.prototype.copy=function(m){m.words=new Array(this.length);for(var E=0;E<this.length;E++)m.words[E]=this.words[E];m.length=this.length,m.negative=this.negative,m.red=this.red};function h(M,m){M.words=m.words,M.length=m.length,M.negative=m.negative,M.red=m.red}if(s.prototype._move=function(m){h(m,this)},s.prototype.clone=function(){var m=new s(null);return this.copy(m),m},s.prototype._expand=function(m){for(;this.length<m;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=y}catch{s.prototype.inspect=y}else s.prototype.inspect=y;function y(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var g=["","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"],x=[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],_=[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(m,E){m=m||10,E=E|0||1;var C;if(m===16||m==="hex"){C="";for(var N=0,P=0,B=0;B<this.length;B++){var O=this.words[B],j=((O<<N|P)&16777215).toString(16);P=O>>>24-N&16777215,N+=2,N>=26&&(N-=26,B--),P!==0||B!==this.length-1?C=g[6-j.length]+j+C:C=j+C}for(P!==0&&(C=P.toString(16)+C);C.length%E!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(m===(m|0)&&m>=2&&m<=36){var v=x[m],k=_[m];C="";var X=this.clone();for(X.negative=0;!X.isZero();){var re=X.modrn(k).toString(m);X=X.idivn(k),X.isZero()?C=re+C:C=g[v-re.length]+re+C}for(this.isZero()&&(C="0"+C);C.length%E!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var m=this.words[0];return this.length===2?m+=this.words[1]*67108864:this.length===3&&this.words[2]===1?m+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-m:m},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(m,E){return this.toArrayLike(o,m,E)}),s.prototype.toArray=function(m,E){return this.toArrayLike(Array,m,E)};var S=function(m,E){return m.allocUnsafe?m.allocUnsafe(E):new m(E)};s.prototype.toArrayLike=function(m,E,C){this._strip();var N=this.byteLength(),P=C||Math.max(1,N);r(N<=P,"byte array longer than desired length"),r(P>0,"Requested array length <= 0");var B=S(m,P),O=E==="le"?"LE":"BE";return this["_toArrayLike"+O](B,N),B},s.prototype._toArrayLikeLE=function(m,E){for(var C=0,N=0,P=0,B=0;P<this.length;P++){var O=this.words[P]<<B|N;m[C++]=O&255,C<m.length&&(m[C++]=O>>8&255),C<m.length&&(m[C++]=O>>16&255),B===6?(C<m.length&&(m[C++]=O>>24&255),N=0,B=0):(N=O>>>24,B+=2)}if(C<m.length)for(m[C++]=N;C<m.length;)m[C++]=0},s.prototype._toArrayLikeBE=function(m,E){for(var C=m.length-1,N=0,P=0,B=0;P<this.length;P++){var O=this.words[P]<<B|N;m[C--]=O&255,C>=0&&(m[C--]=O>>8&255),C>=0&&(m[C--]=O>>16&255),B===6?(C>=0&&(m[C--]=O>>24&255),N=0,B=0):(N=O>>>24,B+=2)}if(C>=0)for(m[C--]=N;C>=0;)m[C--]=0},Math.clz32?s.prototype._countBits=function(m){return 32-Math.clz32(m)}:s.prototype._countBits=function(m){var E=m,C=0;return E>=4096&&(C+=13,E>>>=13),E>=64&&(C+=7,E>>>=7),E>=8&&(C+=4,E>>>=4),E>=2&&(C+=2,E>>>=2),C+E},s.prototype._zeroBits=function(m){if(m===0)return 26;var E=m,C=0;return(E&8191)===0&&(C+=13,E>>>=13),(E&127)===0&&(C+=7,E>>>=7),(E&15)===0&&(C+=4,E>>>=4),(E&3)===0&&(C+=2,E>>>=2),(E&1)===0&&C++,C},s.prototype.bitLength=function(){var m=this.words[this.length-1],E=this._countBits(m);return(this.length-1)*26+E};function I(M){for(var m=new Array(M.bitLength()),E=0;E<m.length;E++){var C=E/26|0,N=E%26;m[E]=M.words[C]>>>N&1}return m}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var m=0,E=0;E<this.length;E++){var C=this._zeroBits(this.words[E]);if(m+=C,C!==26)break}return m},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(m){return this.negative!==0?this.abs().inotn(m).iaddn(1):this.clone()},s.prototype.fromTwos=function(m){return this.testn(m-1)?this.notn(m).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(m){for(;this.length<m.length;)this.words[this.length++]=0;for(var E=0;E<m.length;E++)this.words[E]=this.words[E]|m.words[E];return this._strip()},s.prototype.ior=function(m){return r((this.negative|m.negative)===0),this.iuor(m)},s.prototype.or=function(m){return this.length>m.length?this.clone().ior(m):m.clone().ior(this)},s.prototype.uor=function(m){return this.length>m.length?this.clone().iuor(m):m.clone().iuor(this)},s.prototype.iuand=function(m){var E;this.length>m.length?E=m:E=this;for(var C=0;C<E.length;C++)this.words[C]=this.words[C]&m.words[C];return this.length=E.length,this._strip()},s.prototype.iand=function(m){return r((this.negative|m.negative)===0),this.iuand(m)},s.prototype.and=function(m){return this.length>m.length?this.clone().iand(m):m.clone().iand(this)},s.prototype.uand=function(m){return this.length>m.length?this.clone().iuand(m):m.clone().iuand(this)},s.prototype.iuxor=function(m){var E,C;this.length>m.length?(E=this,C=m):(E=m,C=this);for(var N=0;N<C.length;N++)this.words[N]=E.words[N]^C.words[N];if(this!==E)for(;N<E.length;N++)this.words[N]=E.words[N];return this.length=E.length,this._strip()},s.prototype.ixor=function(m){return r((this.negative|m.negative)===0),this.iuxor(m)},s.prototype.xor=function(m){return this.length>m.length?this.clone().ixor(m):m.clone().ixor(this)},s.prototype.uxor=function(m){return this.length>m.length?this.clone().iuxor(m):m.clone().iuxor(this)},s.prototype.inotn=function(m){r(typeof m=="number"&&m>=0);var E=Math.ceil(m/26)|0,C=m%26;this._expand(E),C>0&&E--;for(var N=0;N<E;N++)this.words[N]=~this.words[N]&67108863;return C>0&&(this.words[N]=~this.words[N]&67108863>>26-C),this._strip()},s.prototype.notn=function(m){return this.clone().inotn(m)},s.prototype.setn=function(m,E){r(typeof m=="number"&&m>=0);var C=m/26|0,N=m%26;return this._expand(C+1),E?this.words[C]=this.words[C]|1<<N:this.words[C]=this.words[C]&~(1<<N),this._strip()},s.prototype.iadd=function(m){var E;if(this.negative!==0&&m.negative===0)return this.negative=0,E=this.isub(m),this.negative^=1,this._normSign();if(this.negative===0&&m.negative!==0)return m.negative=0,E=this.isub(m),m.negative=1,E._normSign();var C,N;this.length>m.length?(C=this,N=m):(C=m,N=this);for(var P=0,B=0;B<N.length;B++)E=(C.words[B]|0)+(N.words[B]|0)+P,this.words[B]=E&67108863,P=E>>>26;for(;P!==0&&B<C.length;B++)E=(C.words[B]|0)+P,this.words[B]=E&67108863,P=E>>>26;if(this.length=C.length,P!==0)this.words[this.length]=P,this.length++;else if(C!==this)for(;B<C.length;B++)this.words[B]=C.words[B];return this},s.prototype.add=function(m){var E;return m.negative!==0&&this.negative===0?(m.negative=0,E=this.sub(m),m.negative^=1,E):m.negative===0&&this.negative!==0?(this.negative=0,E=m.sub(this),this.negative=1,E):this.length>m.length?this.clone().iadd(m):m.clone().iadd(this)},s.prototype.isub=function(m){if(m.negative!==0){m.negative=0;var E=this.iadd(m);return m.negative=1,E._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(m),this.negative=1,this._normSign();var C=this.cmp(m);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var N,P;C>0?(N=this,P=m):(N=m,P=this);for(var B=0,O=0;O<P.length;O++)E=(N.words[O]|0)-(P.words[O]|0)+B,B=E>>26,this.words[O]=E&67108863;for(;B!==0&&O<N.length;O++)E=(N.words[O]|0)+B,B=E>>26,this.words[O]=E&67108863;if(B===0&&O<N.length&&N!==this)for(;O<N.length;O++)this.words[O]=N.words[O];return this.length=Math.max(this.length,O),N!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(m){return this.clone().isub(m)};function L(M,m,E){E.negative=m.negative^M.negative;var C=M.length+m.length|0;E.length=C,C=C-1|0;var N=M.words[0]|0,P=m.words[0]|0,B=N*P,O=B&67108863,j=B/67108864|0;E.words[0]=O;for(var v=1;v<C;v++){for(var k=j>>>26,X=j&67108863,re=Math.min(v,m.length-1),ue=Math.max(0,v-M.length+1);ue<=re;ue++){var pe=v-ue|0;N=M.words[pe]|0,P=m.words[ue]|0,B=N*P+X,k+=B/67108864|0,X=B&67108863}E.words[v]=X|0,j=k|0}return j!==0?E.words[v]=j|0:E.length--,E._strip()}var D=function(m,E,C){var N=m.words,P=E.words,B=C.words,O=0,j,v,k,X=N[0]|0,re=X&8191,ue=X>>>13,pe=N[1]|0,we=pe&8191,Ce=pe>>>13,St=N[2]|0,Ve=St&8191,et=St>>>13,lt=N[3]|0,tt=lt&8191,ut=lt>>>13,nr=N[4]|0,Rt=nr&8191,Qt=nr>>>13,Ls=N[5]|0,Ft=Ls&8191,Mt=Ls>>>13,Dn=N[6]|0,At=Dn&8191,Wt=Dn>>>13,xr=N[7]|0,Yt=xr&8191,Ut=xr>>>13,pr=N[8]|0,$t=pr&8191,se=pr>>>13,H=N[9]|0,Y=H&8191,le=H>>>13,xe=P[0]|0,Se=xe&8191,Re=xe>>>13,Zt=P[1]|0,ht=Zt&8191,pt=Zt>>>13,$n=P[2]|0,at=$n&8191,zt=$n>>>13,si=P[3]|0,tn=si&8191,un=si>>>13,Mi=P[4]|0,an=Mi&8191,oe=Mi>>>13,G=P[5]|0,Z=G&8191,de=G>>>13,Ee=P[6]|0,Te=Ee&8191,Me=Ee>>>13,nn=P[7]|0,wt=nn&8191,xt=nn>>>13,rr=P[8]|0,yt=rr&8191,bn=rr>>>13,Bs=P[9]|0,hn=Bs&8191,mn=Bs>>>13;C.negative=m.negative^E.negative,C.length=19,j=Math.imul(re,Se),v=Math.imul(re,Re),v=v+Math.imul(ue,Se)|0,k=Math.imul(ue,Re);var lc=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(lc>>>26)|0,lc&=67108863,j=Math.imul(we,Se),v=Math.imul(we,Re),v=v+Math.imul(Ce,Se)|0,k=Math.imul(Ce,Re),j=j+Math.imul(re,ht)|0,v=v+Math.imul(re,pt)|0,v=v+Math.imul(ue,ht)|0,k=k+Math.imul(ue,pt)|0;var Ta=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Ta>>>26)|0,Ta&=67108863,j=Math.imul(Ve,Se),v=Math.imul(Ve,Re),v=v+Math.imul(et,Se)|0,k=Math.imul(et,Re),j=j+Math.imul(we,ht)|0,v=v+Math.imul(we,pt)|0,v=v+Math.imul(Ce,ht)|0,k=k+Math.imul(Ce,pt)|0,j=j+Math.imul(re,at)|0,v=v+Math.imul(re,zt)|0,v=v+Math.imul(ue,at)|0,k=k+Math.imul(ue,zt)|0;var Aa=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,j=Math.imul(tt,Se),v=Math.imul(tt,Re),v=v+Math.imul(ut,Se)|0,k=Math.imul(ut,Re),j=j+Math.imul(Ve,ht)|0,v=v+Math.imul(Ve,pt)|0,v=v+Math.imul(et,ht)|0,k=k+Math.imul(et,pt)|0,j=j+Math.imul(we,at)|0,v=v+Math.imul(we,zt)|0,v=v+Math.imul(Ce,at)|0,k=k+Math.imul(Ce,zt)|0,j=j+Math.imul(re,tn)|0,v=v+Math.imul(re,un)|0,v=v+Math.imul(ue,tn)|0,k=k+Math.imul(ue,un)|0;var ka=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(ka>>>26)|0,ka&=67108863,j=Math.imul(Rt,Se),v=Math.imul(Rt,Re),v=v+Math.imul(Qt,Se)|0,k=Math.imul(Qt,Re),j=j+Math.imul(tt,ht)|0,v=v+Math.imul(tt,pt)|0,v=v+Math.imul(ut,ht)|0,k=k+Math.imul(ut,pt)|0,j=j+Math.imul(Ve,at)|0,v=v+Math.imul(Ve,zt)|0,v=v+Math.imul(et,at)|0,k=k+Math.imul(et,zt)|0,j=j+Math.imul(we,tn)|0,v=v+Math.imul(we,un)|0,v=v+Math.imul(Ce,tn)|0,k=k+Math.imul(Ce,un)|0,j=j+Math.imul(re,an)|0,v=v+Math.imul(re,oe)|0,v=v+Math.imul(ue,an)|0,k=k+Math.imul(ue,oe)|0;
706var Ca=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Ca>>>26)|0,Ca&=67108863,j=Math.imul(Ft,Se),v=Math.imul(Ft,Re),v=v+Math.imul(Mt,Se)|0,k=Math.imul(Mt,Re),j=j+Math.imul(Rt,ht)|0,v=v+Math.imul(Rt,pt)|0,v=v+Math.imul(Qt,ht)|0,k=k+Math.imul(Qt,pt)|0,j=j+Math.imul(tt,at)|0,v=v+Math.imul(tt,zt)|0,v=v+Math.imul(ut,at)|0,k=k+Math.imul(ut,zt)|0,j=j+Math.imul(Ve,tn)|0,v=v+Math.imul(Ve,un)|0,v=v+Math.imul(et,tn)|0,k=k+Math.imul(et,un)|0,j=j+Math.imul(we,an)|0,v=v+Math.imul(we,oe)|0,v=v+Math.imul(Ce,an)|0,k=k+Math.imul(Ce,oe)|0,j=j+Math.imul(re,Z)|0,v=v+Math.imul(re,de)|0,v=v+Math.imul(ue,Z)|0,k=k+Math.imul(ue,de)|0;var uo=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(uo>>>26)|0,uo&=67108863,j=Math.imul(At,Se),v=Math.imul(At,Re),v=v+Math.imul(Wt,Se)|0,k=Math.imul(Wt,Re),j=j+Math.imul(Ft,ht)|0,v=v+Math.imul(Ft,pt)|0,v=v+Math.imul(Mt,ht)|0,k=k+Math.imul(Mt,pt)|0,j=j+Math.imul(Rt,at)|0,v=v+Math.imul(Rt,zt)|0,v=v+Math.imul(Qt,at)|0,k=k+Math.imul(Qt,zt)|0,j=j+Math.imul(tt,tn)|0,v=v+Math.imul(tt,un)|0,v=v+Math.imul(ut,tn)|0,k=k+Math.imul(ut,un)|0,j=j+Math.imul(Ve,an)|0,v=v+Math.imul(Ve,oe)|0,v=v+Math.imul(et,an)|0,k=k+Math.imul(et,oe)|0,j=j+Math.imul(we,Z)|0,v=v+Math.imul(we,de)|0,v=v+Math.imul(Ce,Z)|0,k=k+Math.imul(Ce,de)|0,j=j+Math.imul(re,Te)|0,v=v+Math.imul(re,Me)|0,v=v+Math.imul(ue,Te)|0,k=k+Math.imul(ue,Me)|0;var dc=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(dc>>>26)|0,dc&=67108863,j=Math.imul(Yt,Se),v=Math.imul(Yt,Re),v=v+Math.imul(Ut,Se)|0,k=Math.imul(Ut,Re),j=j+Math.imul(At,ht)|0,v=v+Math.imul(At,pt)|0,v=v+Math.imul(Wt,ht)|0,k=k+Math.imul(Wt,pt)|0,j=j+Math.imul(Ft,at)|0,v=v+Math.imul(Ft,zt)|0,v=v+Math.imul(Mt,at)|0,k=k+Math.imul(Mt,zt)|0,j=j+Math.imul(Rt,tn)|0,v=v+Math.imul(Rt,un)|0,v=v+Math.imul(Qt,tn)|0,k=k+Math.imul(Qt,un)|0,j=j+Math.imul(tt,an)|0,v=v+Math.imul(tt,oe)|0,v=v+Math.imul(ut,an)|0,k=k+Math.imul(ut,oe)|0,j=j+Math.imul(Ve,Z)|0,v=v+Math.imul(Ve,de)|0,v=v+Math.imul(et,Z)|0,k=k+Math.imul(et,de)|0,j=j+Math.imul(we,Te)|0,v=v+Math.imul(we,Me)|0,v=v+Math.imul(Ce,Te)|0,k=k+Math.imul(Ce,Me)|0,j=j+Math.imul(re,wt)|0,v=v+Math.imul(re,xt)|0,v=v+Math.imul(ue,wt)|0,k=k+Math.imul(ue,xt)|0;var Wn=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,j=Math.imul($t,Se),v=Math.imul($t,Re),v=v+Math.imul(se,Se)|0,k=Math.imul(se,Re),j=j+Math.imul(Yt,ht)|0,v=v+Math.imul(Yt,pt)|0,v=v+Math.imul(Ut,ht)|0,k=k+Math.imul(Ut,pt)|0,j=j+Math.imul(At,at)|0,v=v+Math.imul(At,zt)|0,v=v+Math.imul(Wt,at)|0,k=k+Math.imul(Wt,zt)|0,j=j+Math.imul(Ft,tn)|0,v=v+Math.imul(Ft,un)|0,v=v+Math.imul(Mt,tn)|0,k=k+Math.imul(Mt,un)|0,j=j+Math.imul(Rt,an)|0,v=v+Math.imul(Rt,oe)|0,v=v+Math.imul(Qt,an)|0,k=k+Math.imul(Qt,oe)|0,j=j+Math.imul(tt,Z)|0,v=v+Math.imul(tt,de)|0,v=v+Math.imul(ut,Z)|0,k=k+Math.imul(ut,de)|0,j=j+Math.imul(Ve,Te)|0,v=v+Math.imul(Ve,Me)|0,v=v+Math.imul(et,Te)|0,k=k+Math.imul(et,Me)|0,j=j+Math.imul(we,wt)|0,v=v+Math.imul(we,xt)|0,v=v+Math.imul(Ce,wt)|0,k=k+Math.imul(Ce,xt)|0,j=j+Math.imul(re,yt)|0,v=v+Math.imul(re,bn)|0,v=v+Math.imul(ue,yt)|0,k=k+Math.imul(ue,bn)|0;var fc=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(fc>>>26)|0,fc&=67108863,j=Math.imul(Y,Se),v=Math.imul(Y,Re),v=v+Math.imul(le,Se)|0,k=Math.imul(le,Re),j=j+Math.imul($t,ht)|0,v=v+Math.imul($t,pt)|0,v=v+Math.imul(se,ht)|0,k=k+Math.imul(se,pt)|0,j=j+Math.imul(Yt,at)|0,v=v+Math.imul(Yt,zt)|0,v=v+Math.imul(Ut,at)|0,k=k+Math.imul(Ut,zt)|0,j=j+Math.imul(At,tn)|0,v=v+Math.imul(At,un)|0,v=v+Math.imul(Wt,tn)|0,k=k+Math.imul(Wt,un)|0,j=j+Math.imul(Ft,an)|0,v=v+Math.imul(Ft,oe)|0,v=v+Math.imul(Mt,an)|0,k=k+Math.imul(Mt,oe)|0,j=j+Math.imul(Rt,Z)|0,v=v+Math.imul(Rt,de)|0,v=v+Math.imul(Qt,Z)|0,k=k+Math.imul(Qt,de)|0,j=j+Math.imul(tt,Te)|0,v=v+Math.imul(tt,Me)|0,v=v+Math.imul(ut,Te)|0,k=k+Math.imul(ut,Me)|0,j=j+Math.imul(Ve,wt)|0,v=v+Math.imul(Ve,xt)|0,v=v+Math.imul(et,wt)|0,k=k+Math.imul(et,xt)|0,j=j+Math.imul(we,yt)|0,v=v+Math.imul(we,bn)|0,v=v+Math.imul(Ce,yt)|0,k=k+Math.imul(Ce,bn)|0,j=j+Math.imul(re,hn)|0,v=v+Math.imul(re,mn)|0,v=v+Math.imul(ue,hn)|0,k=k+Math.imul(ue,mn)|0;var $o=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+($o>>>26)|0,$o&=67108863,j=Math.imul(Y,ht),v=Math.imul(Y,pt),v=v+Math.imul(le,ht)|0,k=Math.imul(le,pt),j=j+Math.imul($t,at)|0,v=v+Math.imul($t,zt)|0,v=v+Math.imul(se,at)|0,k=k+Math.imul(se,zt)|0,j=j+Math.imul(Yt,tn)|0,v=v+Math.imul(Yt,un)|0,v=v+Math.imul(Ut,tn)|0,k=k+Math.imul(Ut,un)|0,j=j+Math.imul(At,an)|0,v=v+Math.imul(At,oe)|0,v=v+Math.imul(Wt,an)|0,k=k+Math.imul(Wt,oe)|0,j=j+Math.imul(Ft,Z)|0,v=v+Math.imul(Ft,de)|0,v=v+Math.imul(Mt,Z)|0,k=k+Math.imul(Mt,de)|0,j=j+Math.imul(Rt,Te)|0,v=v+Math.imul(Rt,Me)|0,v=v+Math.imul(Qt,Te)|0,k=k+Math.imul(Qt,Me)|0,j=j+Math.imul(tt,wt)|0,v=v+Math.imul(tt,xt)|0,v=v+Math.imul(ut,wt)|0,k=k+Math.imul(ut,xt)|0,j=j+Math.imul(Ve,yt)|0,v=v+Math.imul(Ve,bn)|0,v=v+Math.imul(et,yt)|0,k=k+Math.imul(et,bn)|0,j=j+Math.imul(we,hn)|0,v=v+Math.imul(we,mn)|0,v=v+Math.imul(Ce,hn)|0,k=k+Math.imul(Ce,mn)|0;var Ia=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Ia>>>26)|0,Ia&=67108863,j=Math.imul(Y,at),v=Math.imul(Y,zt),v=v+Math.imul(le,at)|0,k=Math.imul(le,zt),j=j+Math.imul($t,tn)|0,v=v+Math.imul($t,un)|0,v=v+Math.imul(se,tn)|0,k=k+Math.imul(se,un)|0,j=j+Math.imul(Yt,an)|0,v=v+Math.imul(Yt,oe)|0,v=v+Math.imul(Ut,an)|0,k=k+Math.imul(Ut,oe)|0,j=j+Math.imul(At,Z)|0,v=v+Math.imul(At,de)|0,v=v+Math.imul(Wt,Z)|0,k=k+Math.imul(Wt,de)|0,j=j+Math.imul(Ft,Te)|0,v=v+Math.imul(Ft,Me)|0,v=v+Math.imul(Mt,Te)|0,k=k+Math.imul(Mt,Me)|0,j=j+Math.imul(Rt,wt)|0,v=v+Math.imul(Rt,xt)|0,v=v+Math.imul(Qt,wt)|0,k=k+Math.imul(Qt,xt)|0,j=j+Math.imul(tt,yt)|0,v=v+Math.imul(tt,bn)|0,v=v+Math.imul(ut,yt)|0,k=k+Math.imul(ut,bn)|0,j=j+Math.imul(Ve,hn)|0,v=v+Math.imul(Ve,mn)|0,v=v+Math.imul(et,hn)|0,k=k+Math.imul(et,mn)|0;var Fs=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Fs>>>26)|0,Fs&=67108863,j=Math.imul(Y,tn),v=Math.imul(Y,un),v=v+Math.imul(le,tn)|0,k=Math.imul(le,un),j=j+Math.imul($t,an)|0,v=v+Math.imul($t,oe)|0,v=v+Math.imul(se,an)|0,k=k+Math.imul(se,oe)|0,j=j+Math.imul(Yt,Z)|0,v=v+Math.imul(Yt,de)|0,v=v+Math.imul(Ut,Z)|0,k=k+Math.imul(Ut,de)|0,j=j+Math.imul(At,Te)|0,v=v+Math.imul(At,Me)|0,v=v+Math.imul(Wt,Te)|0,k=k+Math.imul(Wt,Me)|0,j=j+Math.imul(Ft,wt)|0,v=v+Math.imul(Ft,xt)|0,v=v+Math.imul(Mt,wt)|0,k=k+Math.imul(Mt,xt)|0,j=j+Math.imul(Rt,yt)|0,v=v+Math.imul(Rt,bn)|0,v=v+Math.imul(Qt,yt)|0,k=k+Math.imul(Qt,bn)|0,j=j+Math.imul(tt,hn)|0,v=v+Math.imul(tt,mn)|0,v=v+Math.imul(ut,hn)|0,k=k+Math.imul(ut,mn)|0;var Ra=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Ra>>>26)|0,Ra&=67108863,j=Math.imul(Y,an),v=Math.imul(Y,oe),v=v+Math.imul(le,an)|0,k=Math.imul(le,oe),j=j+Math.imul($t,Z)|0,v=v+Math.imul($t,de)|0,v=v+Math.imul(se,Z)|0,k=k+Math.imul(se,de)|0,j=j+Math.imul(Yt,Te)|0,v=v+Math.imul(Yt,Me)|0,v=v+Math.imul(Ut,Te)|0,k=k+Math.imul(Ut,Me)|0,j=j+Math.imul(At,wt)|0,v=v+Math.imul(At,xt)|0,v=v+Math.imul(Wt,wt)|0,k=k+Math.imul(Wt,xt)|0,j=j+Math.imul(Ft,yt)|0,v=v+Math.imul(Ft,bn)|0,v=v+Math.imul(Mt,yt)|0,k=k+Math.imul(Mt,bn)|0,j=j+Math.imul(Rt,hn)|0,v=v+Math.imul(Rt,mn)|0,v=v+Math.imul(Qt,hn)|0,k=k+Math.imul(Qt,mn)|0;var Uo=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Uo>>>26)|0,Uo&=67108863,j=Math.imul(Y,Z),v=Math.imul(Y,de),v=v+Math.imul(le,Z)|0,k=Math.imul(le,de),j=j+Math.imul($t,Te)|0,v=v+Math.imul($t,Me)|0,v=v+Math.imul(se,Te)|0,k=k+Math.imul(se,Me)|0,j=j+Math.imul(Yt,wt)|0,v=v+Math.imul(Yt,xt)|0,v=v+Math.imul(Ut,wt)|0,k=k+Math.imul(Ut,xt)|0,j=j+Math.imul(At,yt)|0,v=v+Math.imul(At,bn)|0,v=v+Math.imul(Wt,yt)|0,k=k+Math.imul(Wt,bn)|0,j=j+Math.imul(Ft,hn)|0,v=v+Math.imul(Ft,mn)|0,v=v+Math.imul(Mt,hn)|0,k=k+Math.imul(Mt,mn)|0;var lo=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(lo>>>26)|0,lo&=67108863,j=Math.imul(Y,Te),v=Math.imul(Y,Me),v=v+Math.imul(le,Te)|0,k=Math.imul(le,Me),j=j+Math.imul($t,wt)|0,v=v+Math.imul($t,xt)|0,v=v+Math.imul(se,wt)|0,k=k+Math.imul(se,xt)|0,j=j+Math.imul(Yt,yt)|0,v=v+Math.imul(Yt,bn)|0,v=v+Math.imul(Ut,yt)|0,k=k+Math.imul(Ut,bn)|0,j=j+Math.imul(At,hn)|0,v=v+Math.imul(At,mn)|0,v=v+Math.imul(Wt,hn)|0,k=k+Math.imul(Wt,mn)|0;var Ei=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Ei>
vendor: 19,979 bytes, line 706
706>>26)|0,Ei&=67108863,j=Math.imul(Y,wt),v=Math.imul(Y,xt),v=v+Math.imul(le,wt)|0,k=Math.imul(le,xt),j=j+Math.imul($t,yt)|0,v=v+Math.imul($t,bn)|0,v=v+Math.imul(se,yt)|0,k=k+Math.imul(se,bn)|0,j=j+Math.imul(Yt,hn)|0,v=v+Math.imul(Yt,mn)|0,v=v+Math.imul(Ut,hn)|0,k=k+Math.imul(Ut,mn)|0;var hc=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(hc>>>26)|0,hc&=67108863,j=Math.imul(Y,yt),v=Math.imul(Y,bn),v=v+Math.imul(le,yt)|0,k=Math.imul(le,bn),j=j+Math.imul($t,hn)|0,v=v+Math.imul($t,mn)|0,v=v+Math.imul(se,hn)|0,k=k+Math.imul(se,mn)|0;var oi=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(oi>>>26)|0,oi&=67108863,j=Math.imul(Y,hn),v=Math.imul(Y,mn),v=v+Math.imul(le,hn)|0,k=Math.imul(le,mn);var Ma=(O+j|0)+((v&8191)<<13)|0;return O=(k+(v>>>13)|0)+(Ma>>>26)|0,Ma&=67108863,B[0]=lc,B[1]=Ta,B[2]=Aa,B[3]=ka,B[4]=Ca,B[5]=uo,B[6]=dc,B[7]=Wn,B[8]=fc,B[9]=$o,B[10]=Ia,B[11]=Fs,B[12]=Ra,B[13]=Uo,B[14]=lo,B[15]=Ei,B[16]=hc,B[17]=oi,B[18]=Ma,O!==0&&(B[19]=O,C.length++),C};Math.imul||(D=L);function F(M,m,E){E.negative=m.negative^M.negative,E.length=M.length+m.length;for(var C=0,N=0,P=0;P<E.length-1;P++){var B=N;N=0;for(var O=C&67108863,j=Math.min(P,m.length-1),v=Math.max(0,P-M.length+1);v<=j;v++){var k=P-v,X=M.words[k]|0,re=m.words[v]|0,ue=X*re,pe=ue&67108863;B=B+(ue/67108864|0)|0,pe=pe+O|0,O=pe&67108863,B=B+(pe>>>26)|0,N+=B>>>26,B&=67108863}E.words[P]=O,C=B,B=N}return C!==0?E.words[P]=C:E.length--,E._strip()}function $(M,m,E){return F(M,m,E)}s.prototype.mulTo=function(m,E){var C,N=this.length+m.length;return this.length===10&&m.length===10?C=D(this,m,E):N<63?C=L(this,m,E):N<1024?C=F(this,m,E):C=$(this,m,E),C},s.prototype.mul=function(m){var E=new s(null);return E.words=new Array(this.length+m.length),this.mulTo(m,E)},s.prototype.mulf=function(m){var E=new s(null);return E.words=new Array(this.length+m.length),$(this,m,E)},s.prototype.imul=function(m){return this.clone().mulTo(m,this)},s.prototype.imuln=function(m){var E=m<0;E&&(m=-m),r(typeof m=="number"),r(m<67108864);for(var C=0,N=0;N<this.length;N++){var P=(this.words[N]|0)*m,B=(P&67108863)+(C&67108863);C>>=26,C+=P/67108864|0,C+=B>>>26,this.words[N]=B&67108863}return C!==0&&(this.words[N]=C,this.length++),E?this.ineg():this},s.prototype.muln=function(m){return this.clone().imuln(m)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(m){var E=I(m);if(E.length===0)return new s(1);for(var C=this,N=0;N<E.length&&E[N]===0;N++,C=C.sqr());if(++N<E.length)for(var P=C.sqr();N<E.length;N++,P=P.sqr())E[N]!==0&&(C=C.mul(P));return C},s.prototype.iushln=function(m){r(typeof m=="number"&&m>=0);var E=m%26,C=(m-E)/26,N=67108863>>>26-E<<26-E,P;if(E!==0){var B=0;for(P=0;P<this.length;P++){var O=this.words[P]&N,j=(this.words[P]|0)-O<<E;this.words[P]=j|B,B=O>>>26-E}B&&(this.words[P]=B,this.length++)}if(C!==0){for(P=this.length-1;P>=0;P--)this.words[P+C]=this.words[P];for(P=0;P<C;P++)this.words[P]=0;this.length+=C}return this._strip()},s.prototype.ishln=function(m){return r(this.negative===0),this.iushln(m)},s.prototype.iushrn=function(m,E,C){r(typeof m=="number"&&m>=0);var N;E?N=(E-E%26)/26:N=0;var P=m%26,B=Math.min((m-P)/26,this.length),O=67108863^67108863>>>P<<P,j=C;if(N-=B,N=Math.max(0,N),j){for(var v=0;v<B;v++)j.words[v]=this.words[v];j.length=B}if(B!==0)if(this.length>B)for(this.length-=B,v=0;v<this.length;v++)this.words[v]=this.words[v+B];else this.words[0]=0,this.length=1;var k=0;for(v=this.length-1;v>=0&&(k!==0||v>=N);v--){var X=this.words[v]|0;this.words[v]=k<<26-P|X>>>P,k=X&O}return j&&k!==0&&(j.words[j.length++]=k),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(m,E,C){return r(this.negative===0),this.iushrn(m,E,C)},s.prototype.shln=function(m){return this.clone().ishln(m)},s.prototype.ushln=function(m){return this.clone().iushln(m)},s.prototype.shrn=function(m){return this.clone().ishrn(m)},s.prototype.ushrn=function(m){return this.clone().iushrn(m)},s.prototype.testn=function(m){r(typeof m=="number"&&m>=0);var E=m%26,C=(m-E)/26,N=1<<E;if(this.length<=C)return!1;var P=this.words[C];return!!(P&N)},s.prototype.imaskn=function(m){r(typeof m=="number"&&m>=0);var E=m%26,C=(m-E)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(E!==0&&C++,this.length=Math.min(C,this.length),E!==0){var N=67108863^67108863>>>E<<E;this.words[this.length-1]&=N}return this._strip()},s.prototype.maskn=function(m){return this.clone().imaskn(m)},s.prototype.iaddn=function(m){return r(typeof m=="number"),r(m<67108864),m<0?this.isubn(-m):this.negative!==0?this.length===1&&(this.words[0]|0)<=m?(this.words[0]=m-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(m),this.negative=1,this):this._iaddn(m)},s.prototype._iaddn=function(m){this.words[0]+=m;for(var E=0;E<this.length&&this.words[E]>=67108864;E++)this.words[E]-=67108864,E===this.length-1?this.words[E+1]=1:this.words[E+1]++;return this.length=Math.max(this.length,E+1),this},s.prototype.isubn=function(m){if(r(typeof m=="number"),r(m<67108864),m<0)return this.iaddn(-m);if(this.negative!==0)return this.negative=0,this.iaddn(m),this.negative=1,this;if(this.words[0]-=m,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var E=0;E<this.length&&this.words[E]<0;E++)this.words[E]+=67108864,this.words[E+1]-=1;return this._strip()},s.prototype.addn=function(m){return this.clone().iaddn(m)},s.prototype.subn=function(m){return this.clone().isubn(m)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(m,E,C){var N=m.length+C,P;this._expand(N);var B,O=0;for(P=0;P<m.length;P++){B=(this.words[P+C]|0)+O;var j=(m.words[P]|0)*E;B-=j&67108863,O=(B>>26)-(j/67108864|0),this.words[P+C]=B&67108863}for(;P<this.length-C;P++)B=(this.words[P+C]|0)+O,O=B>>26,this.words[P+C]=B&67108863;if(O===0)return this._strip();for(r(O===-1),O=0,P=0;P<this.length;P++)B=-(this.words[P]|0)+O,O=B>>26,this.words[P]=B&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(m,E){var C=this.length-m.length,N=this.clone(),P=m,B=P.words[P.length-1]|0,O=this._countBits(B);C=26-O,C!==0&&(P=P.ushln(C),N.iushln(C),B=P.words[P.length-1]|0);var j=N.length-P.length,v;if(E!=="mod"){v=new s(null),v.length=j+1,v.words=new Array(v.length);for(var k=0;k<v.length;k++)v.words[k]=0}var X=N.clone()._ishlnsubmul(P,1,j);X.negative===0&&(N=X,v&&(v.words[j]=1));for(var re=j-1;re>=0;re--){var ue=(N.words[P.length+re]|0)*67108864+(N.words[P.length+re-1]|0);for(ue=Math.min(ue/B|0,67108863),N._ishlnsubmul(P,ue,re);N.negative!==0;)ue--,N.negative=0,N._ishlnsubmul(P,1,re),N.isZero()||(N.negative^=1);v&&(v.words[re]=ue)}return v&&v._strip(),N._strip(),E!=="div"&&C!==0&&N.iushrn(C),{div:v||null,mod:N}},s.prototype.divmod=function(m,E,C){if(r(!m.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var N,P,B;return this.negative!==0&&m.negative===0?(B=this.neg().divmod(m,E),E!=="mod"&&(N=B.div.neg()),E!=="div"&&(P=B.mod.neg(),C&&P.negative!==0&&P.iadd(m)),{div:N,mod:P}):this.negative===0&&m.negative!==0?(B=this.divmod(m.neg(),E),E!=="mod"&&(N=B.div.neg()),{div:N,mod:B.mod}):(this.negative&m.negative)!==0?(B=this.neg().divmod(m.neg(),E),E!=="div"&&(P=B.mod.neg(),C&&P.negative!==0&&P.isub(m)),{div:B.div,mod:P}):m.length>this.length||this.cmp(m)<0?{div:new s(0),mod:this}:m.length===1?E==="div"?{div:this.divn(m.words[0]),mod:null}:E==="mod"?{div:null,mod:new s(this.modrn(m.words[0]))}:{div:this.divn(m.words[0]),mod:new s(this.modrn(m.words[0]))}:this._wordDiv(m,E)},s.prototype.div=function(m){return this.divmod(m,"div",!1).div},s.prototype.mod=function(m){return this.divmod(m,"mod",!1).mod},s.prototype.umod=function(m){return this.divmod(m,"mod",!0).mod},s.prototype.divRound=function(m){var E=this.divmod(m);if(E.mod.isZero())return E.div;var C=E.div.negative!==0?E.mod.isub(m):E.mod,N=m.ushrn(1),P=m.andln(1),B=C.cmp(N);return B<0||P===1&&B===0?E.div:E.div.negative!==0?E.div.isubn(1):E.div.iaddn(1)},s.prototype.modrn=function(m){var E=m<0;E&&(m=-m),r(m<=67108863);for(var C=(1<<26)%m,N=0,P=this.length-1;P>=0;P--)N=(C*N+(this.words[P]|0))%m;return E?-N:N},s.prototype.modn=function(m){return this.modrn(m)},s.prototype.idivn=function(m){var E=m<0;E&&(m=-m),r(m<=67108863);for(var C=0,N=this.length-1;N>=0;N--){var P=(this.words[N]|0)+C*67108864;this.words[N]=P/m|0,C=P%m}return this._strip(),E?this.ineg():this},s.prototype.divn=function(m){return this.clone().idivn(m)},s.prototype.egcd=function(m){r(m.negative===0),r(!m.isZero());var E=this,C=m.clone();E.negative!==0?E=E.umod(m):E=E.clone();for(var N=new s(1),P=new s(0),B=new s(0),O=new s(1),j=0;E.isEven()&&C.isEven();)E.iushrn(1),C.iushrn(1),++j;for(var v=C.clone(),k=E.clone();!E.isZero();){for(var X=0,re=1;(E.words[0]&re)===0&&X<26;++X,re<<=1);if(X>0)for(E.iushrn(X);X-- >0;)(N.isOdd()||P.isOdd())&&(N.iadd(v),P.isub(k)),N.iushrn(1),P.iushrn(1);for(var ue=0,pe=1;(C.words[0]&pe)===0&&ue<26;++ue,pe<<=1);if(ue>0)for(C.iushrn(ue);ue-- >0;)(B.isOdd()||O.isOdd())&&(B.iadd(v),O.isub(k)),B.iushrn(1),O.iushrn(1);E.cmp(C)>=0?(E.isub(C),N.isub(B),P.isub(O)):(C.isub(E),B.isub(N),O.isub(P))}return{a:B,b:O,gcd:C.iushln(j)}},s.prototype._invmp=function(m){r(m.negative===0),r(!m.isZero());var E=this,C=m.clone();E.negative!==0?E=E.umod(m):E=E.clone();for(var N=new s(1),P=new s(0),B=C.clone();E.cmpn(1)>0&&C.cmpn(1)>0;){for(var O=0,j=1;(E.words[0]&j)===0&&O<26;++O,j<<=1);if(O>0)for(E.iushrn(O);O-- >0;)N.isOdd()&&N.iadd(B),N.iushrn(1);for(var v=0,k=1;(C.words[0]&k)===0&&v<26;++v,k<<=1);if(v>0)for(C.iushrn(v);v-- >0;)P.isOdd()&&P.iadd(B),P.iushrn(1);E.cmp(C)>=0?(E.isub(C),N.isub(P)):(C.isub(E),P.isub(N))}var X;return E.cmpn(1)===0?X=N:X=P,X.cmpn(0)<0&&X.iadd(m),X},s.prototype.gcd=function(m){if(this.isZero())return m.abs();if(m.isZero())return this.abs();var E=this.clone(),C=m.clone();E.negative=0,C.negative=0;for(var N=0;E.isEven()&&C.isEven();N++)E.iushrn(1),C.iushrn(1);do{for(;E.isEven();)E.iushrn(1);for(;C.isEven();)C.iushrn(1);var P=E.cmp(C);if(P<0){var B=E;E=C,C=B}else if(P===0||C.cmpn(1)===0)break;E.isub(C)}while(!0);return C.iushln(N)},s.prototype.invm=function(m){return this.egcd(m).a.umod(m)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(m){return this.words[0]&m},s.prototype.bincn=function(m){r(typeof m=="number");var E=m%26,C=(m-E)/26,N=1<<E;if(this.length<=C)return this._expand(C+1),this.words[C]|=N,this;for(var P=N,B=C;P!==0&&B<this.length;B++){var O=this.words[B]|0;O+=P,P=O>>>26,O&=67108863,this.words[B]=O}return P!==0&&(this.words[B]=P,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(m){var E=m<0;if(this.negative!==0&&!E)return-1;if(this.negative===0&&E)return 1;this._strip();var C;if(this.length>1)C=1;else{E&&(m=-m),r(m<=67108863,"Number is too big");var N=this.words[0]|0;C=N===m?0:N<m?-1:1}return this.negative!==0?-C|0:C},s.prototype.cmp=function(m){if(this.negative!==0&&m.negative===0)return-1;if(this.negative===0&&m.negative!==0)return 1;var E=this.ucmp(m);return this.negative!==0?-E|0:E},s.prototype.ucmp=function(m){if(this.length>m.length)return 1;if(this.length<m.length)return-1;for(var E=0,C=this.length-1;C>=0;C--){var N=this.words[C]|0,P=m.words[C]|0;if(N!==P){N<P?E=-1:N>P&&(E=1);break}}return E},s.prototype.gtn=function(m){return this.cmpn(m)===1},s.prototype.gt=function(m){return this.cmp(m)===1},s.prototype.gten=function(m){return this.cmpn(m)>=0},s.prototype.gte=function(m){return this.cmp(m)>=0},s.prototype.ltn=function(m){return this.cmpn(m)===-1},s.prototype.lt=function(m){return this.cmp(m)===-1},s.prototype.lten=function(m){return this.cmpn(m)<=0},s.prototype.lte=function(m){return this.cmp(m)<=0},s.prototype.eqn=function(m){return this.cmpn(m)===0},s.prototype.eq=function(m){return this.cmp(m)===0},s.red=function(m){return new ne(m)},s.prototype.toRed=function(m){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),m.convertTo(this)._forceRed(m)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(m){return this.red=m,this},s.prototype.forceRed=function(m){return r(!this.red,"Already a number in reduction context"),this._forceRed(m)},s.prototype.redAdd=function(m){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,m)},s.prototype.redIAdd=function(m){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,m)},s.prototype.redSub=function(m){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,m)},s.prototype.redISub=function(m){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,m)},s.prototype.redShl=function(m){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,m)},s.prototype.redMul=function(m){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,m),this.red.mul(this,m)},s.prototype.redIMul=function(m){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,m),this.red.imul(this,m)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(m){return r(this.red&&!m.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,m)};var z={k256:null,p224:null,p192:null,p25519:null};function V(M,m){this.name=M,this.p=new s(m,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}V.prototype._tmp=function(){var m=new s(null);return m.words=new Array(Math.ceil(this.n/13)),m},V.prototype.ireduce=function(m){var E=m,C;do this.split(E,this.tmp),E=this.imulK(E),E=E.iadd(this.tmp),C=E.bitLength();while(C>this.n);var N=C<this.n?-1:E.ucmp(this.p);return N===0?(E.words[0]=0,E.length=1):N>0?E.isub(this.p):E.strip!==void 0?E.strip():E._strip(),E},V.prototype.split=function(m,E){m.iushrn(this.n,0,E)},V.prototype.imulK=function(m){return m.imul(this.k)};function K(){V.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(K,V),K.prototype.split=function(m,E){for(var C=4194303,N=Math.min(m.length,9),P=0;P<N;P++)E.words[P]=m.words[P];if(E.length=N,m.length<=9){m.words[0]=0,m.length=1;return}var B=m.words[9];for(E.words[E.length++]=B&C,P=10;P<m.length;P++){var O=m.words[P]|0;m.words[P-10]=(O&C)<<4|B>>>22,B=O}B>>>=22,m.words[P-10]=B,B===0&&m.length>10?m.length-=10:m.length-=9},K.prototype.imulK=function(m){m.words[m.length]=0,m.words[m.length+1]=0,m.length+=2;for(var E=0,C=0;C<m.length;C++){var N=m.words[C]|0;E+=N*977,m.words[C]=E&67108863,E=N*64+(E/67108864|0)}return m.words[m.length-1]===0&&(m.length--,m.words[m.length-1]===0&&m.length--),m};function te(){V.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(te,V);function Q(){V.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(Q,V);function ee(){V.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(ee,V),ee.prototype.imulK=function(m){for(var E=0,C=0;C<m.length;C++){var N=(m.words[C]|0)*19+E,P=N&67108863;N>>>=26,m.words[C]=P,E=N}return E!==0&&(m.words[m.length++]=E),m},s._prime=function(m){if(z[m])return z[m];var E;if(m==="k256")E=new K;else if(m==="p224")E=new te;else if(m==="p192")E=new Q;else if(m==="p25519")E=new ee;else throw new Error("Unknown prime "+m);return z[m]=E,E};function ne(M){if(typeof M=="string"){var m=s._prime(M);this.m=m.p,this.prime=m}else r(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}ne.prototype._verify1=function(m){r(m.negative===0,"red works only with positives"),r(m.red,"red works only with red numbers")},ne.prototype._verify2=function(m,E){r((m.negative|E.negative)===0,"red works only with positives"),r(m.red&&m.red===E.red,"red works only with red numbers")},ne.prototype.imod=function(m){return this.prime?this.prime.ireduce(m)._forceRed(this):(h(m,m.umod(this.m)._forceRed(this)),m)},ne.prototype.neg=function(m){return m.isZero()?m.clone():this.m.sub(m)._forceRed(this)},ne.prototype.add=function(m,E){this._verify2(m,E);var C=m.add(E);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},ne.prototype.iadd=function(m,E){this._verify2(m,E);var C=m.iadd(E);return C.cmp(this.m)>=0&&C.isub(this.m),C},ne.prototype.sub=function(m,E){this._verify2(m,E);var C=m.sub(E);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},ne.prototype.isub=function(m,E){this._verify2(m,E);var C=m.isub(E);return C.cmpn(0)<0&&C.iadd(this.m),C},ne.prototype.shl=function(m,E){return this._verify1(m),this.imod(m.ushln(E))},ne.prototype.imul=function(m,E){return this._verify2(m,E),this.imod(m.imul(E))},ne.prototype.mul=function(m,E){return this._verify2(m,E),this.imod(m.mul(E))},ne.prototype.isqr=function(m){return this.imul(m,m.clone())},ne.prototype.sqr=function(m){return this.mul(m,m)},ne.prototype.sqrt=function(m){if(m.isZero())return m.clone();var E=this.m.andln(3);if(r(E%2===1),E===3){var C=this.m.add(new s(1)).iushrn(2);return this.pow(m,C)}for(var N=this.m.subn(1),P=0;!N.isZero()&&N.andln(1)===0;)P++,N.iushrn(1);r(!N.isZero());var B=new s(1).toRed(this),O=B.redNeg(),j=this.m.subn(1).iushrn(1),v=this.m.bitLength();for(v=new s(2*v*v).toRed(this);this.pow(v,j).cmp(O)!==0;)v.redIAdd(O);for(var k=this.pow(v,N),X=this.pow(m,N.addn(1).iushrn(1)),re=this.pow(m,N),ue=P;re.cmp(B)!==0;){for(var pe=re,we=0;pe.cmp(B)!==0;we++)pe=pe.redSqr();r(we<ue);var Ce=this.pow(k,new s(1).iushln(ue-we-1));X=X.redMul(Ce),k=Ce.redSqr(),re=re.redMul(k),ue=we}return X},ne.prototype.invm=function(m){var E=m._invmp(this.m);return E.negative!==0?(E.negative=0,this.imod(E).redNeg()):this.imod(E)},ne.prototype.pow=function(m,E){if(E.isZero())return new s(1).toRed(this);if(E.cmpn(1)===0)return m.clone();var C=4,N=new Array(1<<C);N[0]=new s(1).toRed(this),N[1]=m;for(var P=2;P<N.length;P++)N[P]=this.mul(N[P-1],m);var B=N[0],O=0,j=0,v=E.bitLength()%26;for(v===0&&(v=26),P=E.length-1;P>=0;P--){for(var k=E.words[P],X=v-1;X>=0;X--){var re=k>>X&1;if(B!==N[0]&&(B=this.sqr(B)),re===0&&O===0){j=0;continue}O<<=1,O|=re,j++,!(j!==C&&(P!==0||X!==0))&&(B=this.mul(B,N[O]),j=0,O=0)}v=26}return B},ne.prototype.convertTo=function(m){var E=m.umod(this.m);return E===m?E.clone():E},ne.prototype.convertFrom=function(m){var E=m.clone();return E.red=null,E},s.mont=function(m){return new J(m)};function J(M){ne.call(this,M),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(J,ne),J.prototype.convertTo=function(m){return this.imod(m.ushln(this.shift))},J.prototype.convertFrom=function(m){var E=this.imod(m.mul(this.rinv));return E.red=null,E},J.prototype.imul=function(m,E){if(m.isZero()||E.isZero())return m.words[0]=0,m.length=1,m;var C=m.imul(E),N=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=C.isub(N).iushrn(this.shift),B=P;return P.cmp(this.m)>=0?B=P.isub(this.m):P.cmpn(0)<0&&(B=P.iadd(this.m)),B._forceRed(this)},J.prototype.mul=function(m,E){if(m.isZero()||E.isZero())return new s(0)._forceRed(this);
706var C=m.mul(E),N=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=C.isub(N).iushrn(this.shift),B=P;return P.cmp(this.m)>=0?B=P.isub(this.m):P.cmpn(0)<0&&(B=P.iadd(this.m)),B._forceRed(this)},J.prototype.invm=function(m){var E=this.imod(m._invmp(this.m).mul(this.r2));return E._forceRed(this)}})(e,Rxe)})(U5)),U5.exports}var Nxe=Mxe();const $M=va(Nxe);var v5={exports:{}};var UM;function hU(){return UM||(UM=1,(function(e,t){var n=wE(),r=n.Buffer;function i(o,a){for(var c in o)a[c]=o[c]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=s);function s(o,a,c){return r(o,a,c)}s.prototype=Object.create(r.prototype),i(r,s),s.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,a,c)},s.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var d=r(o);return a!==void 0?typeof c=="string"?d.fill(a,c):d.fill(a):d.fill(0),d},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(o)}})(v5,v5.exports)),v5.exports}var v_,zM;function jxe(){if(zM)return v_;zM=1;var e=hU().Buffer;function t(n){if(n.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),i=0;i<r.length;i++)r[i]=255;for(var s=0;s<n.length;s++){var o=n.charAt(s),a=o.charCodeAt(0);if(r[a]!==255)throw new TypeError(o+" is ambiguous");r[a]=s}var c=n.length,d=n.charAt(0),h=Math.log(c)/Math.log(256),y=Math.log(256)/Math.log(c);function g(S){if((Array.isArray(S)||S instanceof Uint8Array)&&(S=e.from(S)),!e.isBuffer(S))throw new TypeError("Expected Buffer");if(S.length===0)return"";for(var I=0,L=0,D=0,F=S.length;D!==F&&S[D]===0;)D++,I++;for(var $=(F-D)*y+1>>>0,z=new Uint8Array($);D!==F;){for(var V=S[D],K=0,te=$-1;(V!==0||K<L)&&te!==-1;te--,K++)V+=256*z[te]>>>0,z[te]=V%c>>>0,V=V/c>>>0;if(V!==0)throw new Error("Non-zero carry");L=K,D++}for(var Q=$-L;Q!==$&&z[Q]===0;)Q++;for(var ee=d.repeat(I);Q<$;++Q)ee+=n.charAt(z[Q]);return ee}function x(S){if(typeof S!="string")throw new TypeError("Expected String");if(S.length===0)return e.alloc(0);for(var I=0,L=0,D=0;S[I]===d;)L++,I++;for(var F=(S.length-I)*h+1>>>0,$=new Uint8Array(F);I<S.length;){var z=S.charCodeAt(I);if(z>255)return;var V=r[z];if(V===255)return;for(var K=0,te=F-1;(V!==0||K<D)&&te!==-1;te--,K++)V+=c*$[te]>>>0,$[te]=V%256>>>0,V=V/256>>>0;if(V!==0)throw new Error("Non-zero carry");D=K,I++}for(var Q=F-D;Q!==F&&$[Q]===0;)Q++;var ee=e.allocUnsafe(L+(F-Q));ee.fill(0,0,L);for(var ne=L;Q!==F;)ee[ne++]=$[Q++];return ee}function _(S){var I=x(S);if(I)return I;throw new Error("Non-base"+c+" character")}return{encode:g,decodeUnsafe:x,decode:_}}return v_=t,v_}var w_,VM;function Pxe(){if(VM)return w_;VM=1;var e=jxe(),t="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";return w_=e(t),w_}var Oxe=Pxe();const us=va(Oxe);function Lxe(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(n>>i&s),a=Number(n&s),c=r?4:0,d=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+d,a,r)}const Bxe=(e,t,n)=>e&t^~e&n,Fxe=(e,t,n)=>e&t^e&n^t&n;class Dxe extends xre{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=T8(this.buffer)}update(t){cI(this);const{view:n,buffer:r,blockLen:i}=this;t=_L(t);const s=t.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=T8(t);for(;i<=s-o;o+=i)this.process(c,o);continue}r.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){cI(this),mre(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:s}=this;let{pos:o}=this;n[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(r,0),o=0);for(let y=o;y<i;y++)n[y]=0;Lxe(r,i-8,BigInt(this.length*8),s),this.process(r,0);const a=T8(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=c/4,h=this.get();if(d>h.length)throw new Error("_sha2: outputLen bigger than state");for(let y=0;y<d;y++)a.setUint32(4*y,h[y],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:s,destroyed:o,pos:a}=this;return t.length=i,t.pos=a,t.finished=s,t.destroyed=o,i%n&&t.buffer.set(r),t}}
vendor: 16,632 bytes, line 706
706const $xe=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]),gf=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),bf=new Uint32Array(64);class Uxe extends Dxe{constructor(){super(64,32,8,!1),this.A=gf[0]|0,this.B=gf[1]|0,this.C=gf[2]|0,this.D=gf[3]|0,this.E=gf[4]|0,this.F=gf[5]|0,this.G=gf[6]|0,this.H=gf[7]|0}get(){const{A:t,B:n,C:r,D:i,E:s,F:o,G:a,H:c}=this;return[t,n,r,i,s,o,a,c]}set(t,n,r,i,s,o,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(t,n){for(let y=0;y<16;y++,n+=4)bf[y]=t.getUint32(n,!1);for(let y=16;y<64;y++){const g=bf[y-15],x=bf[y-2],_=Su(g,7)^Su(g,18)^g>>>3,S=Su(x,17)^Su(x,19)^x>>>10;bf[y]=S+bf[y-7]+_+bf[y-16]|0}let{A:r,B:i,C:s,D:o,E:a,F:c,G:d,H:h}=this;for(let y=0;y<64;y++){const g=Su(a,6)^Su(a,11)^Su(a,25),x=h+g+Bxe(a,c,d)+$xe[y]+bf[y]|0,S=(Su(r,2)^Su(r,13)^Su(r,22))+Fxe(r,i,s)|0;h=d,d=c,c=a,a=o+x|0,o=s,s=i,i=r,r=x+S|0}r=r+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,i,s,o,a,c,d,h)}roundClean(){bf.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const qM=vre(()=>new Uxe);var mr={},z5={exports:{}},zxe=z5.exports,HM;function Vxe(){return HM||(HM=1,(function(e){(function(t,n){function r(M,m){if(!M)throw new Error(m||"Assertion failed")}function i(M,m){M.super_=m;var E=function(){};E.prototype=m.prototype,M.prototype=new E,M.prototype.constructor=M}function s(M,m,E){if(s.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((m==="le"||m==="be")&&(E=m,m=10),this._init(M||0,m||10,E||"be"))}typeof t=="object"?t.exports=s:n.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=wE().Buffer}catch{}s.isBN=function(m){return m instanceof s?!0:m!==null&&typeof m=="object"&&m.constructor.wordSize===s.wordSize&&Array.isArray(m.words)},s.max=function(m,E){return m.cmp(E)>0?m:E},s.min=function(m,E){return m.cmp(E)<0?m:E},s.prototype._init=function(m,E,C){if(typeof m=="number")return this._initNumber(m,E,C);if(typeof m=="object")return this._initArray(m,E,C);E==="hex"&&(E=16),r(E===(E|0)&&E>=2&&E<=36),m=m.toString().replace(/\s+/g,"");var N=0;m[0]==="-"&&(N++,this.negative=1),N<m.length&&(E===16?this._parseHex(m,N,C):(this._parseBase(m,E,N),C==="le"&&this._initArray(this.toArray(),E,C)))},s.prototype._initNumber=function(m,E,C){m<0&&(this.negative=1,m=-m),m<67108864?(this.words=[m&67108863],this.length=1):m<4503599627370496?(this.words=[m&67108863,m/67108864&67108863],this.length=2):(r(m<9007199254740992),this.words=[m&67108863,m/67108864&67108863,1],this.length=3),C==="le"&&this._initArray(this.toArray(),E,C)},s.prototype._initArray=function(m,E,C){if(r(typeof m.length=="number"),m.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(m.length/3),this.words=new Array(this.length);for(var N=0;N<this.length;N++)this.words[N]=0;var P,B,O=0;if(C==="be")for(N=m.length-1,P=0;N>=0;N-=3)B=m[N]|m[N-1]<<8|m[N-2]<<16,this.words[P]|=B<<O&67108863,this.words[P+1]=B>>>26-O&67108863,O+=24,O>=26&&(O-=26,P++);else if(C==="le")for(N=0,P=0;N<m.length;N+=3)B=m[N]|m[N+1]<<8|m[N+2]<<16,this.words[P]|=B<<O&67108863,this.words[P+1]=B>>>26-O&67108863,O+=24,O>=26&&(O-=26,P++);return this._strip()};function a(M,m){var E=M.charCodeAt(m);if(E>=48&&E<=57)return E-48;if(E>=65&&E<=70)return E-55;if(E>=97&&E<=102)return E-87;r(!1,"Invalid character in "+M)}function c(M,m,E){var C=a(M,E);return E-1>=m&&(C|=a(M,E-1)<<4),C}s.prototype._parseHex=function(m,E,C){this.length=Math.ceil((m.length-E)/6),this.words=new Array(this.length);for(var N=0;N<this.length;N++)this.words[N]=0;var P=0,B=0,O;if(C==="be")for(N=m.length-1;N>=E;N-=2)O=c(m,E,N)<<P,this.words[B]|=O&67108863,P>=18?(P-=18,B+=1,this.words[B]|=O>>>26):P+=8;else{var j=m.length-E;for(N=j%2===0?E+1:E;N<m.length;N+=2)O=c(m,E,N)<<P,this.words[B]|=O&67108863,P>=18?(P-=18,B+=1,this.words[B]|=O>>>26):P+=8}this._strip()};function d(M,m,E,C){for(var N=0,P=0,B=Math.min(M.length,E),O=m;O<B;O++){var j=M.charCodeAt(O)-48;N*=C,j>=49?P=j-49+10:j>=17?P=j-17+10:P=j,r(j>=0&&P<C,"Invalid character"),N+=P}return N}s.prototype._parseBase=function(m,E,C){this.words=[0],this.length=1;for(var N=0,P=1;P<=67108863;P*=E)N++;N--,P=P/E|0;for(var B=m.length-C,O=B%N,j=Math.min(B,B-O)+C,v=0,k=C;k<j;k+=N)v=d(m,k,k+N,E),this.imuln(P),this.words[0]+v<67108864?this.words[0]+=v:this._iaddn(v);if(O!==0){var X=1;for(v=d(m,k,m.length,E),k=0;k<O;k++)X*=E;this.imuln(X),this.words[0]+v<67108864?this.words[0]+=v:this._iaddn(v)}this._strip()},s.prototype.copy=function(m){m.words=new Array(this.length);for(var E=0;E<this.length;E++)m.words[E]=this.words[E];m.length=this.length,m.negative=this.negative,m.red=this.red};function h(M,m){M.words=m.words,M.length=m.length,M.negative=m.negative,M.red=m.red}if(s.prototype._move=function(m){h(m,this)},s.prototype.clone=function(){var m=new s(null);return this.copy(m),m},s.prototype._expand=function(m){for(;this.length<m;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=y}catch{s.prototype.inspect=y}else s.prototype.inspect=y;function y(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var g=["","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"],x=[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],_=[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(m,E){m=m||10,E=E|0||1;var C;if(m===16||m==="hex"){C="";for(var N=0,P=0,B=0;B<this.length;B++){var O=this.words[B],j=((O<<N|P)&16777215).toString(16);P=O>>>24-N&16777215,N+=2,N>=26&&(N-=26,B--),P!==0||B!==this.length-1?C=g[6-j.length]+j+C:C=j+C}for(P!==0&&(C=P.toString(16)+C);C.length%E!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(m===(m|0)&&m>=2&&m<=36){var v=x[m],k=_[m];C="";var X=this.clone();for(X.negative=0;!X.isZero();){var re=X.modrn(k).toString(m);X=X.idivn(k),X.isZero()?C=re+C:C=g[v-re.length]+re+C}for(this.isZero()&&(C="0"+C);C.length%E!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var m=this.words[0];return this.length===2?m+=this.words[1]*67108864:this.length===3&&this.words[2]===1?m+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-m:m},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(m,E){return this.toArrayLike(o,m,E)}),s.prototype.toArray=function(m,E){return this.toArrayLike(Array,m,E)};var S=function(m,E){return m.allocUnsafe?m.allocUnsafe(E):new m(E)};s.prototype.toArrayLike=function(m,E,C){this._strip();var N=this.byteLength(),P=C||Math.max(1,N);r(N<=P,"byte array longer than desired length"),r(P>0,"Requested array length <= 0");var B=S(m,P),O=E==="le"?"LE":"BE";return this["_toArrayLike"+O](B,N),B},s.prototype._toArrayLikeLE=function(m,E){for(var C=0,N=0,P=0,B=0;P<this.length;P++){var O=this.words[P]<<B|N;m[C++]=O&255,C<m.length&&(m[C++]=O>>8&255),C<m.length&&(m[C++]=O>>16&255),B===6?(C<m.length&&(m[C++]=O>>24&255),N=0,B=0):(N=O>>>24,B+=2)}if(C<m.length)for(m[C++]=N;C<m.length;)m[C++]=0},s.prototype._toArrayLikeBE=function(m,E){for(var C=m.length-1,N=0,P=0,B=0;P<this.length;P++){var O=this.words[P]<<B|N;m[C--]=O&255,C>=0&&(m[C--]=O>>8&255),C>=0&&(m[C--]=O>>16&255),B===6?(C>=0&&(m[C--]=O>>24&255),N=0,B=0):(N=O>>>24,B+=2)}if(C>=0)for(m[C--]=N;C>=0;)m[C--]=0},Math.clz32?s.prototype._countBits=function(m){return 32-Math.clz32(m)}:s.prototype._countBits=function(m){var E=m,C=0;return E>=4096&&(C+=13,E>>>=13),E>=64&&(C+=7,E>>>=7),E>=8&&(C+=4,E>>>=4),E>=2&&(C+=2,E>>>=2),C+E},s.prototype._zeroBits=function(m){if(m===0)return 26;var E=m,C=0;return(E&8191)===0&&(C+=13,E>>>=13),(E&127)===0&&(C+=7,E>>>=7),(E&15)===0&&(C+=4,E>>>=4),(E&3)===0&&(C+=2,E>>>=2),(E&1)===0&&C++,C},s.prototype.bitLength=function(){var m=this.words[this.length-1],E=this._countBits(m);return(this.length-1)*26+E};function I(M){for(var m=new Array(M.bitLength()),E=0;E<m.length;E++){var C=E/26|0,N=E%26;m[E]=M.words[C]>>>N&1}return m}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var m=0,E=0;E<this.length;E++){var C=this._zeroBits(this.words[E]);if(m+=C,C!==26)break}return m},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(m){return this.negative!==0?this.abs().inotn(m).iaddn(1):this.clone()},s.prototype.fromTwos=function(m){return this.testn(m-1)?this.notn(m).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(m){for(;this.length<m.length;)this.words[this.length++]=0;for(var E=0;E<m.length;E++)this.words[E]=this.words[E]|m.words[E];return this._strip()},s.prototype.ior=function(m){return r((this.negative|m.negative)===0),this.iuor(m)},s.prototype.or=function(m){return this.length>m.length?this.clone().ior(m):m.clone().ior(this)},s.prototype.uor=function(m){return this.length>m.length?this.clone().iuor(m):m.clone().iuor(this)},s.prototype.iuand=function(m){var E;this.length>m.length?E=m:E=this;for(var C=0;C<E.length;C++)this.words[C]=this.words[C]&m.words[C];return this.length=E.length,this._strip()},s.prototype.iand=function(m){return r((this.negative|m.negative)===0),this.iuand(m)},s.prototype.and=function(m){return this.length>m.length?this.clone().iand(m):m.clone().iand(this)},s.prototype.uand=function(m){return this.length>m.length?this.clone().iuand(m):m.clone().iuand(this)},s.prototype.iuxor=function(m){var E,C;this.length>m.length?(E=this,C=m):(E=m,C=this);for(var N=0;N<C.length;N++)this.words[N]=E.words[N]^C.words[N];if(this!==E)for(;N<E.length;N++)this.words[N]=E.words[N];return this.length=E.length,this._strip()},s.prototype.ixor=function(m){return r((this.negative|m.negative)===0),this.iuxor(m)},s.prototype.xor=function(m){return this.length>m.length?this.clone().ixor(m):m.clone().ixor(this)},s.prototype.uxor=function(m){return this.length>m.length?this.clone().iuxor(m):m.clone().iuxor(this)},s.prototype.inotn=function(m){r(typeof m=="number"&&m>=0);var E=Math.ceil(m/26)|0,C=m%26;this._expand(E),C>0&&E--;for(var N=0;N<E;N++)this.words[N]=~this.words[N]&67108863;return C>0&&(this.words[N]=~this.words[N]&67108863>>26-C),this._strip()},s.prototype.notn=function(m){return this.clone().inotn(m)},s.prototype.setn=function(m,E){r(typeof m=="number"&&m>=0);var C=m/26|0,N=m%26;return this._expand(C+1),E?this.words[C]=this.words[C]|1<<N:this.words[C]=this.words[C]&~(1<<N),this._strip()},s.prototype.iadd=function(m){var E;if(this.negative!==0&&m.negative===0)return this.negative=0,E=this.isub(m),this.negative^=1,this._normSign();if(this.negative===0&&m.negative!==0)return m.negative=0,E=this.isub(m),m.negative=1,E._normSign();var C,N;this.length>m.length?(C=this,N=m):(C=m,N=this);for(var P=0,B=0;B<N.length;B++)E=(C.words[B]|0)+(N.words[B]|0)+P,this.words[B]=E&67108863,P=E>>>26;for(;P!==0&&B<C.length;B++)E=(C.words[B]|0)+P,this.words[B]=E&67108863,P=E>>>26;if(this.length=C.length,P!==0)this.words[this.length]=P,this.length++;else if(C!==this)for(;B<C.length;B++)this.words[B]=C.words[B];return this},s.prototype.add=function(m){var E;return m.negative!==0&&this.negative===0?(m.negative=0,E=this.sub(m),m.negative^=1,E):m.negative===0&&this.negative!==0?(this.negative=0,E=m.sub(this),this.negative=1,E):this.length>m.length?this.clone().iadd(m):m.clone().iadd(this)},s.prototype.isub=function(m){if(m.negative!==0){m.negative=0;var E=this.iadd(m);return m.negative=1,E._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(m),this.negative=1,this._normSign();var C=this.cmp(m);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var N,P;C>0?(N=this,P=m):(N=m,P=this);for(var B=0,O=0;O<P.length;O++)E=(N.words[O]|0)-(P.words[O]|0)+B,B=E>>26,this.words[O]=E&67108863;for(;B!==0&&O<N.length;O++)E=(N.words[O]|0)+B,B=E>>26,this.words[O]=E&67108863;if(B===0&&O<N.length&&N!==this)for(;O<N.length;O++)this.words[O]=N.words[O];return this.length=Math.max(this.length,O),N!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(m){return this.clone().isub(m)};function L(M,m,E){E.negative=m.negative^M.negative;var C=M.length+m.length|0;E.length=C,C=C-1|0;var N=M.words[0]|0,P=m.words[0]|0,B=N*P,O=B&67108863,j=B/67108864|0;E.words[0]=O;for(var v=1;v<C;v++){for(var k=j>>>26,X=j&67108863,re=Math.min(v,m.length-1),ue=Math.max(0,v-M.length+1);ue<=re;ue++){var pe=v-ue|0;N=M.words[pe]|0,P=m.words[ue]|0,B=N*P+X,k+=B/67108864|0,X=B&67108863}E.words[v]=X|0,j=k|0}return j!==0?E.words[v]=j|0:E.length--,E._strip()}var D=function(m,E,C){var N=m.words,P=E.words,B=C.words,O=0,j,v,k,X=N[0]|0,re=X&8191,ue=X>>>13,pe=N[1]|0,we=pe&8191,Ce=pe>>>13,St=N[2]|0,Ve=St&8191,et=St>>>13,lt=N[3]|0,tt=lt&8191,ut=lt>>>13,nr=N[4]|0,Rt=nr&8191,Qt=nr>>>13,Ls=N[5]|0,Ft=Ls&8191,Mt=Ls>>>13,Dn=N[6]|0,At=Dn&8191,Wt=Dn>>>13,xr=N[7]|0,Yt=xr&8191,Ut=xr>>>13,pr=N[8]|0,$t=pr&8191,se=pr>>>13,H=N[9]|0,Y=H&8191,le=H>>>13,xe=P[0]|0,Se=xe&8191,Re=xe>>>13,Zt=P[1]|0,ht=Zt&8191,pt=Zt>>>13,$n=P[2]|0,at=$n&8191,zt=$n>>>13,si=P[3]|0,tn=si&8191,un=si>>>13,Mi=P[4]|0,an=Mi&8191,oe=Mi>>>13,G=P[5]|0,Z=G&8191,de=G>>>13,Ee=P[6]|0,Te=Ee&8191,Me=Ee>>>13,nn=P[7]|0,wt=nn&8191,xt=nn>>>13,rr=P[8]|0,yt=rr&8191,bn=rr>>>13,Bs=P[9]|0,hn=Bs&8191,mn=Bs>>>13;C.negative=m.negative^E.negative,C.length=19,j=Math.imul(re,Se),v=Math.imul(re,Re),v=v+Math.imul(ue,Se)|0,k=Math.imul(ue,Re);var lc=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(lc>>>26)|0,lc&=67108863,j=Math.imul(we,Se),v=Math.imul(we,Re),v=v+Math.imul(Ce,Se)|0,k=Math.imul(Ce,Re),j=j+Math.imul(re,ht)|0,v=v+Math.imul(re,pt)|0,v=v+Math.imul(ue,ht)|0,k=k+Math.imul(ue,pt)|0;var Ta=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Ta>>>26)|0,Ta&=67108863,j=Math.imul(Ve,Se),v=Math.imul(Ve,Re),v=v+Math.imul(et,Se)|0,k=Math.imul(et,Re),j=j+Math.imul(we,ht)|0,v=v+Math.imul(we,pt)|0,v=v+Math.imul(Ce,ht)|0,k=k+Math.imul(Ce,pt)|0,j=j+Math.imul(re,at)|0,v=v+Math.imul(re,zt)|0,v=v+Math.imul(ue,at)|0,k=k+Math.imul(ue,zt)|0;var Aa=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,j=Math.imul(tt,Se),v=Math.imul(tt,Re),v=v+Math.imul(ut,Se)|0,k=Math.imul(ut,Re),j=j+Math.imul(Ve,ht)|0,v=v+Math.imul(Ve,pt)|0,v=v+Math.imul(et,ht)|0,k=k+Math.imul(et,pt)|0,j=j+Math.imul(we,at)|0,v=v+Math.imul(we,zt)|0,v=v+Math.imul(Ce,at)|0,k=k+Math.imul(Ce,zt)|0,j=j+Math.imul(re,tn)|0,v=v+Math.imul(re,un)|0,v=v+Math.imul(ue,tn)|0,k=k+Math.imul(ue,un)|0;var ka=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(ka>>>26)|0,ka&=67108863,j=Math.imul(Rt,Se),v=Math.imul(Rt,Re),v=v+Math.imul(Qt,Se)|0,k=Math.imul(Qt,Re),j=j+Math.imul(tt,ht)|0,v=v+Math.imul(tt,pt)|0,v=v+Math.imul(ut,ht)|0,k=k+Math.imul(ut,pt)|0,j=j+Math.imul(Ve,at)|0,v=v+Math.imul(Ve,zt)|0,v=v+Math.imul(et,at)|0,k=k+Math.imul(et,zt)|0,j=j+Math.imul(we,tn)|0,v=v+Math.imul(we,un)|0,v=v+Math.imul(Ce,tn)|0,k=k+Math.imul(Ce,un)|0,j=j+Math.imul(re,an)|0,v=v+Math.imul(re,oe)|0,v=v+Math.imul(ue,an)|0,k=k+Math.imul(ue,oe)|0;
706var Ca=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Ca>>>26)|0,Ca&=67108863,j=Math.imul(Ft,Se),v=Math.imul(Ft,Re),v=v+Math.imul(Mt,Se)|0,k=Math.imul(Mt,Re),j=j+Math.imul(Rt,ht)|0,v=v+Math.imul(Rt,pt)|0,v=v+Math.imul(Qt,ht)|0,k=k+Math.imul(Qt,pt)|0,j=j+Math.imul(tt,at)|0,v=v+Math.imul(tt,zt)|0,v=v+Math.imul(ut,at)|0,k=k+Math.imul(ut,zt)|0,j=j+Math.imul(Ve,tn)|0,v=v+Math.imul(Ve,un)|0,v=v+Math.imul(et,tn)|0,k=k+Math.imul(et,un)|0,j=j+Math.imul(we,an)|0,v=v+Math.imul(we,oe)|0,v=v+Math.imul(Ce,an)|0,k=k+Math.imul(Ce,oe)|0,j=j+Math.imul(re,Z)|0,v=v+Math.imul(re,de)|0,v=v+Math.imul(ue,Z)|0,k=k+Math.imul(ue,de)|0;var uo=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(uo>>>26)|0,uo&=67108863,j=Math.imul(At,Se),v=Math.imul(At,Re),v=v+Math.imul(Wt,Se)|0,k=Math.imul(Wt,Re),j=j+Math.imul(Ft,ht)|0,v=v+Math.imul(Ft,pt)|0,v=v+Math.imul(Mt,ht)|0,k=k+Math.imul(Mt,pt)|0,j=j+Math.imul(Rt,at)|0,v=v+Math.imul(Rt,zt)|0,v=v+Math.imul(Qt,at)|0,k=k+Math.imul(Qt,zt)|0,j=j+Math.imul(tt,tn)|0,v=v+Math.imul(tt,un)|0,v=v+Math.imul(ut,tn)|0,k=k+Math.imul(ut,un)|0,j=j+Math.imul(Ve,an)|0,v=v+Math.imul(Ve,oe)|0,v=v+Math.imul(et,an)|0,k=k+Math.imul(et,oe)|0,j=j+Math.imul(we,Z)|0,v=v+Math.imul(we,de)|0,v=v+Math.imul(Ce,Z)|0,k=k+Math.imul(Ce,de)|0,j=j+Math.imul(re,Te)|0,v=v+Math.imul(re,Me)|0,v=v+Math.imul(ue,Te)|0,k=k+Math.imul(ue,Me)|0;var dc=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(dc>>>26)|0,dc&=67108863,j=Math.imul(Yt,Se),v=Math.imul(Yt,Re),v=v+Math.imul(Ut,Se)|0,k=Math.imul(Ut,Re),j=j+Math.imul(At,ht)|0,v=v+Math.imul(At,pt)|0,v=v+Math.imul(Wt,ht)|0,k=k+Math.imul(Wt,pt)|0,j=j+Math.imul(Ft,at)|0,v=v+Math.imul(Ft,zt)|0,v=v+Math.imul(Mt,at)|0,k=k+Math.imul(Mt,zt)|0,j=j+Math.imul(Rt,tn)|0,v=v+Math.imul(Rt,un)|0,v=v+Math.imul(Qt,tn)|0,k=k+Math.imul(Qt,un)|0,j=j+Math.imul(tt,an)|0,v=v+Math.imul(tt,oe)|0,v=v+Math.imul(ut,an)|0,k=k+Math.imul(ut,oe)|0,j=j+Math.imul(Ve,Z)|0,v=v+Math.imul(Ve,de)|0,v=v+Math.imul(et,Z)|0,k=k+Math.imul(et,de)|0,j=j+Math.imul(we,Te)|0,v=v+Math.imul(we,Me)|0,v=v+Math.imul(Ce,Te)|0,k=k+Math.imul(Ce,Me)|0,j=j+Math.imul(re,wt)|0,v=v+Math.imul(re,xt)|0,v=v+Math.imul(ue,wt)|0,k=k+Math.imul(ue,xt)|0;var Wn=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,j=Math.imul($t,Se),v=Math.imul($t,Re),v=v+Math.imul(se,Se)|0,k=Math.imul(se,Re),j=j+Math.imul(Yt,ht)|0,v=v+Math.imul(Yt,pt)|0,v=v+Math.imul(Ut,ht)|0,k=k+Math.imul(Ut,pt)|0,j=j+Math.imul(At,at)|0,v=v+Math.imul(At,zt)|0,v=v+Math.imul(Wt,at)|0,k=k+Math.imul(Wt,zt)|0,j=j+Math.imul(Ft,tn)|0,v=v+Math.imul(Ft,un)|0,v=v+Math.imul(Mt,tn)|0,k=k+Math.imul(Mt,un)|0,j=j+Math.imul(Rt,an)|0,v=v+Math.imul(Rt,oe)|0,v=v+Math.imul(Qt,an)|0,k=k+Math.imul(Qt,oe)|0,j=j+Math.imul(tt,Z)|0,v=v+Math.imul(tt,de)|0,v=v+Math.imul(ut,Z)|0,k=k+Math.imul(ut,de)|0,j=j+Math.imul(Ve,Te)|0,v=v+Math.imul(Ve,Me)|0,v=v+Math.imul(et,Te)|0,k=k+Math.imul(et,Me)|0,j=j+Math.imul(we,wt)|0,v=v+Math.imul(we,xt)|0,v=v+Math.imul(Ce,wt)|0,k=k+Math.imul(Ce,xt)|0,j=j+Math.imul(re,yt)|0,v=v+Math.imul(re,bn)|0,v=v+Math.imul(ue,yt)|0,k=k+Math.imul(ue,bn)|0;var fc=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(fc>>>26)|0,fc&=67108863,j=Math.imul(Y,Se),v=Math.imul(Y,Re),v=v+Math.imul(le,Se)|0,k=Math.imul(le,Re),j=j+Math.imul($t,ht)|0,v=v+Math.imul($t,pt)|0,v=v+Math.imul(se,ht)|0,k=k+Math.imul(se,pt)|0,j=j+Math.imul(Yt,at)|0,v=v+Math.imul(Yt,zt)|0,v=v+Math.imul(Ut,at)|0,k=k+Math.imul(Ut,zt)|0,j=j+Math.imul(At,tn)|0,v=v+Math.imul(At,un)|0,v=v+Math.imul(Wt,tn)|0,k=k+Math.imul(Wt,un)|0,j=j+Math.imul(Ft,an)|0,v=v+Math.imul(Ft,oe)|0,v=v+Math.imul(Mt,an)|0,k=k+Math.imul(Mt,oe)|0,j=j+Math.imul(Rt,Z)|0,v=v+Math.imul(Rt,de)|0,v=v+Math.imul(Qt,Z)|0,k=k+Math.imul(Qt,de)|0,j=j+Math.imul(tt,Te)|0,v=v+Math.imul(tt,Me)|0,v=v+Math.imul(ut,Te)|0,k=k+Math.imul(ut,Me)|0,j=j+Math.imul(Ve,wt)|0,v=v+Math.imul(Ve,xt)|0,v=v+Math.imul(et,wt)|0,k=k+Math.imul(et,xt)|0,j=j+Math.imul(we,yt)|0,v=v+Math.imul(we,bn)|0,v=v+Math.imul(Ce,yt)|0,k=k+Math.imul(Ce,bn)|0,j=j+Math.imul(re,hn)|0,v=v+Math.imul(re,mn)|0,v=v+Math.imul(ue,hn)|0,k=k+Math.imul(ue,mn)|0;var $o=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+($o>>>26)|0,$o&=67108863,j=Math.imul(Y,ht),v=Math.imul(Y,pt),v=v+Math.imul(le,ht)|0,k=Math.imul(le,pt),j=j+Math.imul($t,at)|0,v=v+Math.imul($t,zt)|0,v=v+Math.imul(se,at)|0,k=k+Math.imul(se,zt)|0,j=j+Math.imul(Yt,tn)|0,v=v+Math.imul(Yt,un)|0,v=v+Math.imul(Ut,tn)|0,k=k+Math.imul(Ut,un)|0,j=j+Math.imul(At,an)|0,v=v+Math.imul(At,oe)|0,v=v+Math.imul(Wt,an)|0,k=k+Math.imul(Wt,oe)|0,j=j+Math.imul(Ft,Z)|0,v=v+Math.imul(Ft,de)|0,v=v+Math.imul(Mt,Z)|0,k=k+Math.imul(Mt,de)|0,j=j+Math.imul(Rt,Te)|0,v=v+Math.imul(Rt,Me)|0,v=v+Math.imul(Qt,Te)|0,k=k+Math.imul(Qt,Me)|0,j=j+Math.imul(tt,wt)|0,v=v+Math.imul(tt,xt)|0,v=v+Math.imul(ut,wt)|0,k=k+Math.imul(ut,xt)|0,j=j+Math.imul(Ve,yt)|0,v=v+Math.imul(Ve,bn)|0,v=v+Math.imul(et,yt)|0,k=k+Math.imul(et,bn)|0,j=j+Math.imul(we,hn)|0,v=v+Math.imul(we,mn)|0,v=v+Math.imul(Ce,hn)|0,k=k+Math.imul(Ce,mn)|0;var Ia=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Ia>>>26)|0,Ia&=67108863,j=Math.imul(Y,at),v=Math.imul(Y,zt),v=v+Math.imul(le,at)|0,k=Math.imul(le,zt),j=j+Math.imul($t,tn)|0,v=v+Math.imul($t,un)|0,v=v+Math.imul(se,tn)|0,k=k+Math.imul(se,un)|0,j=j+Math.imul(Yt,an)|0,v=v+Math.imul(Yt,oe)|0,v=v+Math.imul(Ut,an)|0,k=k+Math.imul(Ut,oe)|0,j=j+Math.imul(At,Z)|0,v=v+Math.imul(At,de)|0,v=v+Math.imul(Wt,Z)|0,k=k+Math.imul(Wt,de)|0,j=j+Math.imul(Ft,Te)|0,v=v+Math.imul(Ft,Me)|0,v=v+Math.imul(Mt,Te)|0,k=k+Math.imul(Mt,Me)|0,j=j+Math.imul(Rt,wt)|0,v=v+Math.imul(Rt,xt)|0,v=v+Math.imul(Qt,wt)|0,k=k+Math.imul(Qt,xt)|0,j=j+Math.imul(tt,yt)|0,v=v+Math.imul(tt,bn)|0,v=v+Math.imul(ut,yt)|0,k=k+Math.imul(ut,bn)|0,j=j+Math.imul(Ve,hn)|0,v=v+Math.imul(Ve,mn)|0,v=v+Math.imul(et,hn)|0,k=k+Math.imul(et,mn)|0;var Fs=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Fs>>>26)|0,Fs&=67108863,j=Math.imul(Y,tn),v=Math.imul(Y,un),v=v+Math.imul(le,tn)|0,k=Math.imul(le,un),j=j+Math.imul($t,an)|0,v=v+Math.imul($t,oe)|0,v=v+Math.imul(se,an)|0,k=k+Math.imul(se,oe)|0,j=j+Math.imul(Yt,Z)|0,v=v+Math.imul(Yt,de)|0,v=v+Math.imul(Ut,Z)|0,k=k+Math.imul(Ut,de)|0,j=j+Math.imul(At,Te)|0,v=v+Math.imul(At,Me)|0,v=v+Math.imul(Wt,Te)|0,k=k+Math.imul(Wt,Me)|0,j=j+Math.imul(Ft,wt)|0,v=v+Math.imul(Ft,xt)|0,v=v+Math.imul(Mt,wt)|0,k=k+Math.imul(Mt,xt)|0,j=j+Math.imul(Rt,yt)|0,v=v+Math.imul(Rt,bn)|0,v=v+Math.imul(Qt,yt)|0,k=k+Math.imul(Qt,bn)|0,j=j+Math.imul(tt,hn)|0,v=v+Math.imul(tt,mn)|0,v=v+Math.imul(ut,hn)|0,k=k+Math.imul(ut,mn)|0;var Ra=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Ra>>>26)|0,Ra&=67108863,j=Math.imul(Y,an),v=Math.imul(Y,oe),v=v+Math.imul(le,an)|0,k=Math.imul(le,oe),j=j+Math.imul($t,Z)|0,v=v+Math.imul($t,de)|0,v=v+Math.imul(se,Z)|0,k=k+Math.imul(se,de)|0,j=j+Math.imul(Yt,Te)|0,v=v+Math.imul(Yt,Me)|0,v=v+Math.imul(Ut,Te)|0,k=k+Math.imul(Ut,Me)|0,j=j+Math.imul(At,wt)|0,v=v+Math.imul(At,xt)|0,v=v+Math.imul(Wt,wt)|0,k=k+Math.imul(Wt,xt)|0,j=j+Math.imul(Ft,yt)|0,v=v+Math.imul(Ft,bn)|0,v=v+Math.imul(Mt,yt)|0,k=k+Math.imul(Mt,bn)|0,j=j+Math.imul(Rt,hn)|0,v=v+Math.imul(Rt,mn)|0,v=v+Math.imul(Qt,hn)|0,k=k+Math.imul(Qt,mn)|0;var Uo=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Uo>>>26)|0,Uo&=67108863,j=Math.imul(Y,Z),v=Math.imul(Y,de),v=v+Math.imul(le,Z)|0,k=Math.imul(le,de),j=j+Math.imul($t,Te)|0,v=v+Math.imul($t,Me)|0,v=v+Math.imul(se,Te)|0,k=k+Math.imul(se,Me)|0,j=j+Math.imul(Yt,wt)|0,v=v+Math.imul(Yt,xt)|0,v=v+Math.imul(Ut,wt)|0,k=k+Math.imul(Ut,xt)|0,j=j+Math.imul(At,yt)|0,v=v+Math.imul(At,bn)|0,v=v+Math.imul(Wt,yt)|0,k=k+Math.imul(Wt,bn)|0,j=j+Math.imul(Ft,hn)|0,v=v+Math.imul(Ft,mn)|0,v=v+Math.imul(Mt,hn)|0,k=k+Math.imul(Mt,mn)|0;var lo=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(lo>>>26)|0,lo&=67108863,j=Math.imul(Y,Te),v=Math.imul(Y,Me),v=v+Math.imul(le,Te)|0,k=Math.imul(le,Me),j=j+Math.imul($t,wt)|0,v=v+Math.imul($t,xt)|0,v=v+Math.imul(se,wt)|0,k=k+Math.imul(se,xt)|0,j=j+Math.imul(Yt,yt)|0,v=v+Math.imul(Yt,bn)|0,v=v+Math.imul(Ut,yt)|0,k=k+Math.imul(Ut,bn)|0,j=j+Math.imul(At,hn)|0,v=v+Math.imul(At,mn)|0,v=v+Math.imul(Wt,hn)|0,k=k+Math.imul(Wt,mn)|0;var Ei=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(Ei>
vendor: 26,273 bytes, line 706
706>>26)|0,Ei&=67108863,j=Math.imul(Y,wt),v=Math.imul(Y,xt),v=v+Math.imul(le,wt)|0,k=Math.imul(le,xt),j=j+Math.imul($t,yt)|0,v=v+Math.imul($t,bn)|0,v=v+Math.imul(se,yt)|0,k=k+Math.imul(se,bn)|0,j=j+Math.imul(Yt,hn)|0,v=v+Math.imul(Yt,mn)|0,v=v+Math.imul(Ut,hn)|0,k=k+Math.imul(Ut,mn)|0;var hc=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(hc>>>26)|0,hc&=67108863,j=Math.imul(Y,yt),v=Math.imul(Y,bn),v=v+Math.imul(le,yt)|0,k=Math.imul(le,bn),j=j+Math.imul($t,hn)|0,v=v+Math.imul($t,mn)|0,v=v+Math.imul(se,hn)|0,k=k+Math.imul(se,mn)|0;var oi=(O+j|0)+((v&8191)<<13)|0;O=(k+(v>>>13)|0)+(oi>>>26)|0,oi&=67108863,j=Math.imul(Y,hn),v=Math.imul(Y,mn),v=v+Math.imul(le,hn)|0,k=Math.imul(le,mn);var Ma=(O+j|0)+((v&8191)<<13)|0;return O=(k+(v>>>13)|0)+(Ma>>>26)|0,Ma&=67108863,B[0]=lc,B[1]=Ta,B[2]=Aa,B[3]=ka,B[4]=Ca,B[5]=uo,B[6]=dc,B[7]=Wn,B[8]=fc,B[9]=$o,B[10]=Ia,B[11]=Fs,B[12]=Ra,B[13]=Uo,B[14]=lo,B[15]=Ei,B[16]=hc,B[17]=oi,B[18]=Ma,O!==0&&(B[19]=O,C.length++),C};Math.imul||(D=L);function F(M,m,E){E.negative=m.negative^M.negative,E.length=M.length+m.length;for(var C=0,N=0,P=0;P<E.length-1;P++){var B=N;N=0;for(var O=C&67108863,j=Math.min(P,m.length-1),v=Math.max(0,P-M.length+1);v<=j;v++){var k=P-v,X=M.words[k]|0,re=m.words[v]|0,ue=X*re,pe=ue&67108863;B=B+(ue/67108864|0)|0,pe=pe+O|0,O=pe&67108863,B=B+(pe>>>26)|0,N+=B>>>26,B&=67108863}E.words[P]=O,C=B,B=N}return C!==0?E.words[P]=C:E.length--,E._strip()}function $(M,m,E){return F(M,m,E)}s.prototype.mulTo=function(m,E){var C,N=this.length+m.length;return this.length===10&&m.length===10?C=D(this,m,E):N<63?C=L(this,m,E):N<1024?C=F(this,m,E):C=$(this,m,E),C},s.prototype.mul=function(m){var E=new s(null);return E.words=new Array(this.length+m.length),this.mulTo(m,E)},s.prototype.mulf=function(m){var E=new s(null);return E.words=new Array(this.length+m.length),$(this,m,E)},s.prototype.imul=function(m){return this.clone().mulTo(m,this)},s.prototype.imuln=function(m){var E=m<0;E&&(m=-m),r(typeof m=="number"),r(m<67108864);for(var C=0,N=0;N<this.length;N++){var P=(this.words[N]|0)*m,B=(P&67108863)+(C&67108863);C>>=26,C+=P/67108864|0,C+=B>>>26,this.words[N]=B&67108863}return C!==0&&(this.words[N]=C,this.length++),this.length=m===0?1:this.length,E?this.ineg():this},s.prototype.muln=function(m){return this.clone().imuln(m)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(m){var E=I(m);if(E.length===0)return new s(1);for(var C=this,N=0;N<E.length&&E[N]===0;N++,C=C.sqr());if(++N<E.length)for(var P=C.sqr();N<E.length;N++,P=P.sqr())E[N]!==0&&(C=C.mul(P));return C},s.prototype.iushln=function(m){r(typeof m=="number"&&m>=0);var E=m%26,C=(m-E)/26,N=67108863>>>26-E<<26-E,P;if(E!==0){var B=0;for(P=0;P<this.length;P++){var O=this.words[P]&N,j=(this.words[P]|0)-O<<E;this.words[P]=j|B,B=O>>>26-E}B&&(this.words[P]=B,this.length++)}if(C!==0){for(P=this.length-1;P>=0;P--)this.words[P+C]=this.words[P];for(P=0;P<C;P++)this.words[P]=0;this.length+=C}return this._strip()},s.prototype.ishln=function(m){return r(this.negative===0),this.iushln(m)},s.prototype.iushrn=function(m,E,C){r(typeof m=="number"&&m>=0);var N;E?N=(E-E%26)/26:N=0;var P=m%26,B=Math.min((m-P)/26,this.length),O=67108863^67108863>>>P<<P,j=C;if(N-=B,N=Math.max(0,N),j){for(var v=0;v<B;v++)j.words[v]=this.words[v];j.length=B}if(B!==0)if(this.length>B)for(this.length-=B,v=0;v<this.length;v++)this.words[v]=this.words[v+B];else this.words[0]=0,this.length=1;var k=0;for(v=this.length-1;v>=0&&(k!==0||v>=N);v--){var X=this.words[v]|0;this.words[v]=k<<26-P|X>>>P,k=X&O}return j&&k!==0&&(j.words[j.length++]=k),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(m,E,C){return r(this.negative===0),this.iushrn(m,E,C)},s.prototype.shln=function(m){return this.clone().ishln(m)},s.prototype.ushln=function(m){return this.clone().iushln(m)},s.prototype.shrn=function(m){return this.clone().ishrn(m)},s.prototype.ushrn=function(m){return this.clone().iushrn(m)},s.prototype.testn=function(m){r(typeof m=="number"&&m>=0);var E=m%26,C=(m-E)/26,N=1<<E;if(this.length<=C)return!1;var P=this.words[C];return!!(P&N)},s.prototype.imaskn=function(m){r(typeof m=="number"&&m>=0);var E=m%26,C=(m-E)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(E!==0&&C++,this.length=Math.min(C,this.length),E!==0){var N=67108863^67108863>>>E<<E;this.words[this.length-1]&=N}return this._strip()},s.prototype.maskn=function(m){return this.clone().imaskn(m)},s.prototype.iaddn=function(m){return r(typeof m=="number"),r(m<67108864),m<0?this.isubn(-m):this.negative!==0?this.length===1&&(this.words[0]|0)<=m?(this.words[0]=m-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(m),this.negative=1,this):this._iaddn(m)},s.prototype._iaddn=function(m){this.words[0]+=m;for(var E=0;E<this.length&&this.words[E]>=67108864;E++)this.words[E]-=67108864,E===this.length-1?this.words[E+1]=1:this.words[E+1]++;return this.length=Math.max(this.length,E+1),this},s.prototype.isubn=function(m){if(r(typeof m=="number"),r(m<67108864),m<0)return this.iaddn(-m);if(this.negative!==0)return this.negative=0,this.iaddn(m),this.negative=1,this;if(this.words[0]-=m,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var E=0;E<this.length&&this.words[E]<0;E++)this.words[E]+=67108864,this.words[E+1]-=1;return this._strip()},s.prototype.addn=function(m){return this.clone().iaddn(m)},s.prototype.subn=function(m){return this.clone().isubn(m)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(m,E,C){var N=m.length+C,P;this._expand(N);var B,O=0;for(P=0;P<m.length;P++){B=(this.words[P+C]|0)+O;var j=(m.words[P]|0)*E;B-=j&67108863,O=(B>>26)-(j/67108864|0),this.words[P+C]=B&67108863}for(;P<this.length-C;P++)B=(this.words[P+C]|0)+O,O=B>>26,this.words[P+C]=B&67108863;if(O===0)return this._strip();for(r(O===-1),O=0,P=0;P<this.length;P++)B=-(this.words[P]|0)+O,O=B>>26,this.words[P]=B&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(m,E){var C=this.length-m.length,N=this.clone(),P=m,B=P.words[P.length-1]|0,O=this._countBits(B);C=26-O,C!==0&&(P=P.ushln(C),N.iushln(C),B=P.words[P.length-1]|0);var j=N.length-P.length,v;if(E!=="mod"){v=new s(null),v.length=j+1,v.words=new Array(v.length);for(var k=0;k<v.length;k++)v.words[k]=0}var X=N.clone()._ishlnsubmul(P,1,j);X.negative===0&&(N=X,v&&(v.words[j]=1));for(var re=j-1;re>=0;re--){var ue=(N.words[P.length+re]|0)*67108864+(N.words[P.length+re-1]|0);for(ue=Math.min(ue/B|0,67108863),N._ishlnsubmul(P,ue,re);N.negative!==0;)ue--,N.negative=0,N._ishlnsubmul(P,1,re),N.isZero()||(N.negative^=1);v&&(v.words[re]=ue)}return v&&v._strip(),N._strip(),E!=="div"&&C!==0&&N.iushrn(C),{div:v||null,mod:N}},s.prototype.divmod=function(m,E,C){if(r(!m.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var N,P,B;return this.negative!==0&&m.negative===0?(B=this.neg().divmod(m,E),E!=="mod"&&(N=B.div.neg()),E!=="div"&&(P=B.mod.neg(),C&&P.negative!==0&&P.iadd(m)),{div:N,mod:P}):this.negative===0&&m.negative!==0?(B=this.divmod(m.neg(),E),E!=="mod"&&(N=B.div.neg()),{div:N,mod:B.mod}):(this.negative&m.negative)!==0?(B=this.neg().divmod(m.neg(),E),E!=="div"&&(P=B.mod.neg(),C&&P.negative!==0&&P.isub(m)),{div:B.div,mod:P}):m.length>this.length||this.cmp(m)<0?{div:new s(0),mod:this}:m.length===1?E==="div"?{div:this.divn(m.words[0]),mod:null}:E==="mod"?{div:null,mod:new s(this.modrn(m.words[0]))}:{div:this.divn(m.words[0]),mod:new s(this.modrn(m.words[0]))}:this._wordDiv(m,E)},s.prototype.div=function(m){return this.divmod(m,"div",!1).div},s.prototype.mod=function(m){return this.divmod(m,"mod",!1).mod},s.prototype.umod=function(m){return this.divmod(m,"mod",!0).mod},s.prototype.divRound=function(m){var E=this.divmod(m);if(E.mod.isZero())return E.div;var C=E.div.negative!==0?E.mod.isub(m):E.mod,N=m.ushrn(1),P=m.andln(1),B=C.cmp(N);return B<0||P===1&&B===0?E.div:E.div.negative!==0?E.div.isubn(1):E.div.iaddn(1)},s.prototype.modrn=function(m){var E=m<0;E&&(m=-m),r(m<=67108863);for(var C=(1<<26)%m,N=0,P=this.length-1;P>=0;P--)N=(C*N+(this.words[P]|0))%m;return E?-N:N},s.prototype.modn=function(m){return this.modrn(m)},s.prototype.idivn=function(m){var E=m<0;E&&(m=-m),r(m<=67108863);for(var C=0,N=this.length-1;N>=0;N--){var P=(this.words[N]|0)+C*67108864;this.words[N]=P/m|0,C=P%m}return this._strip(),E?this.ineg():this},s.prototype.divn=function(m){return this.clone().idivn(m)},s.prototype.egcd=function(m){r(m.negative===0),r(!m.isZero());var E=this,C=m.clone();E.negative!==0?E=E.umod(m):E=E.clone();for(var N=new s(1),P=new s(0),B=new s(0),O=new s(1),j=0;E.isEven()&&C.isEven();)E.iushrn(1),C.iushrn(1),++j;for(var v=C.clone(),k=E.clone();!E.isZero();){for(var X=0,re=1;(E.words[0]&re)===0&&X<26;++X,re<<=1);if(X>0)for(E.iushrn(X);X-- >0;)(N.isOdd()||P.isOdd())&&(N.iadd(v),P.isub(k)),N.iushrn(1),P.iushrn(1);for(var ue=0,pe=1;(C.words[0]&pe)===0&&ue<26;++ue,pe<<=1);if(ue>0)for(C.iushrn(ue);ue-- >0;)(B.isOdd()||O.isOdd())&&(B.iadd(v),O.isub(k)),B.iushrn(1),O.iushrn(1);E.cmp(C)>=0?(E.isub(C),N.isub(B),P.isub(O)):(C.isub(E),B.isub(N),O.isub(P))}return{a:B,b:O,gcd:C.iushln(j)}},s.prototype._invmp=function(m){r(m.negative===0),r(!m.isZero());var E=this,C=m.clone();E.negative!==0?E=E.umod(m):E=E.clone();for(var N=new s(1),P=new s(0),B=C.clone();E.cmpn(1)>0&&C.cmpn(1)>0;){for(var O=0,j=1;(E.words[0]&j)===0&&O<26;++O,j<<=1);if(O>0)for(E.iushrn(O);O-- >0;)N.isOdd()&&N.iadd(B),N.iushrn(1);for(var v=0,k=1;(C.words[0]&k)===0&&v<26;++v,k<<=1);if(v>0)for(C.iushrn(v);v-- >0;)P.isOdd()&&P.iadd(B),P.iushrn(1);E.cmp(C)>=0?(E.isub(C),N.isub(P)):(C.isub(E),P.isub(N))}var X;return E.cmpn(1)===0?X=N:X=P,X.cmpn(0)<0&&X.iadd(m),X},s.prototype.gcd=function(m){if(this.isZero())return m.abs();if(m.isZero())return this.abs();var E=this.clone(),C=m.clone();E.negative=0,C.negative=0;for(var N=0;E.isEven()&&C.isEven();N++)E.iushrn(1),C.iushrn(1);do{for(;E.isEven();)E.iushrn(1);for(;C.isEven();)C.iushrn(1);var P=E.cmp(C);if(P<0){var B=E;E=C,C=B}else if(P===0||C.cmpn(1)===0)break;E.isub(C)}while(!0);return C.iushln(N)},s.prototype.invm=function(m){return this.egcd(m).a.umod(m)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(m){return this.words[0]&m},s.prototype.bincn=function(m){r(typeof m=="number");var E=m%26,C=(m-E)/26,N=1<<E;if(this.length<=C)return this._expand(C+1),this.words[C]|=N,this;for(var P=N,B=C;P!==0&&B<this.length;B++){var O=this.words[B]|0;O+=P,P=O>>>26,O&=67108863,this.words[B]=O}return P!==0&&(this.words[B]=P,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(m){var E=m<0;if(this.negative!==0&&!E)return-1;if(this.negative===0&&E)return 1;this._strip();var C;if(this.length>1)C=1;else{E&&(m=-m),r(m<=67108863,"Number is too big");var N=this.words[0]|0;C=N===m?0:N<m?-1:1}return this.negative!==0?-C|0:C},s.prototype.cmp=function(m){if(this.negative!==0&&m.negative===0)return-1;if(this.negative===0&&m.negative!==0)return 1;var E=this.ucmp(m);return this.negative!==0?-E|0:E},s.prototype.ucmp=function(m){if(this.length>m.length)return 1;if(this.length<m.length)return-1;for(var E=0,C=this.length-1;C>=0;C--){var N=this.words[C]|0,P=m.words[C]|0;if(N!==P){N<P?E=-1:N>P&&(E=1);break}}return E},s.prototype.gtn=function(m){return this.cmpn(m)===1},s.prototype.gt=function(m){return this.cmp(m)===1},s.prototype.gten=function(m){return this.cmpn(m)>=0},s.prototype.gte=function(m){return this.cmp(m)>=0},s.prototype.ltn=function(m){return this.cmpn(m)===-1},s.prototype.lt=function(m){return this.cmp(m)===-1},s.prototype.lten=function(m){return this.cmpn(m)<=0},s.prototype.lte=function(m){return this.cmp(m)<=0},s.prototype.eqn=function(m){return this.cmpn(m)===0},s.prototype.eq=function(m){return this.cmp(m)===0},s.red=function(m){return new ne(m)},s.prototype.toRed=function(m){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),m.convertTo(this)._forceRed(m)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(m){return this.red=m,this},s.prototype.forceRed=function(m){return r(!this.red,"Already a number in reduction context"),this._forceRed(m)},s.prototype.redAdd=function(m){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,m)},s.prototype.redIAdd=function(m){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,m)},s.prototype.redSub=function(m){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,m)},s.prototype.redISub=function(m){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,m)},s.prototype.redShl=function(m){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,m)},s.prototype.redMul=function(m){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,m),this.red.mul(this,m)},s.prototype.redIMul=function(m){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,m),this.red.imul(this,m)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(m){return r(this.red&&!m.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,m)};var z={k256:null,p224:null,p192:null,p25519:null};function V(M,m){this.name=M,this.p=new s(m,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}V.prototype._tmp=function(){var m=new s(null);return m.words=new Array(Math.ceil(this.n/13)),m},V.prototype.ireduce=function(m){var E=m,C;do this.split(E,this.tmp),E=this.imulK(E),E=E.iadd(this.tmp),C=E.bitLength();while(C>this.n);var N=C<this.n?-1:E.ucmp(this.p);return N===0?(E.words[0]=0,E.length=1):N>0?E.isub(this.p):E.strip!==void 0?E.strip():E._strip(),E},V.prototype.split=function(m,E){m.iushrn(this.n,0,E)},V.prototype.imulK=function(m){return m.imul(this.k)};function K(){V.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(K,V),K.prototype.split=function(m,E){for(var C=4194303,N=Math.min(m.length,9),P=0;P<N;P++)E.words[P]=m.words[P];if(E.length=N,m.length<=9){m.words[0]=0,m.length=1;return}var B=m.words[9];for(E.words[E.length++]=B&C,P=10;P<m.length;P++){var O=m.words[P]|0;m.words[P-10]=(O&C)<<4|B>>>22,B=O}B>>>=22,m.words[P-10]=B,B===0&&m.length>10?m.length-=10:m.length-=9},K.prototype.imulK=function(m){m.words[m.length]=0,m.words[m.length+1]=0,m.length+=2;for(var E=0,C=0;C<m.length;C++){var N=m.words[C]|0;E+=N*977,m.words[C]=E&67108863,E=N*64+(E/67108864|0)}return m.words[m.length-1]===0&&(m.length--,m.words[m.length-1]===0&&m.length--),m};function te(){V.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(te,V);function Q(){V.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(Q,V);function ee(){V.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(ee,V),ee.prototype.imulK=function(m){for(var E=0,C=0;C<m.length;C++){var N=(m.words[C]|0)*19+E,P=N&67108863;N>>>=26,m.words[C]=P,E=N}return E!==0&&(m.words[m.length++]=E),m},s._prime=function(m){if(z[m])return z[m];var E;if(m==="k256")E=new K;else if(m==="p224")E=new te;else if(m==="p192")E=new Q;else if(m==="p25519")E=new ee;else throw new Error("Unknown prime "+m);return z[m]=E,E};function ne(M){if(typeof M=="string"){var m=s._prime(M);this.m=m.p,this.prime=m}else r(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}ne.prototype._verify1=function(m){r(m.negative===0,"red works only with positives"),r(m.red,"red works only with red numbers")},ne.prototype._verify2=function(m,E){r((m.negative|E.negative)===0,"red works only with positives"),r(m.red&&m.red===E.red,"red works only with red numbers")},ne.prototype.imod=function(m){return this.prime?this.prime.ireduce(m)._forceRed(this):(h(m,m.umod(this.m)._forceRed(this)),m)},ne.prototype.neg=function(m){return m.isZero()?m.clone():this.m.sub(m)._forceRed(this)},ne.prototype.add=function(m,E){this._verify2(m,E);var C=m.add(E);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},ne.prototype.iadd=function(m,E){this._verify2(m,E);var C=m.iadd(E);return C.cmp(this.m)>=0&&C.isub(this.m),C},ne.prototype.sub=function(m,E){this._verify2(m,E);var C=m.sub(E);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},ne.prototype.isub=function(m,E){this._verify2(m,E);var C=m.isub(E);return C.cmpn(0)<0&&C.iadd(this.m),C},ne.prototype.shl=function(m,E){return this._verify1(m),this.imod(m.ushln(E))},ne.prototype.imul=function(m,E){return this._verify2(m,E),this.imod(m.imul(E))},ne.prototype.mul=function(m,E){return this._verify2(m,E),this.imod(m.mul(E))},ne.prototype.isqr=function(m){return this.imul(m,m.clone())},ne.prototype.sqr=function(m){return this.mul(m,m)},ne.prototype.sqrt=function(m){if(m.isZero())return m.clone();var E=this.m.andln(3);if(r(E%2===1),E===3){var C=this.m.add(new s(1)).iushrn(2);return this.pow(m,C)}for(var N=this.m.subn(1),P=0;!N.isZero()&&N.andln(1)===0;)P++,N.iushrn(1);r(!N.isZero());var B=new s(1).toRed(this),O=B.redNeg(),j=this.m.subn(1).iushrn(1),v=this.m.bitLength();for(v=new s(2*v*v).toRed(this);this.pow(v,j).cmp(O)!==0;)v.redIAdd(O);for(var k=this.pow(v,N),X=this.pow(m,N.addn(1).iushrn(1)),re=this.pow(m,N),ue=P;re.cmp(B)!==0;){for(var pe=re,we=0;pe.cmp(B)!==0;we++)pe=pe.redSqr();r(we<ue);var Ce=this.pow(k,new s(1).iushln(ue-we-1));X=X.redMul(Ce),k=Ce.redSqr(),re=re.redMul(k),ue=we}return X},ne.prototype.invm=function(m){var E=m._invmp(this.m);return E.negative!==0?(E.negative=0,this.imod(E).redNeg()):this.imod(E)},ne.prototype.pow=function(m,E){if(E.isZero())return new s(1).toRed(this);if(E.cmpn(1)===0)return m.clone();var C=4,N=new Array(1<<C);N[0]=new s(1).toRed(this),N[1]=m;for(var P=2;P<N.length;P++)N[P]=this.mul(N[P-1],m);var B=N[0],O=0,j=0,v=E.bitLength()%26;for(v===0&&(v=26),P=E.length-1;P>=0;P--){for(var k=E.words[P],X=v-1;X>=0;X--){var re=k>>X&1;if(B!==N[0]&&(B=this.sqr(B)),re===0&&O===0){j=0;continue}O<<=1,O|=re,j++,!(j!==C&&(P!==0||X!==0))&&(B=this.mul(B,N[O]),j=0,O=0)}v=26}return B},ne.prototype.convertTo=function(m){var E=m.umod(this.m);return E===m?E.clone():E},ne.prototype.convertFrom=function(m){var E=m.clone();return E.red=null,E},s.mont=function(m){return new J(m)};function J(M){ne.call(this,M),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(J,ne),J.prototype.convertTo=function(m){return this.imod(m.ushln(this.shift))},J.prototype.convertFrom=function(m){var E=this.imod(m.mul(this.rinv));return E.red=null,E},J.prototype.imul=function(m,E){if(m.isZero()||E.isZero())return m.words[0]=0,m.length=1,m;var C=m.imul(E),N=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=C.isub(N).iushrn(this.shift),B=P;return P.cmp(this.m)>=0?B=P.isub(this.m):P.cmpn(0)<0&&(B=P.iadd(this.m)),B._forceRed(this)},J.prototype.mul=function(m,E){if(m.isZero()||E.isZero())return new s(0)._forceRed(this);var C=m.mul(E),N=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=C.isub(N).iushrn(this.shift),B=P;return P.cmp(this.m)>=0?B=P.isub(this.m):P.cmpn(0)<0&&(B=P.iadd(this.m)),B._forceRed(this)},J.prototype.invm=function(m){var E=this.imod(m._invmp(this.m).mul(this.r2));return E._forceRed(this)}})(e,zxe)})(z5)),z5.exports}var E_,WM;function qxe(){if(WM)return E_;WM=1;var e=hU().Buffer;function t(n){if(n.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),i=0;i<r.length;i++)r[i]=255;for(var s=0;s<n.length;s++){var o=n.charAt(s),a=o.charCodeAt(0);if(r[a]!==255)throw new TypeError(o+" is ambiguous");r[a]=s}var c=n.length,d=n.charAt(0),h=Math.log(c)/Math.log(256),y=Math.log(256)/Math.log(c);function g(S){if((Array.isArray(S)||S instanceof Uint8Array)&&(S=e.from(S)),!e.isBuffer(S))throw new TypeError("Expected Buffer");if(S.length===0)return"";for(var I=0,L=0,D=0,F=S.length;D!==F&&S[D]===0;)D++,I++;for(var $=(F-D)*y+1>>>0,z=new Uint8Array($);D!==F;){for(var V=S[D],K=0,te=$-1;(V!==0||K<L)&&te!==-1;te--,K++)V+=256*z[te]>>>0,z[te]=V%c>>>0,V=V/c>>>0;if(V!==0)throw new Error("Non-zero carry");L=K,D++}for(var Q=$-L;Q!==$&&z[Q]===0;)Q++;for(var ee=d.repeat(I);Q<$;++Q)ee+=n.charAt(z[Q]);return ee}function x(S){if(typeof S!="string")throw new TypeError("Expected String");if(S.length===0)return e.alloc(0);for(var I=0,L=0,D=0;S[I]===d;)L++,I++;for(var F=(S.length-I)*h+1>>>0,$=new Uint8Array(F);I<S.length;){var z=S.charCodeAt(I);if(z>255)return;var V=r[z];if(V===255)return;for(var K=0,te=F-1;(V!==0||K<D)&&te!==-1;te--,K++)V+=c*$[te]>>>0,$[te]=V%256>>>0,V=V/256>>>0;if(V!==0)throw new Error("Non-zero carry");D=K,I++}for(var Q=F-D;Q!==F&&$[Q]===0;)Q++;var ee=e.allocUnsafe(L+(F-Q));ee.fill(0,0,L);for(var ne=L;Q!==F;)ee[ne++]=$[Q++];return ee}function _(S){var I=x(S);if(I)return I;throw new Error("Non-base"+c+" character")}return{encode:g,decodeUnsafe:x,decode:_}}return E_=t,E_}var __,GM;function Hxe(){if(GM)return __;GM=1;var e=qxe(),t="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";return __=e(t),__}function zl(e,t,n){return t<=e&&e<=n}function EE(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function Wxe(e){for(var t=String(e),n=t.length,r=0,i=[];r<n;){var s=t.charCodeAt(r);if(s<55296||s>57343)i.push(s);else if(56320<=s&&s<=57343)i.push(65533);else if(55296<=s&&s<=56319)if(r===n-1)i.push(65533);else{var o=e.charCodeAt(r+1);if(56320<=o&&o<=57343){var a=s&1023,c=o&1023;i.push(65536+(a<<10)+c),r+=1}else i.push(65533)}r+=1}return i}function Gxe(e){for(var t="",n=0;n<e.length;++n){var r=e[n];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return t}var V6=-1;function Bk(e){this.tokens=[].slice.call(e)}Bk.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():V6},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var wg=-1;function S_(e,t){if(e)throw TypeError("Decoder error");return t||65533}var q6="utf-8";function H6(e,t){if(!(this instanceof H6))return new H6(e,t);if(e=e!==void 0?String(e).toLowerCase():q6,e!==q6)throw new Error("Encoding not supported. Only utf-8 is supported");t=EE(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}H6.prototype={decode:function(t,n){var r;typeof t=="object"&&t instanceof ArrayBuffer?r=new Uint8Array(t):typeof t=="object"&&"buffer"in t&&t.buffer instanceof ArrayBuffer?r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):r=new Uint8Array(0),n=EE(n),this._streaming||(this._decoder=new Kxe({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!n.stream;for(var i=new Bk(r),s=[],o;!i.endOfStream()&&(o=this._decoder.handler(i,i.read()),o!==wg);)o!==null&&(Array.isArray(o)?s.push.apply(s,o):s.push(o));if(!this._streaming){do{if(o=this._decoder.handler(i,i.read()),o===wg)break;o!==null&&(Array.isArray(o)?s.push.apply(s,o):s.push(o))}while(!i.endOfStream());this._decoder=null}return s.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(s[0]===65279?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),Gxe(s)}};function W6(e,t){if(!(this instanceof W6))return new W6(e,t);if(e=e!==void 0?String(e).toLowerCase():q6,e!==q6)throw new Error("Encoding not supported. Only utf-8 is supported");t=EE(t),this._streaming=!1,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}W6.prototype={encode:function(t,n){t=t?String(t):"",n=EE(n),this._streaming||(this._encoder=new Yxe(this._options)),this._streaming=!!n.stream;for(var r=[],i=new Bk(Wxe(t)),s;!i.endOfStream()&&(s=this._encoder.handler(i,i.read()),s!==wg);)Array.isArray(s)?r.push.apply(r,s):r.push(s);if(!this._streaming){for(;s=this._encoder.handler(i,i.read()),s!==wg;)Array.isArray(s)?r.push.apply(r,s):r.push(s);this._encoder=null}return new Uint8Array(r)}};function Kxe(e){var t=e.fatal,n=0,r=0,i=0,s=128,o=191;this.handler=function(a,c){if(c===V6&&i!==0)return i=0,S_(t);if(c===V6)return wg;if(i===0){if(zl(c,0,127))return c;if(zl(c,194,223))i=1,n=c-192;else if(zl(c,224,239))c===224&&(s=160),c===237&&(o=159),i=2,n=c-224;else if(zl(c,240,244))c===240&&(s=144),c===244&&(o=143),i=3,n=c-240;else return S_(t);return n=n<<6*i,null}if(!zl(c,s,o))return n=i=r=0,s=128,o=191,a.prepend(c),S_(t);if(s=128,o=191,r+=1,n+=c-128<<6*(i-r),r!==i)return null;var d=n;return n=i=r=0,d}}function Yxe(e){e.fatal,this.handler=function(t,n){if(n===V6)return wg;if(zl(n,0,127))return n;var r,i;zl(n,128,2047)?(r=1,i=192):zl(n,2048,65535)?(r=2,i=224):zl(n,65536,1114111)&&(r=3,i=240);for(var s=[(n>>6*r)+i];r>0;){var o=n>>6*(r-1);s.push(128|o&63),r-=1}return s}}const Zxe=Object.freeze(Object.defineProperty({__proto__:null,TextDecoder:H6,TextEncoder:W6},Symbol.toStringTag,{value:"Module"})),Xxe=IN(Zxe);var KM;
706function Qxe(){if(KM)return mr;KM=1;var e=mr&&mr.__createBinding||(Object.create?(function(Q,ee,ne,J){J===void 0&&(J=ne),Object.defineProperty(Q,J,{enumerable:!0,get:function(){return ee[ne]}})}):(function(Q,ee,ne,J){J===void 0&&(J=ne),Q[J]=ee[ne]})),t=mr&&mr.__setModuleDefault||(Object.create?(function(Q,ee){Object.defineProperty(Q,"default",{enumerable:!0,value:ee})}):function(Q,ee){Q.default=ee}),n=mr&&mr.__decorate||function(Q,ee,ne,J){var M=arguments.length,m=M<3?ee:J===null?J=Object.getOwnPropertyDescriptor(ee,ne):J,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(Q,ee,ne,J);else for(var C=Q.length-1;C>=0;C--)(E=Q[C])&&(m=(M<3?E(m):M>3?E(ee,ne,m):E(ee,ne))||m);return M>3&&m&&Object.defineProperty(ee,ne,m),m},r=mr&&mr.__importStar||function(Q){if(Q&&Q.__esModule)return Q;var ee={};if(Q!=null)for(var ne in Q)ne!=="default"&&Object.hasOwnProperty.call(Q,ne)&&e(ee,Q,ne);return t(ee,Q),ee},i=mr&&mr.__importDefault||function(Q){return Q&&Q.__esModule?Q:{default:Q}};Object.defineProperty(mr,"__esModule",{value:!0}),mr.deserializeUnchecked=mr.deserialize=mr.serialize=mr.BinaryReader=mr.BinaryWriter=mr.BorshError=mr.baseDecode=mr.baseEncode=void 0;const s=i(Vxe()),o=i(Hxe()),a=r(Xxe),c=typeof TextDecoder!="function"?a.TextDecoder:TextDecoder,d=new c("utf-8",{fatal:!0});function h(Q){return typeof Q=="string"&&(Q=cs.from(Q,"utf8")),o.default.encode(cs.from(Q))}mr.baseEncode=h;function y(Q){return cs.from(o.default.decode(Q))}mr.baseDecode=y;const g=1024;class x extends Error{constructor(ee){super(ee),this.fieldPath=[],this.originalMessage=ee}addToFieldPath(ee){this.fieldPath.splice(0,0,ee),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}mr.BorshError=x;class _{constructor(){this.buf=cs.alloc(g),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=cs.concat([this.buf,cs.alloc(g)]))}writeU8(ee){this.maybeResize(),this.buf.writeUInt8(ee,this.length),this.length+=1}writeU16(ee){this.maybeResize(),this.buf.writeUInt16LE(ee,this.length),this.length+=2}writeU32(ee){this.maybeResize(),this.buf.writeUInt32LE(ee,this.length),this.length+=4}writeU64(ee){this.maybeResize(),this.writeBuffer(cs.from(new s.default(ee).toArray("le",8)))}writeU128(ee){this.maybeResize(),this.writeBuffer(cs.from(new s.default(ee).toArray("le",16)))}writeU256(ee){this.maybeResize(),this.writeBuffer(cs.from(new s.default(ee).toArray("le",32)))}writeU512(ee){this.maybeResize(),this.writeBuffer(cs.from(new s.default(ee).toArray("le",64)))}writeBuffer(ee){this.buf=cs.concat([cs.from(this.buf.subarray(0,this.length)),ee,cs.alloc(g)]),this.length+=ee.length}writeString(ee){this.maybeResize();const ne=cs.from(ee,"utf8");this.writeU32(ne.length),this.writeBuffer(ne)}writeFixedArray(ee){this.writeBuffer(cs.from(ee))}writeArray(ee,ne){this.maybeResize(),this.writeU32(ee.length);for(const J of ee)this.maybeResize(),ne(J)}toArray(){return this.buf.subarray(0,this.length)}}mr.BinaryWriter=_;function S(Q,ee,ne){const J=ne.value;ne.value=function(...M){try{return J.apply(this,M)}catch(m){if(m instanceof RangeError){const E=m.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(E)>=0)throw new x("Reached the end of buffer when deserializing")}throw m}}}class I{constructor(ee){this.buf=ee,this.offset=0}readU8(){const ee=this.buf.readUInt8(this.offset);return this.offset+=1,ee}readU16(){const ee=this.buf.readUInt16LE(this.offset);return this.offset+=2,ee}readU32(){const ee=this.buf.readUInt32LE(this.offset);return this.offset+=4,ee}readU64(){const ee=this.readBuffer(8);return new s.default(ee,"le")}readU128(){const ee=this.readBuffer(16);return new s.default(ee,"le")}readU256(){const ee=this.readBuffer(32);return new s.default(ee,"le")}readU512(){const ee=this.readBuffer(64);return new s.default(ee,"le")}readBuffer(ee){if(this.offset+ee>this.buf.length)throw new x(`Expected buffer length ${ee} isn't within bounds`);const ne=this.buf.slice(this.offset,this.offset+ee);return this.offset+=ee,ne}readString(){const ee=this.readU32(),ne=this.readBuffer(ee);try{return d.decode(ne)}catch(J){throw new x(`Error decoding UTF-8 string: ${J}`)}}readFixedArray(ee){return new Uint8Array(this.readBuffer(ee))}readArray(ee){const ne=this.readU32(),J=Array();for(let M=0;M<ne;
706++M)J.push(ee());return J}}n([S],I.prototype,"readU8",null),n([S],I.prototype,"readU16",null),n([S],I.prototype,"readU32",null),n([S],I.prototype,"readU64",null),n([S],I.prototype,"readU128",null),n([S],I.prototype,"readU256",null),n([S],I.prototype,"readU512",null),n([S],I.prototype,"readString",null),n([S],I.prototype,"readFixedArray",null),n([S],I.prototype,"readArray",null),mr.BinaryReader=I;function L(Q){return Q.charAt(0).toUpperCase()+Q.slice(1)}function D(Q,ee,ne,J,M){try{if(typeof J=="string")M[`write${L(J)}`](ne);else if(J instanceof Array)if(typeof J[0]=="number"){if(ne.length!==J[0])throw new x(`Expecting byte array of length ${J[0]}, but got ${ne.length} bytes`);M.writeFixedArray(ne)}else if(J.length===2&&typeof J[1]=="number"){if(ne.length!==J[1])throw new x(`Expecting byte array of length ${J[1]}, but got ${ne.length} bytes`);for(let m=0;m<J[1];m++)D(Q,null,ne[m],J[0],M)}else M.writeArray(ne,m=>{D(Q,ee,m,J[0],M)});else if(J.kind!==void 0)switch(J.kind){case"option":{ne==null?M.writeU8(0):(M.writeU8(1),D(Q,ee,ne,J.type,M));break}case"map":{M.writeU32(ne.size),ne.forEach((m,E)=>{D(Q,ee,E,J.key,M),D(Q,ee,m,J.value,M)});break}default:throw new x(`FieldType ${J} unrecognized`)}else F(Q,ne,M)}catch(m){throw m instanceof x&&m.addToFieldPath(ee),m}}function F(Q,ee,ne){if(typeof ee.borshSerialize=="function"){ee.borshSerialize(ne);return}const J=Q.get(ee.constructor);if(!J)throw new x(`Class ${ee.constructor.name} is missing in schema`);if(J.kind==="struct")J.fields.map(([M,m])=>{D(Q,M,ee[M],m,ne)});else if(J.kind==="enum"){const M=ee[J.field];for(let m=0;m<J.values.length;++m){const[E,C]=J.values[m];if(E===M){ne.writeU8(m),D(Q,E,ee[E],C,ne);break}}}else throw new x(`Unexpected schema kind: ${J.kind} for ${ee.constructor.name}`)}function $(Q,ee,ne=_){const J=new ne;return F(Q,ee,J),J.toArray()}mr.serialize=$;function z(Q,ee,ne,J){try{if(typeof ne=="string")return J[`read${L(ne)}`]();if(ne instanceof Array){if(typeof ne[0]=="number")return J.readFixedArray(ne[0]);if(typeof ne[1]=="number"){const M=[];for(let m=0;m<ne[1];m++)M.push(z(Q,null,ne[0],J));return M}else return J.readArray(()=>z(Q,ee,ne[0],J))}if(ne.kind==="option")return J.readU8()?z(Q,ee,ne.type,J):void 0;if(ne.kind==="map"){let M=new Map;const m=J.readU32();for(let E=0;E<m;E++){const C=z(Q,ee,ne.key,J),N=z(Q,ee,ne.value,J);M.set(C,N)}return M}return V(Q,ne,J)}catch(M){throw M instanceof x&&M.addToFieldPath(ee),M}}function V(Q,ee,ne){if(typeof ee.borshDeserialize=="function")return ee.borshDeserialize(ne);const J=Q.get(ee);if(!J)throw new x(`Class ${ee.name} is missing in schema`);if(J.kind==="struct"){const M={};for(const[m,E]of Q.get(ee).fields)M[m]=z(Q,m,E,ne);return new ee(M)}if(J.kind==="enum"){const M=ne.readU8();if(M>=J.values.length)throw new x(`Enum index: ${M} is out of range`);const[m,E]=J.values[M],C=z(Q,m,E,ne);return new ee({[m]:C})}throw new x(`Unexpected schema kind: ${J.kind} for ${ee.constructor.name}`)}function K(Q,ee,ne,J=I){const M=new J(ne),m=V(Q,ee,M);if(M.offset<ne.length)throw new x(`Unexpected ${ne.length-M.offset} bytes after deserialized data`);return m}mr.deserialize=K;function te(Q,ee,ne,J=I){const M=new J(ne);return V(Q,ee,M)}return mr.deserializeUnchecked=te,mr}var T_=Qxe(),Oe={},YM;function Jxe(){if(YM)return Oe;YM=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.s16=Oe.s8=Oe.nu64be=Oe.u48be=Oe.u40be=Oe.u32be=Oe.u24be=Oe.u16be=Oe.nu64=Oe.u48=Oe.u40=Oe.u32=Oe.u24=Oe.u16=Oe.u8=Oe.offset=Oe.greedy=Oe.Constant=Oe.UTF8=Oe.CString=Oe.Blob=Oe.Boolean=Oe.BitField=Oe.BitStructure=Oe.VariantLayout=Oe.Union=Oe.UnionLayoutDiscriminator=Oe.UnionDiscriminator=Oe.Structure=Oe.Sequence=Oe.DoubleBE=Oe.Double=Oe.FloatBE=Oe.Float=Oe.NearInt64BE=Oe.NearInt64=Oe.NearUInt64BE=Oe.NearUInt64=Oe.IntBE=Oe.Int=Oe.UIntBE=Oe.UInt=Oe.OffsetLayout=Oe.GreedyCount=Oe.ExternalLayout=Oe.bindConstructorLayout=Oe.nameWithProperty=Oe.Layout=Oe.uint8ArrayToBuffer=Oe.checkUint8Array=void 0,Oe.constant=Oe.utf8=Oe.cstr=Oe.blob=Oe.unionLayoutDiscriminator=Oe.union=Oe.seq=Oe.bits=Oe.struct=Oe.f64be=Oe.f64=Oe.f32be=Oe.f32=Oe.ns64be=Oe.s48be=Oe.s40be=Oe.s32be=Oe.s24be=Oe.s16be=Oe.ns64=Oe.s48=Oe.s40=Oe.s32=Oe.s24=void 0;const e=wE();function t(v){if(!(v instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}Oe.checkUint8Array=t;function n(v){return t(v),e.Buffer.from(v.buffer,v.byteOffset,v.length)}Oe.uint8ArrayToBuffer=n;let r=class{constructor(k,X){if(!Number.isInteger(k))throw new TypeError("span must be an integer");this.span=k,this.property=X}makeDestinationObject(){return{}}getSpan(k,X){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(k){const X=Object.create(this.constructor.prototype);return Object.assign(X,this),X.property=k,X}fromArray(k){}};Oe.Layout=r;function i(v,k){return k.property?v+"["+k.property+"]":v}Oe.nameWithProperty=i;function s(v,k){if(typeof v!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(v,"layout_"))throw new Error("Class is already bound to a layout");if(!(k&&k instanceof r))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(k,"boundConstructor_"))throw new Error("layout is already bound to a constructor");v.layout_=k,k.boundConstructor_=v,k.makeDestinationObject=(()=>new v),Object.defineProperty(v.prototype,"encode",{value(X,re){return k.encode(this,X,re)},writable:!0}),Object.defineProperty(v,"decode",{value(X,re){return k.decode(X,re)},writable:!0})}Oe.bindConstructorLayout=s;class o extends r{isCount(){throw new Error("ExternalLayout is abstract")}}Oe.ExternalLayout=o;class a extends o{constructor(k=1,X){if(!Number.isInteger(k)||0>=k)throw new TypeError("elementSpan must be a (positive) integer");super(-1,X),this.elementSpan=k}isCount(){return!0}decode(k,X=0){t(k);const re=k.length-X;return Math.floor(re/this.elementSpan)}encode(k,X,re){return 0}}Oe.GreedyCount=a;class c extends o{constructor(k,X=0,re){if(!(k instanceof r))throw new TypeError("layout must be a Layout");if(!Number.isInteger(X))throw new TypeError("offset must be integer or undefined");super(k.span,re||k.property),this.layout=k,this.offset=X}isCount(){return this.layout instanceof d||this.layout instanceof h}decode(k,X=0){return this.layout.decode(k,X+this.offset)}encode(k,X,re=0){return this.layout.encode(k,X,re+this.offset)}}Oe.OffsetLayout=c;class d extends r{constructor(k,X){if(super(k,X),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(k,X=0){return n(k).readUIntLE(X,this.span)}encode(k,X,re=0){return n(X).writeUIntLE(k,re,this.span),this.span}}Oe.UInt=d;class h extends r{constructor(k,X){if(super(k,X),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(k,X=0){return n(k).readUIntBE(X,this.span)}encode(k,X,re=0){return n(X).writeUIntBE(k,re,this.span),this.span}}Oe.UIntBE=h;class y extends r{constructor(k,X){if(super(k,X),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(k,X=0){return n(k).readIntLE(X,this.span)}encode(k,X,re=0){return n(X).writeIntLE(k,re,this.span),this.span}}Oe.Int=y;class g extends r{constructor(k,X){if(super(k,X),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(k,X=0){return n(k).readIntBE(X,this.span)}encode(k,X,re=0){return n(X).writeIntBE(k,re,this.span),this.span}}Oe.IntBE=g;const x=Math.pow(2,32);function _(v){const k=Math.floor(v/x),X=v-k*x;return{hi32:k,lo32:X}}function S(v,k){return v*x+k}class I extends r{constructor(k){super(8,k)}decode(k,X=0){const re=n(k),ue=re.readUInt32LE(X),pe=re.readUInt32LE(X+4);return S(pe,ue)}encode(k,X,re=0){const ue=_(k),pe=n(X);return pe.writeUInt32LE(ue.lo32,re),pe.writeUInt32LE(ue.hi32,re+4),8}}Oe.NearUInt64=I;class L extends r{constructor(k){super(8,k)}decode(k,X=0){const re=n(k),ue=re.readUInt32BE(X),pe=re.readUInt32BE(X+4);return S(ue,pe)}encode(k,X,re=0){const ue=_(k),pe=n(X);return pe.writeUInt32BE(ue.hi32,re),pe.writeUInt32BE(ue.lo32,re+4),8}}Oe.NearUInt64BE=L;class D extends r{constructor(k){super(8,k)}decode(k,X=0){const re=n(k),ue=re.readUInt32LE(X),pe=re.readInt32LE(X+4);return S(pe,ue)}encode(k,X,re=0){const ue=_(k),pe=n(X);return pe.writeUInt32LE(ue.lo32,re),pe.writeInt32LE(ue.hi32,re+4),8}}Oe.NearInt64=D;class F extends r{constructor(k){super(8,k)}decode(k,X=0){const re=n(k),ue=re.readInt32BE(X),pe=re.readUInt32BE(X+4);return S(ue,pe)}encode(k,X,re=0){const ue=_(k),pe=n(X);return pe.writeInt32BE(ue.hi32,re),pe.writeUInt32BE(ue.lo32,re+4),8}}Oe.NearInt64BE=F;class $ extends r{constructor(k){super(4,k)}decode(k,X=0){return n(k).readFloatLE(X)}encode(k,X,re=0){return n(X).writeFloatLE(k,re),4}}Oe.Float=$;class z extends r{constructor(k){super(4,k)}decode(k,X=0){return n(k).readFloatBE(X)}encode(k,X,re=0){return n(X).writeFloatBE(k,re),4}}Oe.FloatBE=z;class V extends r{constructor(k){super(8,k)}decode(k,X=0){return n(k).readDoubleLE(X)}encode(k,X,re=0){return n(X).writeDoubleLE(k,re),8}}Oe.Double=V;class K extends r{constructor(k){super(8,k)}decode(k,X=0){return n(k).readDoubleBE(X)}encode(k,X,re=0){return n(X).writeDoubleBE(k,re),8}}Oe.DoubleBE=K;class te extends r{constructor(k,X,re){if(!(k instanceof r))throw new TypeError("elementLayout must be a Layout");if(!(X instanceof o&&X.isCount()||Number.isInteger(X)&&0<=X))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let ue=-1;!(X instanceof o)&&0<k.span&&(ue=X*k.span),super(ue,re),this.elementLayout=k,this.count=X}getSpan(k,X=0){if(0<=this.span)return this.span;let re=0,ue=this.count;if(ue instanceof o&&(ue=ue.decode(k,X)),0<this.elementLayout.span)re=ue*this.elementLayout.span;else{let pe=0;for(;pe<ue;)re+=this.elementLayout.getSpan(k,X+re),++pe}return re}decode(k,X=0){const re=[];let ue=0,pe=this.count;for(pe instanceof o&&(pe=pe.decode(k,X));ue<pe;)re.push(this.elementLayout.decode(k,X)),X+=this.elementLayout.getSpan(k,X),ue+=1;return re}encode(k,X,re=0){const ue=this.elementLayout,pe=k.reduce((we,Ce)=>we+ue.encode(Ce,X,re+we),0);return this.count instanceof o&&this.count.encode(k.length,X,re),pe}}Oe.Sequence=te;class Q extends r{constructor(k,X,re){if(!(Array.isArray(k)&&k.reduce((pe,we)=>
vendor: 7,602 bytes, line 706
706pe&&we instanceof r,!0)))throw new TypeError("fields must be array of Layout instances");typeof X=="boolean"&&re===void 0&&(re=X,X=void 0);for(const pe of k)if(0>pe.span&&pe.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let ue=-1;try{ue=k.reduce((pe,we)=>pe+we.getSpan(),0)}catch{}super(ue,X),this.fields=k,this.decodePrefixes=!!re}getSpan(k,X=0){if(0<=this.span)return this.span;let re=0;try{re=this.fields.reduce((ue,pe)=>{const we=pe.getSpan(k,X);return X+=we,ue+we},0)}catch{throw new RangeError("indeterminate span")}return re}decode(k,X=0){t(k);const re=this.makeDestinationObject();for(const ue of this.fields)if(ue.property!==void 0&&(re[ue.property]=ue.decode(k,X)),X+=ue.getSpan(k,X),this.decodePrefixes&&k.length===X)break;return re}encode(k,X,re=0){const ue=re;let pe=0,we=0;for(const Ce of this.fields){let St=Ce.span;if(we=0<St?St:0,Ce.property!==void 0){const Ve=k[Ce.property];Ve!==void 0&&(we=Ce.encode(Ve,X,re),0>St&&(St=Ce.getSpan(X,re)))}pe=re,re+=St}return pe+we-ue}fromArray(k){const X=this.makeDestinationObject();for(const re of this.fields)re.property!==void 0&&0<k.length&&(X[re.property]=k.shift());return X}layoutFor(k){if(typeof k!="string")throw new TypeError("property must be string");for(const X of this.fields)if(X.property===k)return X}offsetOf(k){if(typeof k!="string")throw new TypeError("property must be string");let X=0;for(const re of this.fields){if(re.property===k)return X;0>re.span?X=-1:0<=X&&(X+=re.span)}}}Oe.Structure=Q;class ee{constructor(k){this.property=k}decode(k,X){throw new Error("UnionDiscriminator is abstract")}encode(k,X,re){throw new Error("UnionDiscriminator is abstract")}}Oe.UnionDiscriminator=ee;class ne extends ee{constructor(k,X){if(!(k instanceof o&&k.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(X||k.property||"variant"),this.layout=k}decode(k,X){return this.layout.decode(k,X)}encode(k,X,re){return this.layout.encode(k,X,re)}}Oe.UnionLayoutDiscriminator=ne;class J extends r{constructor(k,X,re){let ue;if(k instanceof d||k instanceof h)ue=new ne(new c(k));else if(k instanceof o&&k.isCount())ue=new ne(k);else if(k instanceof ee)ue=k;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(X===void 0&&(X=null),!(X===null||X instanceof r))throw new TypeError("defaultLayout must be null or a Layout");if(X!==null){if(0>X.span)throw new Error("defaultLayout must have constant span");X.property===void 0&&(X=X.replicate("content"))}let pe=-1;X&&(pe=X.span,0<=pe&&(k instanceof d||k instanceof h)&&(pe+=ue.layout.span)),super(pe,re),this.discriminator=ue,this.usesPrefixDiscriminator=k instanceof d||k instanceof h,this.defaultLayout=X,this.registry={};let we=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(Ce){return we(Ce)},this.configGetSourceVariant=function(Ce){we=Ce.bind(this)}}getSpan(k,X=0){if(0<=this.span)return this.span;const re=this.getVariant(k,X);if(!re)throw new Error("unable to determine span for unrecognized variant");return re.getSpan(k,X)}defaultGetSourceVariant(k){if(Object.prototype.hasOwnProperty.call(k,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(k,this.defaultLayout.property))return;const X=this.registry[k[this.discriminator.property]];if(X&&(!X.layout||X.property&&Object.prototype.hasOwnProperty.call(k,X.property)))return X}else for(const X in this.registry){const re=this.registry[X];if(re.property&&Object.prototype.hasOwnProperty.call(k,re.property))return re}throw new Error("unable to infer src variant")}decode(k,X=0){let re;const ue=this.discriminator,pe=ue.decode(k,X),we=this.registry[pe];if(we===void 0){const Ce=this.defaultLayout;let St=0;this.usesPrefixDiscriminator&&(St=ue.layout.span),re=this.makeDestinationObject(),re[ue.property]=pe,re[Ce.property]=Ce.decode(k,X+St)}else re=we.decode(k,X);return re}encode(k,X,re=0){const ue=this.getSourceVariant(k);if(ue===void 0){const pe=this.discriminator,we=this.defaultLayout;let Ce=0;return this.usesPrefixDiscriminator&&(Ce=pe.layout.span),pe.encode(k[pe.property],X,re),Ce+we.encode(k[we.property],X,re+Ce)}return ue.encode(k,X,re)}addVariant(k,X,re){const ue=new M(this,k,X,re);return this.registry[k]=ue,ue}getVariant(k,X=0){let re;return k instanceof Uint8Array?re=this.discriminator.decode(k,X):re=k,this.registry[re]}}Oe.Union=J;class M extends r{constructor(k,X,re,ue){if(!(k instanceof J))throw new TypeError("union must be a Union");if(!Number.isInteger(X)||0>X)throw new TypeError("variant must be a (non-negative) integer");if(typeof re=="string"&&ue===void 0&&(ue=re,re=null),re){if(!(re instanceof r))throw new TypeError("layout must be a Layout");if(k.defaultLayout!==null&&0<=re.span&&re.span>k.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof ue!="string")throw new TypeError("variant must have a String property")}let pe=k.span;0>k.span&&(pe=re?re.span:0,0<=pe&&k.usesPrefixDiscriminator&&(pe+=k.discriminator.layout.span)),super(pe,ue),this.union=k,this.variant=X,this.layout=re||null}getSpan(k,X=0){if(0<=this.span)return this.span;let re=0;this.union.usesPrefixDiscriminator&&(re=this.union.discriminator.layout.span);let ue=0;return this.layout&&(ue=this.layout.getSpan(k,X+re)),re+ue}decode(k,X=0){const re=this.makeDestinationObject();if(this!==this.union.getVariant(k,X))throw new Error("variant mismatch");let ue=0;return this.union.usesPrefixDiscriminator&&(ue=this.union.discriminator.layout.span),this.layout?re[this.property]=this.layout.decode(k,X+ue):this.property?re[this.property]=!0:this.union.usesPrefixDiscriminator&&(re[this.union.discriminator.property]=this.variant),re}encode(k,X,re=0){let ue=0;if(this.union.usesPrefixDiscriminator&&(ue=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(k,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,X,re);let pe=ue;if(this.layout&&(this.layout.encode(k[this.property],X,re+ue),pe+=this.layout.getSpan(X,re+ue),0<=this.union.span&&pe>this.union.span))throw new Error("encoded variant overruns containing union");return pe}fromArray(k){if(this.layout)return this.layout.fromArray(k)}}Oe.VariantLayout=M;function m(v){return 0>v&&(v+=4294967296),v}class E extends r{constructor(k,X,re){if(!(k instanceof d||k instanceof h))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof X=="string"&&re===void 0&&(re=X,X=!1),4<k.span)throw new RangeError("word cannot exceed 32 bits");super(k.span,re),this.word=k,this.msb=!!X,this.fields=[];let ue=0;this._packedSetValue=function(pe){return ue=m(pe),this},this._packedGetValue=function(){return ue}}decode(k,X=0){const re=this.makeDestinationObject(),ue=this.word.decode(k,X);this._packedSetValue(ue);for(const pe of this.fields)pe.property!==void 0&&(re[pe.property]=pe.decode(k));return re}encode(k,X,re=0){const ue=this.word.decode(X,re);this._packedSetValue(ue);for(const pe of this.fields)if(pe.property!==void 0){const we=k[pe.property];we!==void 0&&pe.encode(we)}return this.word.encode(this._packedGetValue(),X,re)}addField(k,X){const re=new C(this,k,X);return this.fields.push(re),re}addBoolean(k){const X=new N(this,k);return this.fields.push(X),X}fieldFor(k){if(typeof k!="string")throw new TypeError("property must be string");for(const X of this.fields)if(X.property===k)return X}}Oe.BitStructure=E;class C{constructor(k,X,re){if(!(k instanceof E))throw new TypeError("container must be a BitStructure");
706if(!Number.isInteger(X)||0>=X)throw new TypeError("bits must be positive integer");const ue=8*k.span,pe=k.fields.reduce((we,Ce)=>we+Ce.bits,0);if(X+pe>ue)throw new Error("bits too long for span remainder ("+(ue-pe)+" of "+ue+" remain)");this.container=k,this.bits=X,this.valueMask=(1<<X)-1,X===32&&(this.valueMask=4294967295),this.start=pe,this.container.msb&&(this.start=ue-pe-X),this.wordMask=m(this.valueMask<<this.start),this.property=re}decode(k,X){const re=this.container._packedGetValue();return m(re&this.wordMask)>>>this.start}encode(k){if(typeof k!="number"||!Number.isInteger(k)||k!==m(k&this.valueMask))throw new TypeError(i("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const X=this.container._packedGetValue(),re=m(k<<this.start);this.container._packedSetValue(m(X&~this.wordMask)|re)}}Oe.BitField=C;class N extends C{constructor(k,X){super(k,1,X)}decode(k,X){return!!super.decode(k,X)}encode(k){typeof k=="boolean"&&(k=+k),super.encode(k)}}Oe.Boolean=N;class P extends r{constructor(k,X){if(!(k instanceof o&&k.isCount()||Number.isInteger(k)&&0<=k))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let re=-1;k instanceof o||(re=k),super(re,X),this.length=k}getSpan(k,X){let re=this.span;return 0>re&&(re=this.length.decode(k,X)),re}decode(k,X=0){let re=this.span;return 0>re&&(re=this.length.decode(k,X)),n(k).slice(X,X+re)}encode(k,X,re){let ue=this.length;if(this.length instanceof o&&(ue=k.length),!(k instanceof Uint8Array&&ue===k.length))throw new TypeError(i("Blob.encode",this)+" requires (length "+ue+") Uint8Array as src");if(re+ue>X.length)throw new RangeError("encoding overruns Uint8Array");const pe=n(k);return n(X).write(pe.toString("hex"),re,ue,"hex"),this.length instanceof o&&this.length.encode(ue,X,re),ue}}Oe.Blob=P;class B extends r{constructor(k){super(-1,k)}getSpan(k,X=0){t(k);let re=X;for(;re<k.length&&k[re]!==0;)re+=1;return 1+re-X}decode(k,X=0){const re=this.getSpan(k,X);return n(k).slice(X,X+re-1).toString("utf-8")}encode(k,X,re=0){typeof k!="string"&&(k=String(k));const ue=e.Buffer.from(k,"utf8"),pe=ue.length;if(re+pe>X.length)throw new RangeError("encoding overruns Buffer");const we=n(X);return ue.copy(we,re),we[re+pe]=0,pe+1}}Oe.CString=B;class O extends r{constructor(k,X){if(typeof k=="string"&&X===void 0&&(X=k,k=void 0),k===void 0)k=-1;else if(!Number.isInteger(k))throw new TypeError("maxSpan must be an integer");super(-1,X),this.maxSpan=k}getSpan(k,X=0){return t(k),k.length-X}decode(k,X=0){const re=this.getSpan(k,X);if(0<=this.maxSpan&&this.maxSpan<re)throw new RangeError("text length exceeds maxSpan");return n(k).slice(X,X+re).toString("utf-8")}encode(k,X,re=0){typeof k!="string"&&(k=String(k));const ue=e.Buffer.from(k,"utf8"),pe=ue.length;if(0<=this.maxSpan&&this.maxSpan<pe)throw new RangeError("text length exceeds maxSpan");if(re+pe>X.length)throw new RangeError("encoding overruns Buffer");return ue.copy(n(X),re),pe}}Oe.UTF8=O;class j extends r{constructor(k,X){super(0,X),this.value=k}decode(k,X){return this.value}encode(k,X,re){return 0}}return Oe.Constant=j,Oe.greedy=((v,k)=>new a(v,k)),Oe.offset=((v,k,X)=>new c(v,k,X)),Oe.u8=(v=>new d(1,v)),Oe.u16=(v=>new d(2,v)),Oe.u24=(v=>new d(3,v)),Oe.u32=(v=>new d(4,v)),Oe.u40=(v=>new d(5,v)),Oe.u48=(v=>new d(6,v)),Oe.nu64=(v=>new I(v)),Oe.u16be=(v=>new h(2,v)),Oe.u24be=(v=>new h(3,v)),Oe.u32be=(v=>new h(4,v)),Oe.u40be=(v=>new h(5,v)),Oe.u48be=(v=>new h(6,v)),Oe.nu64be=(v=>new L(v)),Oe.s8=(v=>new y(1,v)),Oe.s16=(v=>new y(2,v)),Oe.s24=(v=>new y(3,v)),Oe.s32=(v=>new y(4,v)),Oe.s40=(v=>new y(5,v)),Oe.s48=(v=>new y(6,v)),Oe.ns64=(v=>new D(v)),Oe.s16be=(v=>new g(2,v)),Oe.s24be=(v=>new g(3,v)),Oe.s32be=(v=>new g(4,v)),Oe.s40be=(v=>new g(5,v)),Oe.s48be=(v=>new g(6,v)),Oe.ns64be=(v=>new F(v)),Oe.f32=(v=>new $(v)),Oe.f32be=(v=>new z(v)),Oe.f64=(v=>new V(v)),Oe.f64be=(v=>new K(v)),Oe.struct=((v,k,X)=>new Q(v,k,X)),Oe.bits=((v,k,X)=>new E(v,k,X)),Oe.seq=((v,k,X)=>new te(v,k,X)),Oe.union=((v,k,X)=>new J(v,k,X)),Oe.unionLayoutDiscriminator=((v,k)=>new ne(v,k)),Oe.blob=((v,k)=>new P(v,k)),Oe.cstr=(v=>new B(v)),Oe.utf8=((v,k)=>new O(v,k)),Oe.constant=((v,k)=>new j(v,k)),Oe}var ye=Jxe(),eve=8078e3,tve=8078001,nve=8078004,rve=8078005,ive=8078006,sve=8078011;function pU(e){return Array.isArray(e)?"%5B"+e.map(pU).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function ove([e,t]){return`${e}=${pU(t)}`}function ave(e){const t=Object.entries(e).map(ove).join("&");return btoa(t)}function cve(e,t={}){{let n=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(n+=` '${ave(t)}'`),`${n}\``}}
vendor: 15,605 bytes, line 706
706var Ry=class extends Error{constructor(...[t,n]){let r,i;if(n){const{cause:o,...a}=n;o&&(i={cause:o}),Object.keys(a).length>0&&(r=a)}const s=cve(t,r);super(s,i);Ti(this,"cause",this.cause);Ti(this,"context");this.context={__code:t,...r},this.name="SolanaError"}};function uve(e,t){return"fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function lve(e){return Object.freeze({...e,encode:t=>{const n=new Uint8Array(uve(t,e));return e.write(t,n,0),n}})}function dve(e){return Object.freeze({...e,decode:(t,n=0)=>e.read(t,n)[0]})}function iy(e){return"fixedSize"in e&&typeof e.fixedSize=="number"}function fve(e,t){if(iy(e)!==iy(t))throw new Ry(nve);if(iy(e)&&iy(t)&&e.fixedSize!==t.fixedSize)throw new Ry(rve,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!iy(e)&&!iy(t)&&e.maxSize!==t.maxSize)throw new Ry(ive,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return{...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function hve(e,t,n=0){if(t.length-n<=0)throw new Ry(eve,{codecDescription:e})}function pve(e,t,n,r=0){const i=n.length-r;if(i<t)throw new Ry(tve,{bytesLength:i,codecDescription:e,expected:t})}function mve(e,t,n,r){if(r<t||r>n)throw new Ry(sve,{codecDescription:e,max:n,min:t,value:r})}function mU(e){return e?.endian!==1}function yve(e){return lve({fixedSize:e.size,write(t,n,r){e.range&&mve(e.name,e.range[0],e.range[1],t);const i=new ArrayBuffer(e.size);return e.set(new DataView(i),t,mU(e.config)),n.set(new Uint8Array(i),r),r+e.size}})}function gve(e){return dve({fixedSize:e.size,read(t,n=0){hve(e.name,t,n),pve(e.name,e.size,t,n);const r=new DataView(bve(t,n,e.size));return[e.get(r,mU(e.config)),n+e.size]}})}function bve(e,t,n){const r=e.byteOffset+(t??0),i=n??e.byteLength;return e.buffer.slice(r,r+i)}var xve=(e={})=>yve({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,n,r)=>t.setBigUint64(0,BigInt(n),r),size:8}),vve=(e={})=>gve({config:e,get:(t,n)=>t.getBigUint64(0,n),name:"u64",size:8}),wve=(e={})=>fve(xve(e),vve(e));class Eve extends TypeError{constructor(t,n){let r;const{message:i,explanation:s,...o}=t,{path:a}=t,c=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??c),s!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[t,...n()])}}function _ve(e){return hw(e)&&typeof e[Symbol.iterator]=="function"}function hw(e){return typeof e=="object"&&e!=null}function G6(e){return hw(e)&&!Array.isArray(e)}function Uc(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Sve(e){const{done:t,value:n}=e.next();return t?void 0:n}function Tve(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:s}=t,{type:o}=n,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${Uc(r)}\``}=e;return{value:r,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...e,message:c}}function*ZM(e,t,n,r){_ve(e)||(e=[e]);for(const i of e){const s=Tve(i,t,n,r);s&&(yield s)}}function*Fk(e,t,n={}){const{path:r=[],branch:i=[e],coerce:s=!1,mask:o=!1}=n,a={path:r,branch:i,mask:o};s&&(e=t.coercer(e,a));let c="valid";for(const d of t.validator(e,a))d.explanation=n.message,c="not_valid",yield[d,void 0];for(let[d,h,y]of t.entries(e,a)){const g=Fk(h,y,{path:d===void 0?r:[...r,d],branch:d===void 0?i:[...i,h],coerce:s,mask:o,message:n.message});for(const x of g)x[0]?(c=x[0].refinement!=null?"not_refined":"not_valid",yield[x[0],void 0]):s&&(h=x[1],d===void 0?e=h:e instanceof Map?e.set(d,h):e instanceof Set?e.add(h):hw(e)&&(h!==void 0||d in e)&&(e[d]=h))}if(c!=="not_valid")for(const d of t.refiner(e,a))d.explanation=n.message,c="not_refined",yield[d,void 0];c==="valid"&&(yield[void 0,e])}let rl=class{constructor(t){const{type:n,schema:r,validator:i,refiner:s,coercer:o=c=>c,entries:a=function*(){}}=t;this.type=n,this.schema=r,this.entries=a,this.coercer=o,i?this.validator=(c,d)=>{const h=i(c,d);return ZM(h,d,this,c)}:this.validator=()=>[],s?this.refiner=(c,d)=>{const h=s(c,d);return ZM(h,d,this,c)}:this.refiner=()=>[]}assert(t,n){return Ave(t,this,n)}create(t,n){return ct(t,this,n)}is(t){return yU(t,this)}mask(t,n){return kve(t,this,n)}validate(t,n={}){return pw(t,this,n)}};function Ave(e,t,n){const r=pw(e,t,{message:n});if(r[0])throw r[0]}function ct(e,t,n){const r=pw(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function kve(e,t,n){const r=pw(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}function yU(e,t){return!pw(e,t)[0]}function pw(e,t,n={}){const r=Fk(e,t,n),i=Sve(r);return i[0]?[new Eve(i[0],function*(){for(const o of r)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function b0(e,t){return new rl({type:e,schema:null,validator:t})}function Cve(){return b0("any",()=>!0)}function ft(e){return new rl({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${Uc(t)}`}})}function Qu(){return b0("boolean",e=>typeof e=="boolean")}function Dk(e){return b0("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${Uc(t)}`)}function Hr(e){const t=Uc(e),n=typeof e;return new rl({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||`Expected the literal \`${t}\`, but received: ${Uc(r)}`}})}function Ive(){return b0("never",()=>!1)}function mt(e){return new rl({...e,validator:(t,n)=>t===null||e.validator(t,n),refiner:(t,n)=>t===null||e.refiner(t,n)})}function je(){return b0("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${Uc(e)}`)}function Kt(e){return new rl({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function gU(e,t){return new rl({type:"record",schema:null,*entries(n){if(hw(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator(n){return G6(n)||`Expected an object, but received: ${Uc(n)}`},coercer(n){return G6(n)?{...n}:n}})}function it(){return b0("string",e=>typeof e=="string"||`Expected a string, but received: ${Uc(e)}`)}function $k(e){const t=Ive();return new rl({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let i=0;i<r;i++)yield[i,n[i],e[i]||t]}},validator(n){return Array.isArray(n)||`Expected an array, but received: ${Uc(n)}`},coercer(n){return Array.isArray(n)?n.slice():n}})}function Qe(e){const t=Object.keys(e);return new rl({type:"type",schema:e,*entries(n){if(hw(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return G6(n)||`Expected an object, but received: ${Uc(n)}`},coercer(n){return G6(n)?{...n}:n}})}function ao(e){const t=e.map(n=>n.type).join(" | ");return new rl({type:"union",schema:null,coercer(n,r){for(const i of e){const[s,o]=i.validate(n,{coerce:!0,mask:r.mask});if(!s)return o}return n},validator(n,r){const i=[];for(const s of e){const[...o]=Fk(n,s,r),[a]=o;if(a[0])for(const[c]of o)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${Uc(n)}`,...i]}})}function e1(){return b0("unknown",()=>!0)}function mw(e,t,n){return new rl({...e,coercer:(r,i)=>yU(r,t)?e.coercer(n(r,i),i):e.coercer(r,i)})}var w5,Rve=new Uint8Array(16);function bU(){if(!w5&&(w5=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!w5))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return w5(Rve)}const Mve=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function _E(e){return typeof e=="string"&&Mve.test(e)}var as=[];for(var A_=0;A_<256;++A_)as.push((A_+256).toString(16).substr(1));function SE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(as[e[t+0]]+as[e[t+1]]+as[e[t+2]]+as[e[t+3]]+"-"+as[e[t+4]]+as[e[t+5]]+"-"+as[e[t+6]]+as[e[t+7]]+"-"+as[e[t+8]]+as[e[t+9]]+"-"+as[e[t+10]]+as[e[t+11]]+as[e[t+12]]+as[e[t+13]]+as[e[t+14]]+as[e[t+15]]).toLowerCase();if(!_E(n))throw TypeError("Stringified UUID is invalid");return n}var XM,k_,C_=0,I_=0;function Nve(e,t,n){var r=t&&n||0,i=t||new Array(16);e=e||{};var s=e.node||XM,o=e.clockseq!==void 0?e.clockseq:k_;if(s==null||o==null){var a=e.random||(e.rng||bU)();s==null&&(s=XM=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),o==null&&(o=k_=(a[6]<<8|a[7])&16383)}var c=e.msecs!==void 0?e.msecs:Date.now(),d=e.nsecs!==void 0?e.nsecs:I_+1,h=c-C_+(d-I_)/1e4;if(h<0&&e.clockseq===void 0&&(o=o+1&16383),(h<0||c>C_)&&e.nsecs===void 0&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");C_=c,I_=d,k_=o,c+=122192928e5;var y=((c&268435455)*1e4+d)%4294967296;i[r++]=y>>>24&255,i[r++]=y>>>16&255,i[r++]=y>>>8&255,i[r++]=y&255;var g=c/4294967296*1e4&268435455;i[r++]=g>>>8&255,i[r++]=g&255,i[r++]=g>>>24&15|16,i[r++]=g>>>16&255,i[r++]=o>>>8|128,i[r++]=o&255;for(var x=0;x<6;++x)i[r+x]=s[x];return t||SE(i)}function xU(e){if(!_E(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}function jve(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}var Pve="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Ove="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function vU(e,t,n){function r(i,s,o,a){if(typeof i=="string"&&(i=jve(i)),typeof s=="string"&&(s=xU(s)),s.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+i.length);if(c.set(s),c.set(i,s.length),c=n(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,o){a=a||0;for(var d=0;d<16;++d)o[a+d]=c[d];return o}return SE(c)}try{r.name=e}catch{}return r.DNS=Pve,r.URL=Ove,r}function Lve(e){if(typeof e=="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return Bve(Fve(Dve(e),e.length*8))}function Bve(e){for(var t=[],n=e.length*32,r="0123456789abcdef",i=0;i<n;i+=8){var s=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(s>>>4&15)+r.charAt(s&15),16);t.push(o)}return t}function wU(e){return(e+64>>>9<<4)+14+1}function Fve(e,t){e[t>>5]|=128<<t%32,e[wU(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,s=271733878,o=0;o<e.length;o+=16){var a=n,c=r,d=i,h=s;n=Ss(n,r,i,s,e[o],7,-680876936),s=Ss(s,n,r,i,e[o+1],12,-389564586),i=Ss(i,s,n,r,e[o+2],17,606105819),r=Ss(r,i,s,n,e[o+3],22,-1044525330),n=Ss(n,r,i,s,e[o+4],7,-176418897),s=Ss(s,n,r,i,e[o+5],12,1200080426),i=Ss(i,s,n,r,e[o+6],17,-1473231341),r=Ss(r,i,s,n,e[o+7],22,-45705983),n=Ss(n,r,i,s,e[o+8],7,1770035416),s=Ss(s,n,r,i,e[o+9],12,-1958414417),i=Ss(i,s,n,r,e[o+10],17,-42063),r=Ss(r,i,s,n,e[o+11],22,-1990404162),n=Ss(n,r,i,s,e[o+12],7,1804603682),s=Ss(s,n,r,i,e[o+13],12,-40341101),i=Ss(i,s,n,r,e[o+14],17,-1502002290),r=Ss(r,i,s,n,e[o+15],22,1236535329),n=Ts(n,r,i,s,e[o+1],5,-165796510),s=Ts(s,n,r,i,e[o+6],9,-1069501632),i=Ts(i,s,n,r,e[o+11],14,643717713),r=Ts(r,i,s,n,e[o],20,-373897302),n=Ts(n,r,i,s,e[o+5],5,-701558691),s=Ts(s,n,r,i,e[o+10],9,38016083),i=Ts(i,s,n,r,e[o+15],14,-660478335),r=Ts(r,i,s,n,e[o+4],20,-405537848),n=Ts(n,r,i,s,e[o+9],5,568446438),s=Ts(s,n,r,i,e[o+14],9,-1019803690),i=Ts(i,s,n,r,e[o+3],14,-187363961),r=Ts(r,i,s,n,e[o+8],20,1163531501),n=Ts(n,r,i,s,e[o+13],5,-1444681467),s=Ts(s,n,r,i,e[o+2],9,-51403784),i=Ts(i,s,n,r,e[o+7],14,1735328473),r=Ts(r,i,s,n,e[o+12],20,-1926607734),n=As(n,r,i,s,e[o+5],4,-378558),s=As(s,n,r,i,e[o+8],11,-2022574463),i=As(i,s,n,r,e[o+11],16,1839030562),r=As(r,i,s,n,e[o+14],23,-35309556),n=As(n,r,i,s,e[o+1],4,-1530992060),s=As(s,n,r,i,e[o+4],11,1272893353),i=As(i,s,n,r,e[o+7],16,-155497632),r=As(r,i,s,n,e[o+10],23,-1094730640),n=As(n,r,i,s,e[o+13],4,681279174),s=As(s,n,r,i,e[o],11,-358537222),i=As(i,s,n,r,e[o+3],16,-722521979),r=As(r,i,s,n,e[o+6],23,76029189),n=As(n,r,i,s,e[o+9],4,-640364487),s=As(s,n,r,i,e[o+12],11,-421815835),i=As(i,s,n,r,e[o+15],16,530742520),r=As(r,i,s,n,e[o+2],23,-995338651),n=ks(n,r,i,s,e[o],6,-198630844),s=ks(s,n,r,i,e[o+7],10,1126891415),i=ks(i,s,n,r,e[o+14],15,-1416354905),r=ks(r,i,s,n,e[o+5],21,-57434055),n=ks(n,r,i,s,e[o+12],6,1700485571),s=ks(s,n,r,i,e[o+3],10,-1894986606),i=ks(i,s,n,r,e[o+10],15,-1051523),r=ks(r,i,s,n,e[o+1],21,-2054922799),n=ks(n,r,i,s,e[o+8],6,1873313359),s=ks(s,n,r,i,e[o+15],10,-30611744),i=ks(i,s,n,r,e[o+6],15,-1560198380),r=ks(r,i,s,n,e[o+13],21,1309151649),n=ks(n,r,i,s,e[o+4],6,-145523070),s=ks(s,n,r,i,e[o+11],10,-1120210379),i=ks(i,s,n,r,e[o+2],15,718787259),r=ks(r,i,s,n,e[o+9],21,-343485551),n=Vf(n,a),r=Vf(r,c),i=Vf(i,d),s=Vf(s,h)}return[n,r,i,s]}function Dve(e){if(e.length===0)return[];for(var t=e.length*8,n=new Uint32Array(wU(t)),r=0;r<t;r+=8)n[r>>5]|=(e[r/8]&255)<<r%32;return n}function Vf(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function $ve(e,t){return e<<t|e>>>32-t}function TE(e,t,n,r,i,s){return Vf($ve(Vf(Vf(t,e),Vf(r,s)),i),n)}function Ss(e,t,n,r,i,s,o){return TE(t&n|~t&r,e,t,i,s,o)}function Ts(e,t,n,r,i,s,o){return TE(t&r|n&~r,e,t,i,s,o)}function As(e,t,n,r,i,s,o){return TE(t^n^r,e,t,i,s,o)}function ks(e,t,n,r,i,s,o){return TE(n^(t|~r),e,t,i,s,o)}var Uve=vU("v3",48,Lve);function zve(e,t,n){e=e||{};var r=e.random||(e.rng||bU)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return SE(r)}function Vve(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function R_(e,t){return e<<t|e>>>32-t}function qve(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var s=e.length/4+2,o=Math.ceil(s/16),a=new Array(o),c=0;c<o;++c){for(var d=new Uint32Array(16),h=0;h<16;++h)d[h]=e[c*64+h*4]<<24|e[c*64+h*4+1]<<16|e[c*64+h*4+2]<<8|e[c*64+h*4+3];a[c]=d}a[o-1][14]=(e.length-1)*8/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8&4294967295;for(var y=0;y<o;++y){for(var g=new Uint32Array(80),x=0;x<16;++x)g[x]=a[y][x];for(var _=16;_<80;++_)g[_]=R_(g[_-3]^g[_-8]^g[_-14]^g[_-16],1);for(var S=n[0],I=n[1],L=n[2],D=n[3],F=n[4],$=0;$<80;++$){var z=Math.floor($/20),V=R_(S,5)+Vve(z,I,L,D)+F+t[z]+g[$]>>>0;F=D,D=L,L=R_(I,30)>>>0,I=S,S=V}n[0]=n[0]+S>>>0,n[1]=n[1]+I>>>0,n[2]=n[2]+L>>>0,n[3]=n[3]+D>>>0,n[4]=n[4]+F>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,n[0]&255,n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,n[1]&255,n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,n[2]&255,n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,n[3]&255,n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,n[4]&255]}var Hve=vU("v5",80,qve);const Wve="00000000-0000-0000-0000-000000000000";function Gve(e){if(!_E(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const Kve=Object.freeze(Object.defineProperty({__proto__:null,NIL:Wve,parse:xU,stringify:SE,v1:Nve,v3:Uve,v4:zve,v5:Hve,validate:_E,version:Gve},Symbol.toStringTag,{value:"Module"})),EU=IN(Kve);var M_,QM;function Yve(){if(QM)return M_;QM=1;const e=EU.v4;
706return M_=function(n,r,i,s){if(typeof n!="string")throw new TypeError(n+" must be a string");s=s||{};const o=typeof s.version=="number"?s.version:2;if(o!==1&&o!==2)throw new TypeError(o+" must be 1 or 2");const a={method:n};if(o===2&&(a.jsonrpc="2.0"),r){if(typeof r!="object"&&!Array.isArray(r))throw new TypeError(r+" must be an object, array or omitted");a.params=r}if(typeof i>"u"){const c=typeof s.generator=="function"?s.generator:function(){return e()};a.id=c(a,s)}else o===2&&i===null?s.notificationIdNull&&(a.id=null):a.id=i;return a},M_}var N_,JM;function Zve(){if(JM)return N_;JM=1;const e=EU.v4,t=Yve(),n=function(r,i){if(!(this instanceof n))return new n(r,i);i||(i={}),this.options={reviver:typeof i.reviver<"u"?i.reviver:null,replacer:typeof i.replacer<"u"?i.replacer:null,generator:typeof i.generator<"u"?i.generator:function(){return e()},version:typeof i.version<"u"?i.version:2,notificationIdNull:typeof i.notificationIdNull=="boolean"?i.notificationIdNull:!1},this.callServer=r};return N_=n,n.prototype.request=function(r,i,s,o){const a=this;let c=null;const d=Array.isArray(r)&&typeof i=="function";if(this.options.version===1&&d)throw new TypeError("JSON-RPC 1.0 does not support batching");if(d||!d&&r&&typeof r=="object"&&typeof i=="function")o=i,c=r;else{typeof s=="function"&&(o=s,s=void 0);const g=typeof o=="function";try{c=t(r,i,s,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(x){if(g)return o(x);throw x}if(!g)return c}let y;try{y=JSON.stringify(c,this.options.replacer)}catch(g){return o(g)}return this.callServer(y,function(g,x){a._parseResponse(g,x,o)}),c},n.prototype._parseResponse=function(r,i,s){if(r){s(r);return}if(!i)return s();let o;try{o=JSON.parse(i,this.options.reviver)}catch(a){return s(a)}if(s.length===3)if(Array.isArray(o)){const a=function(d){return typeof d.error<"u"},c=function(d){return!a(d)};return s(null,o.filter(a),o.filter(c))}else return s(null,o.error,o.result);s(null,o)},N_}var Xve=Zve();const Qve=va(Xve);var Jve=class extends Nv{constructor(t,n,r){super();Ti(this,"socket");this.socket=new window.WebSocket(t,r),this.socket.onopen=()=>
706this.emit("open"),this.socket.onmessage=i=>this.emit("message",i.data),this.socket.onerror=i=>this.emit("error",i),this.socket.onclose=i=>{this.emit("close",i.code,i.reason)}}send(t,n,r){const i=r||n;try{this.socket.send(t),i()}catch(s){i(s)}}close(t,n){this.socket.close(t,n)}addEventListener(t,n,r){this.socket.addEventListener(t,n,r)}};function ewe(e,t){return new Jve(e,t)}var twe=class{encode(e){return JSON.stringify(e)}decode(e){return JSON.parse(e)}},nwe=class extends Nv{constructor(t,n="ws://localhost:8080",{autoconnect:r=!0,reconnect:i=!0,reconnect_interval:s=1e3,max_reconnects:o=5,...a}={},c,d){super();Ti(this,"address");Ti(this,"rpc_id");Ti(this,"queue");Ti(this,"options");Ti(this,"autoconnect");Ti(this,"ready");Ti(this,"reconnect");Ti(this,"reconnect_timer_id");Ti(this,"reconnect_interval");Ti(this,"max_reconnects");Ti(this,"rest_options");Ti(this,"current_reconnects");Ti(this,"generate_request_id");Ti(this,"socket");Ti(this,"webSocketFactory");Ti(this,"dataPack");this.webSocketFactory=t,this.queue={},this.rpc_id=0,this.address=n,this.autoconnect=r,this.ready=!1,this.reconnect=i,this.reconnect_timer_id=void 0,this.reconnect_interval=s,this.max_reconnects=o,this.rest_options=a,this.current_reconnects=0,this.generate_request_id=c||(()=>typeof this.rpc_id=="number"?++this.rpc_id:Number(this.rpc_id)+1),d?this.dataPack=d:this.dataPack=new twe,this.autoconnect&&this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}connect(){this.socket||this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}call(t,n,r,i){return!i&&typeof r=="object"&&(i=r,r=null),new Promise((s,o)=>{if(!this.ready)return o(new Error("socket not ready"));const a=this.generate_request_id(t,n),c={jsonrpc:"2.0",method:t,params:n||void 0,id:a};this.socket.send(this.dataPack.encode(c),i,d=>{if(d)return o(d);this.queue[a]={promise:[s,o]},r&&(this.queue[a].timeout=setTimeout(()=>{delete this.queue[a],o(new Error("reply timeout"))},r))})})}async login(t){const n=await this.call("rpc.login",t);if(!n)throw new Error("authentication failed");return n}async listMethods(){return await this.call("__listMethods")}notify(t,n){return new Promise((r,i)=>{if(!this.ready)return i(new Error("socket not ready"));const s={jsonrpc:"2.0",method:t,params:n};this.socket.send(this.dataPack.encode(s),o=>{if(o)return i(o);r()})})}async subscribe(t){typeof t=="string"&&(t=[t]);const n=await this.call("rpc.on",t);if(typeof t=="string"&&n[t]!=="ok")throw new Error("Failed subscribing to an event '"+t+"' with: "+n[t]);return n}async unsubscribe(t){typeof t=="string"&&(t=[t]);const n=await this.call("rpc.off",t);if(typeof t=="string"&&n[t]!=="ok")throw new Error("Failed unsubscribing from an event with: "+n);return n}close(t,n){this.socket&&this.socket.close(t||1e3,n)}setAutoReconnect(t){this.reconnect=t}setReconnectInterval(t){this.reconnect_interval=t}setMaxReconnects(t){this.max_reconnects=t}getCurrentReconnects(){return this.current_reconnects}getMaxReconnects(){return this.max_reconnects}isReconnecting(){return this.reconnect_timer_id!==void 0}willReconnect(){return this.reconnect&&(this.max_reconnects===0||this.current_reconnects<this.max_reconnects)}_connect(t,n){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(t,n),this.socket.addEventListener("open",()=>{this.ready=!0,this.emit("open"),this.current_reconnects=0}),this.socket.addEventListener("message",({data:r})=>{r instanceof ArrayBuffer&&(r=Nn.from(r).toString());try{r=this.dataPack.decode(r)}catch{return}if(r.notification&&this.listeners(r.notification).length){if(!Object.keys(r.params).length)return this.emit(r.notification);const i=[r.notification];if(r.params.constructor===Object)i.push(r.params);else for(let s=0;s<r.params.length;s++)i.push(r.params[s]);return Promise.resolve().then(()=>{this.emit.apply(this,i)})}if(!this.queue[r.id])return r.method?Promise.resolve().then(()=>
706{this.emit(r.method,r?.params)}):void 0;"error"in r=="result"in r&&this.queue[r.id].promise[1](new Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[r.id].timeout&&clearTimeout(this.queue[r.id].timeout),r.error?this.queue[r.id].promise[1](r.error):this.queue[r.id].promise[0](r.result),delete this.queue[r.id]}),this.socket.addEventListener("error",r=>this.emit("error",r)),this.socket.addEventListener("close",({code:r,reason:i})=>{this.ready&&setTimeout(()=>this.emit("close",r,i),0),this.ready=!1,this.socket=void 0,r!==1e3&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||this.max_reconnects===0)?this.reconnect_timer_id=setTimeout(()=>this._connect(t,n),this.reconnect_interval):this.reconnect&&this.max_reconnects>0&&this.current_reconnects>=this.max_reconnects&&setTimeout(()=>this.emit("max_reconnects_reached",r,i),1))})}};class _U extends V${constructor(t,n){super(),this.finished=!1,this.destroyed=!1,U$(t);const r=Mk(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(r.length>i?t.create().update(r).digest():r);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=t.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),xg(s)}update(t){return D6(this),this.iHash.update(t),this}digestInto(t){D6(this),y0(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return t=t,t.finished=i,t.destroyed=s,t.blockLen=o,t.outputLen=a,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const SU=(e,t,n)=>new _U(e,t).update(n).digest();SU.create=(e,t)=>new _U(e,t);const eN=(e,t)=>(e+(e>=0?t:-t)/TU)/t;function rwe(e,t,n){const[[r,i],[s,o]]=t,a=eN(o*e,n),c=eN(-i*e,n);let d=e-a*r-c*s,h=-a*i-c*o;const y=d<Gl,g=h<Gl;y&&(d=-d),g&&(h=-h);const x=lw(Math.ceil(Y$(n)/2))+My;if(d<Gl||d>=x||h<Gl||h>=x)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:y,k1:d,k2neg:g,k2:h}}function FT(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function j_(e,t){const n={};for(let r of Object.keys(t))n[r]=e[r]===void 0?t[r]:e[r];return s0(n.lowS,"lowS"),s0(n.prehash,"prehash"),n.format!==void 0&&FT(n.format),n}class iwe extends Error{constructor(t=""){super(t)}}const Bl={Err:iwe,_tlv:{encode:(e,t)=>{const{Err:n}=Bl;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,i=x5(r);if(i.length/2&128)throw new n("tlv.encode: long form length too big");const s=r>127?x5(i.length/2|128):"";return x5(e)+s+i+t},decode(e,t){const{Err:n}=Bl;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const i=t[r++],s=!!(i&128);let o=0;if(!s)o=i;else{const c=i&127;if(!c)throw new n("tlv.decode(long): indefinite length not supported");if(c>4)throw new n("tlv.decode(long): byte length is too big");const d=t.subarray(r,r+c);if(d.length!==c)throw new n("tlv.decode: length bytes not complete");if(d[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const h of d)o=o<<8|h;if(r+=c,o<128)throw new n("tlv.decode(long): not minimal encoding")}const a=t.subarray(r,r+o);if(a.length!==o)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+o)}}},_int:{encode(e){const{Err:t}=Bl;if(e<Gl)throw new t("integer: negative integers are not allowed");let n=x5(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=Bl;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return vE(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=Bl,i=ti("signature",e),{v:s,l:o}=r.decode(48,i);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l:c}=r.decode(2,s),{v:d,l:h}=r.decode(2,c);if(h.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(d)}},hexFromSig(e){const{_tlv:t,_int:n}=Bl,r=t.encode(2,n.encode(e.r)),i=t.encode(2,n.encode(e.s)),s=r+i;return t.encode(48,s)}},Gl=BigInt(0),My=BigInt(1),TU=BigInt(2),E5=BigInt(3),swe=BigInt(4);function py(e,t){const{BYTES:n}=e;let r;if(typeof t=="bigint")r=t;else{let i=ti("private key",t);try{r=e.fromBytes(i)}catch{throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw new Error("invalid private key: out of range [1..N-1]");return r}function owe(e,t={}){const n=dU("weierstrass",e,t),{Fp:r,Fn:i}=n;let s=n.CURVE;const{h:o,n:a}=s;dw(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});
706const{endo:c}=t;if(c&&(!r.is0(s.a)||typeof c.beta!="bigint"||!Array.isArray(c.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const d=kU(r,i);function h(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function y(J,M,m){const{x:E,y:C}=M.toAffine(),N=r.toBytes(E);if(s0(m,"isCompressed"),m){h();const P=!r.isOdd(C);return Fu(AU(P),N)}else return Fu(Uint8Array.of(4),N,r.toBytes(C))}function g(J){Pc(J,void 0,"Point");const{publicKey:M,publicKeyUncompressed:m}=d,E=J.length,C=J[0],N=J.subarray(1);if(E===M&&(C===2||C===3)){const P=r.fromBytes(N);if(!r.isValid(P))throw new Error("bad point: is not on curve, wrong x");const B=S(P);let O;try{O=r.sqrt(B)}catch(k){const X=k instanceof Error?": "+k.message:"";throw new Error("bad point: is not on curve, sqrt error"+X)}h();const j=r.isOdd(O);return(C&1)===1!==j&&(O=r.neg(O)),{x:P,y:O}}else if(E===m&&C===4){const P=r.BYTES,B=r.fromBytes(N.subarray(0,P)),O=r.fromBytes(N.subarray(P,P*2));if(!I(B,O))throw new Error("bad point: is not on curve");return{x:B,y:O}}else throw new Error(`bad point: got length ${E}, expected compressed=${M} or uncompressed=${m}`)}const x=t.toBytes||y,_=t.fromBytes||g;function S(J){const M=r.sqr(J),m=r.mul(M,J);return r.add(r.add(m,r.mul(J,s.a)),s.b)}function I(J,M){const m=r.sqr(M),E=S(J);return r.eql(m,E)}if(!I(s.Gx,s.Gy))throw new Error("bad curve params: generator point");const L=r.mul(r.pow(s.a,E5),swe),D=r.mul(r.sqr(s.b),BigInt(27));if(r.is0(r.add(L,D)))throw new Error("bad curve params: a or b");function F(J,M,m=!1){if(!r.isValid(M)||m&&r.is0(M))throw new Error(`bad point coordinate ${J}`);return M}function $(J){if(!(J instanceof Q))throw new Error("ProjectivePoint expected")}function z(J){if(!c||!c.basises)throw new Error("no endo");return rwe(J,c.basises,i.ORDER)}const V=U6((J,M)=>{const{X:m,Y:E,Z:C}=J;if(r.eql(C,r.ONE))return{x:m,y:E};const N=J.is0();M==null&&(M=N?r.ONE:r.inv(C));const P=r.mul(m,M),B=r.mul(E,M),O=r.mul(C,M);if(N)return{x:r.ZERO,y:r.ZERO};if(!r.eql(O,r.ONE))throw new Error("invZ was invalid");return{x:P,y:B}}),K=U6(J=>{if(J.is0()){if(t.allowInfinityPoint&&!r.is0(J.Y))return;throw new Error("bad point: ZERO")}const{x:M,y:m}=J.toAffine();if(!r.isValid(M)||!r.isValid(m))throw new Error("bad point: x or y not field elements");if(!I(M,m))throw new Error("bad point: equation left != right");if(!J.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function te(J,M,m,E,C){return m=new Q(r.mul(m.X,J),m.Y,m.Z),M=z6(E,M),m=z6(C,m),M.add(m)}class Q{constructor(M,m,E){this.X=F("x",M),this.Y=F("y",m,!0),this.Z=F("z",E),Object.freeze(this)}static CURVE(){return s}static fromAffine(M){const{x:m,y:E}=M||{};if(!M||!r.isValid(m)||!r.isValid(E))throw new Error("invalid affine point");if(M instanceof Q)throw new Error("projective point not allowed");return r.is0(m)&&r.is0(E)?Q.ZERO:new Q(m,E,r.ONE)}static fromBytes(M){const m=Q.fromAffine(_(Pc(M,void 0,"point")));return m.assertValidity(),m}static fromHex(M){return Q.fromBytes(ti("pointHex",M))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(M=8,m=!0){return ne.createCache(this,M),m||this.multiply(E5),this}assertValidity(){K(this)}hasEvenY(){const{y:M}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(M)}equals(M){$(M);const{X:m,Y:E,Z:C}=this,{X:N,Y:P,Z:B}=M,O=r.eql(r.mul(m,B),r.mul(N,C)),j=r.eql(r.mul(E,B),r.mul(P,C));return O&&j}negate(){return new Q(this.X,r.neg(this.Y),this.Z)}double(){const{a:M,b:m}=s,E=r.mul(m,E5),{X:C,Y:N,Z:P}=this;let B=r.ZERO,O=r.ZERO,j=r.ZERO,v=r.mul(C,C),k=r.mul(N,N),X=r.mul(P,P),re=r.mul(C,N);return re=r.add(re,re),j=r.mul(C,P),j=r.add(j,j),B=r.mul(M,j),O=r.mul(E,X),O=r.add(B,O),B=r.sub(k,O),O=r.add(k,O),O=r.mul(B,O),B=r.mul(re,B),j=r.mul(E,j),X=r.mul(M,X),re=r.sub(v,X),re=r.mul(M,re),re=r.add(re,j),j=r.add(v,v),v=r.add(j,v),v=r.add(v,X),v=r.mul(v,re),O=r.add(O,v),X=r.mul(N,P),X=r.add(X,X),v=r.mul(X,re),B=r.sub(
706B,v),j=r.mul(X,k),j=r.add(j,j),j=r.add(j,j),new Q(B,O,j)}add(M){$(M);const{X:m,Y:E,Z:C}=this,{X:N,Y:P,Z:B}=M;let O=r.ZERO,j=r.ZERO,v=r.ZERO;const k=s.a,X=r.mul(s.b,E5);let re=r.mul(m,N),ue=r.mul(E,P),pe=r.mul(C,B),we=r.add(m,E),Ce=r.add(N,P);we=r.mul(we,Ce),Ce=r.add(re,ue),we=r.sub(we,Ce),Ce=r.add(m,C);let St=r.add(N,B);return Ce=r.mul(Ce,St),St=r.add(re,pe),Ce=r.sub(Ce,St),St=r.add(E,C),O=r.add(P,B),St=r.mul(St,O),O=r.add(ue,pe),St=r.sub(St,O),v=r.mul(k,Ce),O=r.mul(X,pe),v=r.add(O,v),O=r.sub(ue,v),v=r.add(ue,v),j=r.mul(O,v),ue=r.add(re,re),ue=r.add(ue,re),pe=r.mul(k,pe),Ce=r.mul(X,Ce),ue=r.add(ue,pe),pe=r.sub(re,pe),pe=r.mul(k,pe),Ce=r.add(Ce,pe),re=r.mul(ue,Ce),j=r.add(j,re),re=r.mul(St,Ce),O=r.mul(we,O),O=r.sub(O,re),re=r.mul(we,ue),v=r.mul(St,v),v=r.add(v,re),new Q(O,j,v)}subtract(M){return this.add(M.negate())}is0(){return this.equals(Q.ZERO)}multiply(M){const{endo:m}=t;if(!i.isValidNot0(M))throw new Error("invalid scalar: out of range");let E,C;const N=P=>ne.cached(this,P,B=>wp(Q,B));if(m){const{k1neg:P,k1:B,k2neg:O,k2:j}=z(M),{p:v,f:k}=N(B),{p:X,f:re}=N(j);C=k.add(re),E=te(m.beta,v,X,P,O)}else{const{p:P,f:B}=N(M);E=P,C=B}return wp(Q,[E,C])[0]}multiplyUnsafe(M){const{endo:m}=t,E=this;if(!i.isValid(M))throw new Error("invalid scalar: out of range");if(M===Gl||E.is0())return Q.ZERO;if(M===My)return E;if(ne.hasCache(this))return this.multiply(M);if(m){const{k1neg:C,k1:N,k2neg:P,k2:B}=z(M),{p1:O,p2:j}=pxe(Q,E,N,B);return te(m.beta,O,j,C,P)}else return ne.unsafe(E,M)}multiplyAndAddUnsafe(M,m,E){const C=this.multiplyUnsafe(m).add(M.multiplyUnsafe(E));return C.is0()?void 0:C}toAffine(M){return V(this,M)}isTorsionFree(){const{isTorsionFree:M}=t;return o===My?!0:M?M(Q,this):ne.unsafe(this,a).is0()}clearCofactor(){const{clearCofactor:M}=t;return o===My?this:M?M(Q,this):this.multiplyUnsafe(o)}isSmallOrder(){return this.multiplyUnsafe(o).is0()}toBytes(M=!0){return s0(M,"isCompressed"),this.assertValidity(),x(Q,this,M)}toHex(M=!0){return Np(this.toBytes(M))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(M=!0){return this.toBytes(M)}_setWindowSize(M){this.precompute(M)}static normalizeZ(M){return wp(Q,M)}static msm(M,m){return lU(Q,i,M,m)}static fromPrivateKey(M){return Q.BASE.multiply(py(i,M))}}Q.BASE=new Q(s.Gx,s.Gy,r.ONE),Q.ZERO=new Q(r.ZERO,r.ONE,r.ZERO),Q.Fp=r,Q.Fn=i;const ee=i.BITS,ne=new uU(Q,t.endo?Math.ceil(ee/2):ee);return Q.BASE.precompute(8),Q}function AU(e){return Uint8Array.of(e?2:3)}function kU(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function awe(e,t={}){const{Fn:n}=e,r=t.randomBytes||Nk,i=Object.assign(kU(e.Fp,n),{seed:oU(n.ORDER)});function s(x){try{return!!py(n,x)}catch{return!1}}function o(x,_){const{publicKey:S,publicKeyUncompressed:I}=i;try{const L=x.length;return _===!0&&L!==S||_===!1&&L!==I?!1:!!e.fromBytes(x)}catch{return!1}}function a(x=r(i.seed)){return dxe(Pc(x,i.seed,"seed"),n.ORDER)}function c(x,_=!0){return e.BASE.multiply(py(n,x)).toBytes(_)}function d(x){const _=a(x);return{secretKey:_,publicKey:c(_)}}function h(x){if(typeof x=="bigint")return!1;if(x instanceof e)return!0;const{secretKey:_,publicKey:S,publicKeyUncompressed:I}=i;if(n.allowedLengths||_===S)return;const L=ti("key",x).length;return L===S||L===I}function y(x,_,S=!0){if(h(x)===!0)throw new Error("first arg must be private key");if(h(_)===!1)throw new Error("second arg must be public key");const I=py(n,x);return e.fromHex(_).multiply(I).toBytes(S)}return Object.freeze({getPublicKey:c,getSharedSecret:y,keygen:d,Point:e,utils:{isValidSecretKey:s,isValidPublicKey:o,randomSecretKey:a,isValidPrivateKey:s,randomPrivateKey:a,normPrivateKeyToScalar:x=>py(n,x),precompute(x=8,_=e.BASE){return _.precompute(x,!1)}},lengths:i})}function cwe(e,t,n={}){U$(t),dw(n,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=n.randomBytes||Nk,i=n.hmac||((m,...E)=>SU(t,m,Fu(...E))),{Fp:s,Fn:o}=e,{ORDER:a,BITS:c}=o,{keygen:d,getPublicKey:h,getSharedSecret:y,utils:g,lengths:x}=awe(e,n),_={prehash:!1,lowS:typeof n.lowS=="boolean"?n.lowS:!1,format:void 0,extraEntropy:!1},S="compact";function I(m){const E=a>>My;return m>E}function L(m,E){if(!o.isValidNot0(E))throw new Error(`invalid signature ${m}: out of range 1..Point.Fn.ORDER`);return E}function D(m,E){FT(E);const C=x.signature,N=E==="compact"?C:E==="recovered"?C+1:void 0;return Pc(m,N,`${E} signature`)}class F{constructor(E,C,N){this.r=L("r",E),this.s=L("s",C),N!=null&&(this.recovery=N),Ob
706ject.freeze(this)}static fromBytes(E,C=S){D(E,C);let N;if(C==="der"){const{r:j,s:v}=Bl.toSig(Pc(E));return new F(j,v)}C==="recovered"&&(N=E[0],C="compact",E=E.subarray(1));const P=o.BYTES,B=E.subarray(0,P),O=E.subarray(P,P*2);return new F(o.fromBytes(B),o.fromBytes(O),N)}static fromHex(E,C){return this.fromBytes($6(E),C)}addRecoveryBit(E){return new F(this.r,this.s,E)}recoverPublicKey(E){const C=s.ORDER,{r:N,s:P,recovery:B}=this;if(B==null||![0,1,2,3].includes(B))throw new Error("recovery id invalid");if(a*TU<C&&B>1)throw new Error("recovery id is ambiguous for h>1 curve");const j=B===2||B===3?N+a:N;if(!s.isValid(j))throw new Error("recovery id 2 or 3 invalid");const v=s.toBytes(j),k=e.fromBytes(Fu(AU((B&1)===0),v)),X=o.inv(j),re=z(ti("msgHash",E)),ue=o.create(-re*X),pe=o.create(P*X),we=e.BASE.multiplyUnsafe(ue).add(k.multiplyUnsafe(pe));if(we.is0())throw new Error("point at infinify");return we.assertValidity(),we}hasHighS(){return I(this.s)}toBytes(E=S){if(FT(E),E==="der")return $6(Bl.hexFromSig(this));const C=o.toBytes(this.r),N=o.toBytes(this.s);if(E==="recovered"){if(this.recovery==null)throw new Error("recovery bit must be present");return Fu(Uint8Array.of(this.recovery),C,N)}return Fu(C,N)}toHex(E){return Np(this.toBytes(E))}assertValidity(){}static fromCompact(E){return F.fromBytes(ti("sig",E),"compact")}static fromDER(E){return F.fromBytes(ti("sig",E),"der")}normalizeS(){return this.hasHighS()?new F(this.r,o.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return Np(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return Np(this.toBytes("compact"))}}const $=n.bits2int||function(E){if(E.length>8192)throw new Error("input is too large");const C=vE(E),N=E.length*8-c;return N>0?C>>BigInt(N):C},z=n.bits2int_modN||function(E){return o.create($(E))},V=lw(c);function K(m){return BT("num < 2^"+c,m,Gl,V),o.toBytes(m)}function te(m,E){return Pc(m,void 0,"message"),E?Pc(t(m),void 0,"prehashed message"):m}function Q(m,E,C){if(["recovered","canonical"].some(ue=>ue in C))throw new Error("sign() legacy options not supported");const{lowS:N,prehash:P,extraEntropy:B}=j_(C,_);m=te(m,P);const O=z(m),j=py(o,E),v=[K(j),K(O)];if(B!=null&&B!==!1){const ue=B===!0?r(x.secretKey):B;v.push(ti("extraEntropy",ue))}const k=Fu(...v),X=O;function re(ue){const pe=$(ue);if(!o.isValidNot0(pe))return;const we=o.inv(pe),Ce=e.BASE.multiply(pe).toAffine(),St=o.create(Ce.x);if(St===Gl)return;const Ve=o.create(we*o.create(X+St*j));if(Ve===Gl)return;let et=(Ce.x===St?0:2)|Number(Ce.y&My),lt=Ve;return N&&I(Ve)&&(lt=o.neg(Ve),et^=1),new F(St,lt,et)}return{seed:k,k2sig:re}}function ee(m,E,C={}){m=ti("message",m);const{seed:N,k2sig:P}=Q(m,E,C);return txe(t.outputLen,o.BYTES,i)(N,P)}function ne(m){let E;const C=typeof m=="string"||uw(m),N=!C&&m!==null&&typeof m=="object"&&typeof m.r=="bigint"&&typeof m.s=="bigint";if(!C&&!N)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(N)E=new F(m.r,m.s);else if(C){try{E=F.fromBytes(ti("sig",m),"der")}catch(P){if(!(P instanceof Bl.Err))throw P}if(!E)try{E=F.fromBytes(ti("sig",m),"compact")}catch{return!1}}return E||!1}function J(m,E,C,N={}){const{lowS:P,prehash:B,format:O}=j_(N,_);if(C=ti("publicKey",C),E=te(ti("message",E),B),"strict"in N)throw new Error("options.strict was renamed to lowS");const j=O===void 0?ne(m):F.fromBytes(ti("sig",m),O);if(j===!1)return!1;try{const v=e.fromBytes(C);if(P&&j.hasHighS())return!1;const{r:k,s:X}=j,re=z(E),ue=o.inv(X),pe=o.create(re*ue),we=o.create(k*ue),Ce=e.BASE.multiplyUnsafe(pe).add(v.multiplyUnsafe(we));return Ce.is0()?!1:o.create(Ce.x)===k}catch{return!1}}function M(m,E,C={}){const{prehash:N}=j_(C,_);return E=te(E,N),F.fromBytes(m,"recovered").recoverPublicKey(E).toBytes()}return Object.freeze({keygen:d,getPublicKey:h,getSharedSecret:y,utils:g,lengths:x,Point:e,sign:ee,verify:J,recoverPublicKey:M,Signature:F,hash:t})}function uwe(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp;let r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(o=>Math.ceil(o/2)))):void 0;const i=g0(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),s={Fp:n,Fn:i,allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:s}}function lwe(e){const{CURVE:t,curveOpts:n}=uwe(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}function dwe(e,t){const n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,iU(n.Fn.ORDER,n.Fn.BITS))})}function fwe(e){const{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:i}=lwe(e),s=owe(t,n),o=cwe(s,r,i);return dwe(e,o)}function hwe(e,t){const n=r=>fwe({...e,hash:r});return{...n(t),create:n}}const Uk={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},pwe={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},tN=BigInt(2);function mwe(e){const t=Uk.p,n=BigInt(3),r=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),d=e*e*e%t,h=d*d*e%t,y=ei(h,n,t)*h%t,g=ei(y,n,t)*h%t,x=ei(g,tN,t)*d%t,_=ei(x,i,t)*x%t,S=ei(_,s,t)*_%t,I=ei(S,a,t)*S%t,L=ei(I,c,t)*I%t,D=ei(L,a,t)*S%t,F=ei(D,n,t)*h%t,$=ei(F,o,t)*_%t,z=ei($,r,t)*d%t,V=ei(z,tN,t);if(!DT.eql(DT.sqr(V),e))throw new Error("Cannot find square root");return V}const DT=g0(Uk.p,{sqrt:mwe}),ywe=hwe({...Uk,Fp:DT,lowS:!0,endo:pwe},Qbe);fw.utils.randomPrivateKey;fw.getPublicKey;function nN(e){try{return fw.ExtendedPoint.fromHex(e),!0}catch{return!1}}const CU=(e,t)=>fw.sign(e,t.slice(0,32)),gwe=fw.verify,Eg=e=>Nn.isBuffer(e)?e:e instanceof Uint8Array?Nn.from(e.buffer,e.byteOffset,e.byteLength):Nn.from(e);class bwe{constructor(t){Object.assign(this,t)}encode(){return Nn.from(T_.serialize(V5,this))}static decode(t){return T_.deserialize(V5,this,t)}
706static decodeUnchecked(t){return T_.deserializeUnchecked(V5,this,t)}}const V5=new Map;var IU;const xwe=32,Kf=32;function vwe(e){return e._bn!==void 0}let rN=1;class ln extends bwe{constructor(t){if(super({}),this._bn=void 0,vwe(t))this._bn=t._bn;else{if(typeof t=="string"){const n=us.decode(t);if(n.length!=Kf)throw new Error("Invalid public key input");this._bn=new $M(n)}else this._bn=new $M(t);if(this._bn.byteLength()>Kf)throw new Error("Invalid public key input")}}static unique(){const t=new ln(rN);return rN+=1,new ln(t.toBuffer())}equals(t){return this._bn.eq(t._bn)}toBase58(){return us.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const t=this.toBuffer();return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}toBuffer(){const t=this._bn.toArrayLike(Nn);if(t.length===Kf)return t;const n=Nn.alloc(32);return t.copy(n,32-t.length),n}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(t,n,r){const i=Nn.concat([t.toBuffer(),Nn.from(n),r.toBuffer()]),s=qM(i);return new ln(s)}static createProgramAddressSync(t,n){let r=Nn.alloc(0);t.forEach(function(s){if(s.length>xwe)throw new TypeError("Max seed length exceeded");r=Nn.concat([r,Eg(s)])}),r=Nn.concat([r,n.toBuffer(),Nn.from("ProgramDerivedAddress")]);const i=qM(r);if(nN(i))throw new Error("Invalid seeds, address must fall off the curve");return new ln(i)}static async createProgramAddress(t,n){return this.createProgramAddressSync(t,n)}static findProgramAddressSync(t,n){let r=255,i;for(;r!=0;){try{const s=t.concat(Nn.from([r]));i=this.createProgramAddressSync(s,n)}catch(s){if(s instanceof TypeError)throw s;r--;continue}return[i,r]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(t,n){return this.findProgramAddressSync(t,n)}static isOnCurve(t){const n=new ln(t);return nN(n.toBytes())}}IU=ln;ln.default=new IU("11111111111111111111111111111111");V5.set(ln,{kind:"struct",fields:[["_bn","u256"]]});new ln("BPFLoader1111111111111111111111111111111111");const Ny=1232,zk=127,K6=64;class RU extends Error{constructor(t){super(`Signature ${t} has expired: block height exceeded.`),this.signature=void 0,this.signature=t}}Object.defineProperty(RU.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class MU extends Error{constructor(t,n){super(`Transaction was not confirmed in ${n.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${t} using the Solana Explorer or CLI tools.`),this.signature=void 0,this.signature=t}}Object.defineProperty(MU.prototype,"name",{value:"TransactionExpiredTimeoutError"});class ix extends Error{constructor(t){super(`Signature ${t} has expired: the nonce is no longer valid.`),this.signature=void 0,this.signature=t}}Object.defineProperty(ix.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class Y6{constructor(t,n){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=t,this.accountKeysFromLookups=n}keySegments(){const t=[this.staticAccountKeys];return this.accountKeysFromLookups&&(t.push(this.accountKeysFromLookups.writable),t.push(this.accountKeysFromLookups.readonly)),t}get(t){for(const n of this.keySegments()){if(t<n.length)return n[t];t-=n.length}}get length(){return this.keySegments().flat().length}compileInstructions(t){if(this.length>256)throw new Error("Account index overflow encountered during compilation");const r=new Map;this.keySegments().flat().forEach((s,o)=>{r.set(s.toBase58(),o)});const i=s=>{const o=r.get(s.toBase58());if(o===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return o};return t.map(s=>({programIdIndex:i(s.programId),accountKeyIndexes:s.keys.map(o=>i(o.pubkey)),data:s.data}))}}const Bn=(e="publicKey")=>ye.blob(32,e),wwe=(e="signature")=>ye.blob(64,e),my=(e="string")=>{const t=ye.struct([ye.u32("length"),ye.u32("lengthPadding"),ye.blob(ye.offset(ye.u32(),-8),"chars")],e),n=t.decode.bind(t),r=t.encode.bind(t),i=t;return i.decode=(s,o)=>n(s,o).chars.toString(),i.encode=(s,o,a)=>{const c={chars:Nn.from(s,"utf8")};return r(c,o,a)},i.alloc=s=>ye.u32().span+ye.u32().span+Nn.from(s,"utf8").length,i},Ewe=(e="authorized")=>ye.struct([Bn("staker"),Bn("withdrawer")],e),_we=(e="lockup")=>ye.struct([ye.ns64("unixTimestamp"),ye.ns64("epoch"),Bn("custodian")],e),Swe=(e="voteInit")=>ye.struct([Bn("nodePubkey"),Bn("authorizedVoter"),Bn("authorizedWithdrawer"),ye.u8("commission")],e),Twe=(e="voteAuthorizeWithSeedArgs")=>ye.struct([ye.u32("voteAuthorizationType"),Bn("currentAuthorityDerivedKeyOwnerPubkey"),my("currentAuthorityDerivedKeySeed"),Bn("newAuthorized")],e);function ra(e){let t=0,n=0;for(;;){let r=e.shift();if(t|=(r&127)<<n*7,n+=1,(r&128)===0)break}return t}function ia(e,t){let n=t;for(;;){let r=n&127;if(n>>=7,n==0){e.push(r);break}else r|=128,e.push(r)}}function zr(e,t){if(!e)throw new Error(t||"Assertion failed")}class AE{constructor(t,n){this.payer=void 0,this.keyMetaMap=void 0,this.payer=t,this.keyMetaMap=n}static compile(t,n){const r=new Map,i=o=>{const a=o.toBase58();let c=r.get(a);return c===void 0&&(c={isSigner:!1,isWritable:!1,isInvoked:!1},r.set(a,c)),c},s=i(n);s.isSigner=!0,s.isWritable=!0;for(const o of t){i(o.programId).isInvoked=!0;for(const a of o.keys){const c=i(a.pubkey);c.isSigner||(c.isSigner=a.isSigner),c.isWritable||(c.isWritable=a.isWritable)}}return new AE(n,r)}getMessageComponents(){const t=[...this.keyMetaMap.entries()];zr(t.length<=256,"Max static account keys length exceeded");const n=t.filter(([,c])=>c.isSigner&&c.isWritable),r=t.filter(([,c])=>c.isSigner&&!c.isWritable),i=t.filter(([,c])=>!c.isSigner&&c.isWritable),s=t.filter(([,c])=>!c.isSigner&&!c.isWritable),o={numRequiredSignatures:n.length+r.length,numReadonlySignedAccounts:r.length,numReadonlyUnsignedAccounts:s.length};{zr(n.length>0,"Expected at least one writable signer key");const[c]=n[0];zr(c===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}const a=[...n.map(([c])=>new ln(c)),...r.map(([c])=>new ln(c)),...i.map(([c])=>new ln(c)),...s.map(([c])=>new ln(c))];return[o,a]}extractTableLookup(t){const[n,r]=this.drainKeysFoundInLookupTable(t.state.addresses,o=>!o.isSigner&&!o.isInvoked&&o.isWritable),[i,s]=this.drainKeysFoundInLookupTable(t.state.addresses,o=>!o.isSigner&&!o.isInvoked&&!o.isWritable);if(!(n.length===0&&i.length===0))return[{accountKey:t.key,writableIndexes:n,readonlyIndexes:i},{writable:r,readonly:s}]}drainKeysFoundInLookupTable(t,n){const r=new Array,i=new Array;for(const[s,o]of this.keyMetaMap.entries())if(n(o)){const a=new ln(s),c=t.findIndex(d=>d.equals(a));c>=0&&(zr(c<256,"Max lookup table index exceeded"),r.push(c),i.push(a),this.keyMetaMap.delete(s))}return[r,i]}}const NU="Reached end of buffer unexpectedly";function Vl(e){if(e.length===0)throw new Error(NU);return e.shift()}function sa(e,...t){const[n]=t;if(t.length===2?n+(t[1]??0)>e.length:n>=e.length)throw new Error(NU);return e.splice(...t)}class ud{constructor(t){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map(n=>new ln(n)),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach(n=>this.indexToProgramIds.set(n.programIdIndex,this.accountKeys[n.programIdIndex]))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(t=>({programIdIndex:t.programIdIndex,accountKeyIndexes:t.accounts,data:us.decode(t.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new Y6(this.staticAccountKeys)}static compile(t){const n=AE.compile(t.instructions,t.payerKey),[r,i]=n.getMessageComponents(),o=new Y6(i).compileInstructions(t.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:us.encode(a.data)}));return new ud({header:r,accountKeys:i,recentBlockhash:t.recentBlockhash,instructions:o})}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){const n=this.header.numRequiredSignatures;if(t>=this.header.numRequiredSignatures){const r=t-n,s=this.accountKeys.length-n-this.header.numReadonlyUnsignedAccounts;return r<s}else{const r=n-this.header.numReadonlySignedAccounts;return t<r}}isProgramId(t){return this.indexToProgramIds.has(t)}programIds(){return[...this.indexToProgramIds.values()]}
706nonProgramIds(){return this.accountKeys.filter((t,n)=>!this.isProgramId(n))}serialize(){const t=this.accountKeys.length;let n=[];ia(n,t);const r=this.instructions.map(y=>{const{accounts:g,programIdIndex:x}=y,_=Array.from(us.decode(y.data));let S=[];ia(S,g.length);let I=[];return ia(I,_.length),{programIdIndex:x,keyIndicesCount:Nn.from(S),keyIndices:g,dataLength:Nn.from(I),data:_}});let i=[];ia(i,r.length);let s=Nn.alloc(Ny);Nn.from(i).copy(s);let o=i.length;r.forEach(y=>{const x=ye.struct([ye.u8("programIdIndex"),ye.blob(y.keyIndicesCount.length,"keyIndicesCount"),ye.seq(ye.u8("keyIndex"),y.keyIndices.length,"keyIndices"),ye.blob(y.dataLength.length,"dataLength"),ye.seq(ye.u8("userdatum"),y.data.length,"data")]).encode(y,s,o);o+=x}),s=s.slice(0,o);const a=ye.struct([ye.blob(1,"numRequiredSignatures"),ye.blob(1,"numReadonlySignedAccounts"),ye.blob(1,"numReadonlyUnsignedAccounts"),ye.blob(n.length,"keyCount"),ye.seq(Bn("key"),t,"keys"),Bn("recentBlockhash")]),c={numRequiredSignatures:Nn.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:Nn.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:Nn.from([this.header.numReadonlyUnsignedAccounts]),keyCount:Nn.from(n),keys:this.accountKeys.map(y=>Eg(y.toBytes())),recentBlockhash:us.decode(this.recentBlockhash)};let d=Nn.alloc(2048);const h=a.encode(c,d);return s.copy(d,h),d.slice(0,h+s.length)}static from(t){let n=[...t];const r=Vl(n);if(r!==(r&zk))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const i=Vl(n),s=Vl(n),o=ra(n);let a=[];for(let g=0;g<o;g++){const x=sa(n,0,Kf);a.push(new ln(Nn.from(x)))}const c=sa(n,0,Kf),d=ra(n);let h=[];for(let g=0;g<d;g++){const x=Vl(n),_=ra(n),S=sa(n,0,_),I=ra(n),L=sa(n,0,I),D=us.encode(Nn.from(L));h.push({programIdIndex:x,accounts:S,data:D})}const y={header:{numRequiredSignatures:r,numReadonlySignedAccounts:i,numReadonlyUnsignedAccounts:s},recentBlockhash:us.encode(Nn.from(c)),accountKeys:a,instructions:h};return new ud(y)}}class Qx{constructor(t){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=t.header,this.staticAccountKeys=t.staticAccountKeys,this.recentBlockhash=t.recentBlockhash,this.compiledInstructions=t.compiledInstructions,this.addressTableLookups=t.addressTableLookups}get version(){return 0}get numAccountKeysFromLookups(){let t=0;for(const n of this.addressTableLookups)t+=n.readonlyIndexes.length+n.writableIndexes.length;return t}getAccountKeys(t){let n;if(t&&"accountKeysFromLookups"in t&&t.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=t.accountKeysFromLookups.writable.length+t.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");n=t.accountKeysFromLookups}else if(t&&"addressLookupTableAccounts"in t&&t.addressLookupTableAccounts)n=this.resolveAddressTableLookups(t.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Y6(this.staticAccountKeys,n)}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){const n=this.header.numRequiredSignatures,r=this.staticAccountKeys.length;if(t>=r){const i=t-r,s=this.addressTableLookups.reduce((o,a)=>o+a.writableIndexes.length,0);return i<s}else if(t>=this.header.numRequiredSignatures){const i=t-n,o=r-n-this.header.numReadonlyUnsignedAccounts;return i<o}else{const i=n-this.header.numReadonlySignedAccounts;return t<i}}resolveAddressTableLookups(t){const n={writable:[],readonly:[]};for(const r of this.addressTableLookups){const i=t.find(s=>s.key.equals(r.accountKey));if(!i)throw new Error(`Failed to find address lookup table account for table key ${r.accountKey.toBase58()}`);for(const s of r.writableIndexes)if(s<i.state.addresses.length)n.writable.push(i.state.addresses[s]);else throw new Error(`Failed to find address for index ${s} in address lookup table ${r.accountKey.toBase58()}`);for(const s of r.readonlyIndexes)if(s<i.state.addresses.length)n.readonly.push(i.state.addresses[s]);else throw new Error(`Failed to find address for index ${s} in address lookup table ${r.accountKey.toBase58()}`)}return n}static compile(t){const n=AE.compile(t.instructions,t.payerKey),r=new Array,i={writable:new Array,readonly:new Array},s=t.addressLookupTableAccounts||[];for(const h of s){const y=n.extractTableLookup(h);if(y!==void 0){const[g,{writable:x,readonly:_}]=y;r.push(g),i.writable.push(...x),i.readonly.push(..._)}}const[o,a]=n.getMessageComponents(),d=new Y6(a,i).compileInstructions(t.instructions);return new Qx({header:o,staticAccountKeys:a,recentBlockhash:t.recentBlockhash,compiledInstructions:d,addressTableLookups:r})}serialize(){const t=Array();ia(t,this.staticAccountKeys.length);const n=this.serializeInstructions(),r=Array();ia(r,this.compiledInstructions.length);const i=this.serializeAddressTableLookups(),s=Array();ia(s,this.addressTableLookups.length);const o=ye.struct([ye.u8("prefix"),ye.struct([ye.u8("numRequiredSignatures"),ye.u8("numReadonlySignedAccounts"),ye.u8("numReadonlyUnsignedAccounts")],"header"),ye.blob(t.length,"staticAccountKeysLength"),ye.seq(Bn(),this.staticAccountKeys.length,"staticAccountKeys"),Bn("recentBlockhash"),ye.blob(r.length,"instructionsLength"),ye.blob(n.length,"serializedInstructions"),ye.blob(s.length,"addressTableLookupsLength"),ye.blob(i.length,"serializedAddressTableLookups")]),a=new Uint8Array(Ny),d=o.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(t),staticAccountKeys:this.staticAccountKeys.map(h=>h.toBytes()),recentBlockhash:us.decode(this.recentBlockhash),instructionsLength:new Uint8Array(r),serializedInstructions:n,addressTableLookupsLength:new Uint8Array(s),serializedAddressTableLookups:i},a);return a.slice(0,d)}serializeInstructions(){let t=0;const n=new Uint8Array(Ny);for(const r of this.compiledInstructions){const i=Array();ia(i,r.accountKeyIndexes.length);const s=Array();ia(s,r.data.length);const o=ye.struct([ye.u8("programIdIndex"),ye.blob(i.length,"encodedAccountKeyIndexesLength"),ye.seq(ye.u8(),r.accountKeyIndexes.length,"accountKeyIndexes"),ye.blob(s.length,"encodedDataLength"),ye.blob(r.data.length,"data")]);t+=o.encode({programIdIndex:r.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(i),accountKeyIndexes:r.accountKeyIndexes,encodedDataLength:new Uint8Array(s),data:r.data},n,t)}return n.slice(0,t)}serializeAddressTableLookups(){let t=0;const n=new Uint8Array(Ny);for(const r of this.addressTableLookups){const i=Array();ia(i,r.writableIndexes.length);const s=Array();ia(s,r.readonlyIndexes.length);const o=ye.struct([Bn("accountKey"),ye.blob(i.length,"encodedWritableIndexesLength"),ye.seq(ye.u8(),r.writableIndexes.length,"writableIndexes"),ye.blob(s.length,"encodedReadonlyIndexesLength"),ye.seq(ye.u8(),r.readonlyIndexes.length,"readonlyIndexes")]);t+=o.encode({accountKey:r.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(i),writableIndexes:r.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(s),readonlyIndexes:r.readonlyIndexes},n,t)}return n.slice(0,t)}static deserialize(t){let n=[...t];const r=Vl(n),i=r&zk;zr(r!==i,"Expected versioned message but received legacy message");const s=i;zr(s===0,`Expected versioned message with version 0 but found version ${s}`);const o={numRequiredSignatures:Vl(n),numReadonlySignedAccounts:Vl(n),numReadonlyUnsignedAccounts:Vl(n)},a=[],c=ra(n);for(let _=0;_<c;_++)a.push(new ln(sa(n,0,Kf)));const d=us.encode(sa(n,0,Kf)),h=ra(n),y=[];for(let _=0;_<h;_++){const S=Vl(n),I=ra(n),L=sa(n,0,I),D=ra(n),F=new Uint8Array(sa(n,0,D));y.push({programIdIndex:S,accountKeyIndexes:L,data:F})}const g=ra(n),x=[];for(let _=0;_<g;_++){const S=new ln(sa(n,0,Kf)),I=ra(n),L=sa(n,0,I),D=ra(n),F=sa(n,0,D);x.push({accountKey:S,writableIndexes:L,readonlyIndexes:F})}return new Qx({header:o,staticAccountKeys:a,recentBlockhash:d,compiledInstructions:y,addressTableLookups:x})}}const Vk={deserializeMessageVersion(e){const t=e[0],n=t&zk;return n===t?"legacy":n},deserialize:e=>{const t=Vk.deserializeMessageVersion(e);if(t==="legacy")return ud.from(e);if(t===0)return Qx.deserialize(e);throw new Error(`Transaction message version ${t} deserialization is not supported`)}};let xf=(function(e){return e[e.BLOCKHEIGHT_EXCEEDED=0]="BLOCKHEIGHT_EXCEEDED",e[e.PROCESSED=1]="PROCESSED",e[e.TIMED_OUT=2]="TIMED_OUT",e[e.NONCE_INVALID=3]="NONCE_INVALID",e})({});const Awe=Nn.alloc(K6).fill(0);class iN{constructor(t){this.keys=void 0,this.programId=void 0,this.data=Nn.alloc(0),this.programId=t.programId,this.keys=t.keys,t.data&&(this.data=t.data)}toJSON(){return{keys:this.keys.map(({pubkey:t,isSigner:n,isWritable:r})=>({pubkey:t.toJSON(),isSigner:n,isWritable:r})),programId:this.programId.toJSON(),data:[...this.data]}}}class ql{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(t){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!!t)if(t.feePayer&&(this.feePayer=t.feePayer),t.signatures&&(this.signatures=t.signatures),Object.prototype.hasOwnProperty.call(t,"nonceInfo")){const{minContextSlot:n,nonceInfo:r}=t;this.minNonceContextSlot=n,this.nonceInfo=r}else if(Object.prototype.hasOwnProperty.call(t,"lastValidBlockHeight")){const{blockhash:n,lastValidBlockHeight:r}=t;this.recentBlockhash=n,this.lastValidBlockHeight=r}else{const{recentBlockhash:n,nonceInfo:r}=t;r&&(this.nonceInfo=r),this.recentBlockhash=n}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstru
vendor: 1,325 bytes, line 706
706ction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(t=>t.toJSON()),signers:this.signatures.map(({publicKey:t})=>t.toJSON())}}add(...t){if(t.length===0)throw new Error("No instructions");return t.forEach(n=>{"instructions"in n?this.instructions=this.instructions.concat(n.instructions):"data"in n&&"programId"in n&&"keys"in n?this.instructions.push(n):this.instructions.push(new iN(n))}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let t,n;if(this.nonceInfo?(t=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?n=[this.nonceInfo.nonceInstruction,...this.instructions]:n=this.instructions):(t=this.recentBlockhash,n=this.instructions),!t)throw new Error("Transaction recentBlockhash required");n.length<1&&console.warn("No instructions provided");let r;if(this.feePayer)r=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)r=this.signatures[0].publicKey;else throw new Error("Transaction fee payer required");for(let S=0;S<n.length;S++)if(n[S].programId===void 0)throw new Error(`Transaction instruction index ${S} has undefined program id`);const i=[],s=[];n.forEach(S=>{S.keys.forEach(L=>{s.push({...L})});const I=S.programId.toString();i.includes(I)||i.push(I)}
706),i.forEach(S=>{s.push({pubkey:new ln(S),isSigner:!1,isWritable:!1})});const o=[];s.forEach(S=>{const I=S.pubkey.toString(),L=o.findIndex(D=>D.pubkey.toString()===I);L>-1?(o[L].isWritable=o[L].isWritable||S.isWritable,o[L].isSigner=o[L].isSigner||S.isSigner):o.push(S)}),o.sort(function(S,I){if(S.isSigner!==I.isSigner)return S.isSigner?-1:1;if(S.isWritable!==I.isWritable)return S.isWritable?-1:1;const L={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"};return S.pubkey.toBase58().localeCompare(I.pubkey.toBase58(),"en",L)});const a=o.findIndex(S=>S.pubkey.equals(r));if(a>-1){const[S]=o.splice(a,1);S.isSigner=!0,S.isWritable=!0,o.unshift(S)}else o.unshift({pubkey:r,isSigner:!0,isWritable:!0});for(const S of this.signatures){const I=o.findIndex(L=>L.pubkey.equals(S.publicKey));if(I>-1)o[I].isSigner||(o[I].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw new Error(`unknown signer: ${S.publicKey.toString()}`)}let c=0,d=0,h=0;const y=[],g=[];o.forEach(({pubkey:S,isSigner:I,isWritable:L})=>{I?(y.push(S.toString()),c+=1,L||(d+=1)):(g.push(S.toString()),L||(h+=1))});const x=y.concat(g),_=n.map(S=>{const{data:I,programId:L}=S;return{programIdIndex:x.indexOf(L.toString()),accounts:S.keys.map(D=>x.indexOf(D.pubkey.toString())),data:us.encode(I)}});return _.forEach(S=>{zr(S.programIdIndex>=0),S.accounts.forEach(I=>zr(I>=0))}),new ud({header:{numRequiredSignatures:c,numReadonlySignedAccounts:d,numReadonlyUnsignedAccounts:h},accountKeys:x,recentBlockhash:t,instructions:_})}_compile(){const t=this.compileMessage(),n=t.accountKeys.slice(0,t.header.numRequiredSignatures);return this.signatures.length===n.length&&this.signatures.every((i,s)=>n[s].equals(i.publicKey))||(this.signatures=n.map(r=>({signature:null,publicKey:r}))),t}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(t){return(await t.getFeeForMessage(this.compileMessage())).value}setSigners(...t){if(t.length===0)throw new Error("No signers");const n=new Set;this.signatures=t.filter(r=>{const i=r.toString();return n.has(i)?!1:(n.add(i),!0)}).map(r=>({signature:null,publicKey:r}))}sign(...t){if(t.length===0)throw new Error("No signers");const n=new Set,r=[];for(const s of t){const o=s.publicKey.toString();n.has(o)||(n.add(o),r.push(s))}this.signatures=r.map(s=>({signature:null,publicKey:s.publicKey}));const i=this._compile();this._partialSign(i,...r)}partialSign(...t){if(t.length===0)throw new Error("No signers");const n=new Set,r=[];for(const s of t){const o=s.publicKey.toString();n.has(o)||(n.add(o),r.push(s))}const i=this._compile();this._partialSign(i,...r)}_partialSign(t,...n){const r=t.serialize();n.forEach(i=>{const s=CU(r,i.secretKey);this._addSignature(i.publicKey,Eg(s))})}addSignature(t,n){this._compile(),this._addSignature(t,n)}_addSignature(t,n){zr(n.length===64);const r=this.signatures.findIndex(i=>t.equals(i.publicKey));if(r<0)throw new Error(`unknown signer: ${t.toString()}`);this.signatures[r].signature=Nn.from(n)}verifySignatures(t=!0){return!this._getMessageSignednessErrors(this.serializeMessage(),t)}_getMessageSignednessErrors(t,n){const r={};for(const{signature:i,publicKey:s}of this.signatures)i===null?n&&(r.missing||(r.missing=[])).push(s):gwe(i,t,s.toBytes())||(r.invalid||(r.invalid=[])).push(s);return r.invalid||r.missing?r:void 0}serialize(t){const{requireAllSignatures:n,verifySignatures:r}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},t),i=this.serializeMessage();if(r){const s=this._getMessageSignednessErrors(i,n);if(s){let o="Signature verification failed.";throw s.invalid&&(o+=`
707Invalid signature for public key${s.invalid.length===1?"":"(s)"} [\`${s.invalid.map(a=>a.toBase58()).join("`, `")}\`].`),s.missing&&(o+=`
708Missing signature for public key${s.missing.length===1?"":"(s)"} [\`${s.missing.map(a=>a.toBase58()).join("`, `")}\`].`),new Error(o)}}return this._serialize(i)}_serialize(t){const{signatures:n}=this,r=[];ia(r,n.length);const i=r.length+n.length*64+t.length,s=Nn.alloc(i);
708return zr(n.length<256),Nn.from(r).copy(s,0),n.forEach(({signature:o},a)=>{o!==null&&(zr(o.length===64,"signature has invalid length"),Nn.from(o).copy(s,r.length+a*64))}),t.copy(s,r.length+n.length*64),zr(s.length<=Ny,`Transaction too large: ${s.length} > ${Ny}`),s}get keys(){return zr(this.instructions.length===1),this.instructions[0].keys.map(t=>t.pubkey)}get programId(){return zr(this.instructions.length===1),this.instructions[0].programId}get data(){return zr(this.instructions.length===1),this.instructions[0].data}static from(t){let n=[...t];const r=ra(n);let i=[];for(let s=0;s<r;s++){const o=sa(n,0,K6);i.push(us.encode(Nn.from(o)))}return ql.populate(ud.from(n),i)}static populate(t,n=[]){const r=new ql;return r.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(r.feePayer=t.accountKeys[0]),n.forEach((i,s)=>{const o={signature:i==us.encode(Awe)?null:us.decode(i),publicKey:t.accountKeys[s]};r.signatures.push(o)}),t.instructions.forEach(i=>{const s=i.accounts.map(o=>{const a=t.accountKeys[o];return{pubkey:a,isSigner:r.signatures.some(c=>c.publicKey.toString()===a.toString())||t.isAccountSigner(o),isWritable:t.isAccountWritable(o)}});r.instructions.push(new iN({keys:s,programId:t.accountKeys[i.programIdIndex],data:us.decode(i.data)}))}),r._message=t,r._json=r.toJSON(),r}}class qk{get version(){return this.message.version}constructor(t,n){if(this.signatures=void 0,this.message=void 0,n!==void 0)zr(n.length===t.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=n;else{const r=[];for(let i=0;i<t.header.numRequiredSignatures;i++)r.push(new Uint8Array(K6));this.signatures=r}this.message=t}serialize(){const t=this.message.serialize(),n=Array();ia(n,this.signatures.length);const r=ye.struct([ye.blob(n.length,"encodedSignaturesLength"),ye.seq(wwe(),this.signatures.length,"signatures"),ye.blob(t.length,"serializedMessage")]),i=new Uint8Array(2048),s=r.encode({encodedSignaturesLength:new Uint8Array(n),signatures:this.signatures,serializedMessage:t},i);return i.slice(0,s)}static deserialize(t){let n=[...t];const r=[],i=ra(n);for(let o=0;o<i;o++)r.push(new Uint8Array(sa(n,0,K6)));const s=Vk.deserialize(new Uint8Array(n));return new qk(s,r)}sign(t){const n=this.message.serialize(),r=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(const i of t){const s=r.findIndex(o=>o.equals(i.publicKey));zr(s>=0,`Cannot sign with non signer key ${i.publicKey.toBase58()}`),this.signatures[s]=CU(n,i.secretKey)}}addSignature(t,n){zr(n.byteLength===64,"Signature must be 64 bytes long");const i=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(s=>s.equals(t));zr(i>=0,`Can not add signature; \`${t.toBase58()}\` is not required to sign this transaction`),this.signatures[i]=n}}const kwe=160,Cwe=64,Iwe=kwe/Cwe,Rwe=1e3/Iwe;new ln("SysvarC1ock11111111111111111111111111111111");new ln("SysvarEpochSchedu1e111111111111111111111111");new ln("Sysvar1nstructions1111111111111111111111111");new ln("SysvarRecentB1ockHashes11111111111111111111");new ln("SysvarRent111111111111111111111111111111111");new ln("SysvarRewards111111111111111111111111111111");new ln("SysvarS1otHashes111111111111111111111111111");new ln("SysvarS1otHistory11111111111111111111111111");new ln("SysvarStakeHistory1111111111111111111111111");class sN extends Error{constructor({action:t,signature:n,transactionMessage:r,logs:i}){const s=i?`Logs: 
709${JSON.stringify(i.slice(-10),null,2)}. `:"",o="\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.";let a;switch(t){case"send":a=`Transaction ${n} resulted in an error. 
710${r}. `+s+o;break;case"simulate":a=`Simulation failed. 
711Message: ${r}. 
712`+s+o;break;default:a=`Unknown action '${(c=>c)(t)}'`}super(a),this.signature=void 0,this.transactionMessage=void 0,this.transactionLogs=void 0,this.signature=n,this.transactionMessage=r,this.transactionLogs=i||void 0}get transactionError(){return{message:this.transactionMessage,logs:Array.isArray(this.transactionLogs)?this.transactionLogs:void 0}}get logs(){const t=this.transactionLogs;if(!(t!=null&&typeof t=="object"&&"then"in t))return t}
712async getLogs(t){return Array.isArray(this.transactionLogs)||(this.transactionLogs=new Promise((n,r)=>{t.getTransaction(this.signature).then(i=>{if(i&&i.meta&&i.meta.logMessages){const s=i.meta.logMessages;this.transactionLogs=s,n(s)}else r(new Error("Log messages not found"))}).catch(r)})),await this.transactionLogs}}class Dt extends Error{constructor({code:t,message:n,data:r},i){super(i!=null?`${i}: ${n}`:n),this.code=void 0,this.data=void 0,this.code=t,this.data=r,this.name="SolanaJSONRPCError"}}function cy(e){return new Promise(t=>setTimeout(t,e))}const Mwe=ye.nu64("lamportsPerSignature"),jU=ye.struct([ye.u32("version"),ye.u32("state"),Bn("authorizedPubkey"),Bn("nonce"),ye.struct([Mwe],"feeCalculator")]);jU.span;class Hk{constructor(t){this.authorizedPubkey=void 0,this.nonce=void 0,this.feeCalculator=void 0,this.authorizedPubkey=t.authorizedPubkey,this.nonce=t.nonce,this.feeCalculator=t.feeCalculator}static fromAccountData(t){const n=jU.decode(Eg(t),0);return new Hk({authorizedPubkey:new ln(n.authorizedPubkey),nonce:new ln(n.nonce).toString(),feeCalculator:n.feeCalculator})}}function _g(e){const t=ye.blob(8,e),n=t.decode.bind(t),r=t.encode.bind(t),i=t,s=wve();return i.decode=(o,a)=>{const c=n(o,a);return s.decode(c)},i.encode=(o,a,c)=>{const d=s.encode(o);return r(d,a,c)},i}Object.freeze({Create:{index:0,layout:ye.struct([ye.u32("instruction"),ye.ns64("lamports"),ye.ns64("space"),Bn("programId")])},Assign:{index:1,layout:ye.struct([ye.u32("instruction"),Bn("programId")])},Transfer:{index:2,layout:ye.struct([ye.u32("instruction"),_g("lamports")])},CreateWithSeed:{index:3,layout:ye.struct([ye.u32("instruction"),Bn("base"),my("seed"),ye.ns64("lamports"),ye.ns64("space"),Bn("programId")])},AdvanceNonceAccount:{index:4,layout:ye.struct([ye.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:ye.struct([ye.u32("instruction"),ye.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:ye.struct([ye.u32("instruction"),Bn("authorized")])},AuthorizeNonceAccount:{index:7,layout:ye.struct([ye.u32("instruction"),Bn("authorized")])},Allocate:{index:8,layout:ye.struct([ye.u32("instruction"),ye.ns64("space")])},AllocateWithSeed:{index:9,layout:ye.struct([ye.u32("instruction"),Bn("base"),my("seed"),ye.ns64("space"),Bn("programId")])},AssignWithSeed:{index:10,layout:ye.struct([ye.u32("instruction"),Bn("base"),my("seed"),Bn("programId")])},TransferWithSeed:{index:11,layout:ye.struct([ye.u32("instruction"),_g("lamports"),my("seed"),Bn("programId")])},UpgradeNonceAccount:{index:12,layout:ye.struct([ye.u32("instruction")])}});new ln("11111111111111111111111111111111");new ln("BPFLoader2111111111111111111111111111111111");function Nwe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var P_,oN;function jwe(){if(oN)return P_;oN=1;var e=Object.prototype.toString,t=Object.keys||function(r){var i=[];for(var s in r)i.push(s);return i};function n(r,i){var s,o,a,c,d,h,y;if(r===!0)return"true";if(r===!1)return"false";switch(typeof r){case"object":if(r===null)return null;if(r.toJSON&&typeof r.toJSON=="function")return n(r.toJSON(),i);if(y=e.call(r),y==="[object Array]"){for(a="[",o=r.length-1,s=0;s<o;s++)a+=n(r[s],!0)+",";return o>-1&&(a+=n(r[s],!0)),a+"]"}else if(y==="[object Object]"){for(c=t(r).sort(),o=c.length,a="",s=0;s<o;)d=c[s],h=n(r[d],!1),h!==void 0&&(a&&(a+=","),a+=JSON.stringify(d)+":"+h),s++;return"{"+a+"}"}else return JSON.stringify(r);case"function":case"undefined":return i?null:void 0;case"string":return JSON.stringify(r);default:return isFinite(r)?r:null}}return P_=function(r){var i=n(r,!1);if(i!==void 0)return""+i},P_}var Pwe=jwe(),aN=Nwe(Pwe);const Hb=32;function O_(e){let t=0;for(;e>1;)e/=2,t++;return t}function Owe(e){return e===0?1:(e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e|=e>>32,e+1)}class Lwe{constructor(t,n,r,i,s){this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=t,this.leaderScheduleSlotOffset=n,this.warmup=r,this.firstNormalEpoch=i,this.firstNormalSlot=s}getEpoch(t){return this.getEpochAndSlotIndex(t)[0]}getEpochAndSlotIndex(t){if(t<this.firstNormalSlot){const n=O_(Owe(t+Hb+1))-O_(Hb)-1,r=this.getSlotsInEpoch(n),i=t-(r-Hb);return[n,i]}else{const n=t-this.firstNormalSlot,r=Math.floor(n/this.slotsPerEpoch),i=this.firstNormalEpoch+r,s=n%this.slotsPerEpoch;return[i,s]}}getFirstSlotInEpoch(t){return t<=this.firstNormalEpoch?(Math.pow(2,t)-1)*Hb:(t-this.firstNormalEpoch)*this.slotsPerEpoch+this.firstNormalSlot}getLastSlotInEpoch(t){return this.getFirstSlotInEpoch(t)+this.getSlotsInEpoch(t)-1}getSlotsInEpoch(t){return t<this.firstNormalEpoch?Math.pow(2,t+O_(Hb)):this.slotsPerEpoch}}var Bwe=globalThis.fetch;class Fwe extends nwe{constructor(t,n,r){const i=s=>{const o=ewe(s,{autoconnect:!0,max_reconnects:5,reconnect:!0,reconnect_interval:1e3,...n});return"socket"in o?this.underlyingSocket=o.socket:this.underlyingSocket=o,o};super(i,t,n,r),this.underlyingSocket=void 0}call(...t){const n=this.underlyingSocket?.readyState;return n===1?super.call(...t):Promise.reject(new Error("Tried to call a JSON-RPC method `"+t[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+n+")"))}notify(...t){const n=this.underlyingSocket?.readyState;return n===1?super.notify(...t):Promise.reject(new Error("Tried to send a JSON-RPC notification `"+t[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+n+")"))}}function Dwe(e,t){let n;try{n=e.layout.decode(t)}catch(r){throw new Error("invalid instruction; "+r)}if(n.typeIndex!==e.index)throw new Error(`invalid account data; account type mismatch ${n.typeIndex} != ${e.index}`);return n}const cN=56;class uN{constructor(t){this.key=void 0,this.state=void 0,this.key=t.key,this.state=t.state}isActive(){const t=BigInt("0xffffffffffffffff");return this.state.deactivationSlot===t}static deserialize(t){const n=Dwe($we,t),r=t.length-cN;zr(r>
vendor: 21,719 bytes, line 712
712=0,"lookup table is invalid"),zr(r%32===0,"lookup table is invalid");const i=r/32,{addresses:s}=ye.struct([ye.seq(Bn(),i,"addresses")]).decode(t.slice(cN));return{deactivationSlot:n.deactivationSlot,lastExtendedSlot:n.lastExtendedSlot,lastExtendedSlotStartIndex:n.lastExtendedStartIndex,authority:n.authority.length!==0?new ln(n.authority[0]):void 0,addresses:s.map(o=>new ln(o))}}}const $we={index:1,layout:ye.struct([ye.u32("typeIndex"),_g("deactivationSlot"),ye.nu64("lastExtendedSlot"),ye.u8("lastExtendedStartIndex"),ye.u8(),ye.seq(Bn(),ye.offset(ye.u8(),-1),"authority")])},Uwe=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;function zwe(e){const t=e.match(Uwe);if(t==null)throw TypeError(`Failed to validate endpoint URL \`${e}\``);const[n,r,i,s]=t,o=e.startsWith("https:")?"wss:":"ws:",a=i==null?null:parseInt(i.slice(1),10),c=a==null?"":`:${a+1}`;return`${o}//${r}${c}${s}`}const Gr=mw(Dk(ln),it(),e=>new ln(e)),PU=$k([it(),Hr("base64")]),Wk=mw(Dk(Nn),PU,e=>Nn.from(e[0],"base64")),Vwe=30*1e3;function qwe(e){if(/^https?:/.test(e)===!1)throw new TypeError("Endpoint URL must start with `http:` or `https:`.");return e}function Nr(e){let t,n;if(typeof e=="string")t=e;else if(e){const{commitment:r,...i}=e;t=r,n=i}return{commitment:t,config:n}}function lN(e){return e.map(t=>"memcmp"in t?{...t,memcmp:{...t.memcmp,encoding:t.memcmp.encoding??"base58"}}:t)}function OU(e){return ao([Qe({jsonrpc:Hr("2.0"),id:it(),result:e}),Qe({jsonrpc:Hr("2.0"),id:it(),error:Qe({code:e1(),message:it(),data:Kt(Cve())})})])}const Hwe=OU(e1());function Mn(e){return mw(OU(e),Hwe,t=>"error"in t?t:{...t,result:ct(t.result,e)})}function yi(e){return Mn(Qe({context:Qe({slot:je()}),value:e}))}function kE(e){return Qe({context:Qe({slot:je()}),value:e})}function L_(e,t){return e===0?new Qx({header:t.header,staticAccountKeys:t.accountKeys.map(n=>new ln(n)),recentBlockhash:t.recentBlockhash,compiledInstructions:t.instructions.map(n=>({programIdIndex:n.programIdIndex,accountKeyIndexes:n.accounts,data:us.decode(n.data)})),addressTableLookups:t.addressTableLookups}):new ud(t)}const Wwe=Qe({foundation:je(),foundationTerm:je(),initial:je(),taper:je(),terminal:je()}),Gwe=Mn(ft(mt(Qe({epoch:je(),effectiveSlot:je(),amount:je(),postBalance:je(),commission:Kt(mt(je()))})))),Kwe=ft(Qe({slot:je(),prioritizationFee:je()})),Ywe=Qe({total:je(),validator:je(),foundation:je(),epoch:je()}),Zwe=Qe({epoch:je(),slotIndex:je(),slotsInEpoch:je(),absoluteSlot:je(),blockHeight:Kt(je()),transactionCount:Kt(je())}),Xwe=Qe({slotsPerEpoch:je(),leaderScheduleSlotOffset:je(),warmup:Qu(),firstNormalEpoch:je(),firstNormalSlot:je()}),Qwe=gU(it(),ft(je())),x0=mt(ao([Qe({}),it()])),Jwe=Qe({err:x0}),e2e=Hr("receivedSignature"),t2e=Qe({"solana-core":it(),"feature-set":Kt(je())}),n2e=Qe({program:it(),programId:Gr,parsed:e1()}),r2e=Qe({programId:Gr,accounts:ft(Gr),data:it()}),dN=yi(Qe({err:mt(ao([Qe({}),it()])),logs:mt(ft(it())),accounts:Kt(mt(ft(mt(Qe({executable:Qu(),owner:it(),lamports:je(),data:ft(it()),rentEpoch:Kt(je())}))))),unitsConsumed:Kt(je()),returnData:Kt(mt(Qe({programId:it(),data:$k([it(),Hr("base64")])}))),innerInstructions:Kt(mt(ft(Qe({index:je(),instructions:ft(ao([n2e,r2e]))}))))})),i2e=yi(Qe({byIdentity:gU(it(),ft(je())),range:Qe({firstSlot:je(),lastSlot:je()})}));function s2e(e,t,n,r,i,s){const o=n||Bwe;let a;s!=null&&console.warn("You have supplied an `httpAgent` when creating a `Connection` in a browser environment.It has been ignored; `httpAgent` is only used in Node environments.");let c;return r&&(c=async(h,y)=>{const g=await new Promise((x,_)=>{try{r(h,y,(S,I)=>x([S,I]))}catch(S){_(S)}});return await o(...g)}),new Qve(async(h,y)=>{const g={method:"POST",body:h,agent:a,headers:Object.assign({"Content-Type":"application/json"},t||{},s5e)};try{let x=5,_,S=500;for(;c?_=await c(e,g):_=await o(e,g),!(_.status!==429||i===!0||(x-=1,x===0));)console.error(`Server responded with ${_.status} ${_.statusText}.  Retrying after ${S}ms delay...`),await cy(S),S*=2;const I=await _.text();_.ok?y(null,I):y(new Error(`${_.status} ${_.statusText}: ${I}`))}catch(x){x instanceof Error&&y(x)}},{})}function o2e(e){return(t,n)=>new Promise((r,i)=>{e.request(t,n,(s,o)=>{if(s){i(s);return}r(o)})})}function a2e(e){return t=>new Promise((n,r)=>{t.length===0&&n([]);const i=t.map(s=>e.request(s.methodName,s.args));e.request(i,(s,o)=>{if(s){r(s);return}n(o)})})}const c2e=Mn(Wwe),u2e=Mn(Ywe),l2e=Mn(Kwe),d2e=Mn(Zwe),f2e=Mn(Xwe),h2e=Mn(Qwe),p2e=Mn(je()),m2e=yi(Qe({total:je(),circulating:je(),nonCirculating:je(),nonCirculatingAccounts:ft(Gr)})),$T=Qe({amount:it(),uiAmount:mt(je()),decimals:je(),uiAmountString:Kt(it())}),y2e=yi(ft(Qe({address:Gr,amount:it(),uiAmount:mt(je()),decimals:je(),uiAmountString:Kt(it())}))),g2e=yi(ft(Qe({pubkey:Gr,account:Qe({executable:Qu(),owner:Gr,lamports:je(),data:Wk,rentEpoch:je()})}))),UT=Qe({program:it(),parsed:e1(),space:je()}),b2e=yi(ft(Qe({pubkey:Gr,account:Qe({executable:Qu(),owner:Gr,lamports:je(),data:UT,rentEpoch:je()})}))),x2e=yi(ft(Qe({lamports:je(),address:Gr}))),Jx=Qe({executable:Qu(),owner:Gr,lamports:je(),data:Wk,rentEpoch:je()}),v2e=Qe({pubkey:Gr,account:Jx}),w2e=mw(ao([Dk(Nn),UT]),ao([PU,UT]),e=>Array.isArray(e)?ct(e,Wk):e),zT=Qe({executable:Qu(),owner:Gr,lamports:je(),data:w2e,rentEpoch:je()}),E2e=Qe({pubkey:Gr,account:zT}),_2e=Qe({state:ao([Hr("active"),Hr("inactive"),Hr("activating"),Hr("deactivating")]),active:je(),inactive:je()}),S2e=Mn(ft(Qe({signature:it(),slot:je(),err:x0,memo:mt(it()),blockTime:Kt(mt(je()))}))),T2e=Mn(ft(Qe({signature:it(),slot:je(),err:x0,memo:mt(it()),blockTime:Kt(mt(je()))}))),A2e=Qe({subscription:je(),result:kE(Jx)}),k2e=Qe({pubkey:Gr,account:Jx}),C2e=Qe({subscription:je(),result:kE(k2e)}),I2e=Qe({parent:je(),slot:je(),root:je()}),R2e=Qe({subscription:je(),result:I2e}),M2e=ao([Qe({type:ao([Hr("firstShredReceived"),Hr("completed"),Hr("optimisticConfirmation"),Hr("root")]),slot:je(),timestamp:je()}),Qe({type:Hr("createdBank"),parent:je(),slot:je(),timestamp:je()}),Qe({type:Hr("frozen"),slot:je(),timestamp:je(),stats:Qe({numTransactionEntries:je(),numSuccessfulTransactions:je(),numFailedTransactions:je(),maxTransactionsPerEntry:je()})}),Qe({type:Hr("dead"),slot:je(),timestamp:je(),err:it()})]),N2e=Qe({subscription:je(),result:M2e}),j2e=Qe({subscription:je(),result:kE(ao([Jwe,e2e]))}),P2e=Qe({subscription:je(),result:je()}),O2e=Qe({pubkey:it(),gossip:mt(it()),tpu:mt(it()),rpc:mt(it()),version:mt(it())}),fN=Qe({votePubkey:it(),nodePubkey:it(),activatedStake:je(),epochVoteAccount:Qu(),epochCredits:ft($k([je(),je(),je()])),commission:je(),lastVote:je(),rootSlot:mt(je())}),L2e=Mn(Qe({current:ft(fN),delinquent:ft(fN)})),B2e=ao([Hr("processed"),Hr("confirmed"),Hr("finalized")]),F2e=Qe({slot:je(),confirmations:mt(je()),err:x0,confirmationStatus:Kt(B2e)}),D2e=yi(ft(mt(F2e))),$2e=Mn(je()),LU=Qe({accountKey:Gr,writableIndexes:ft(je()),readonlyIndexes:ft(je())}),Gk=Qe({signatures:ft(it()),message:Qe({accountKeys:ft(it()),header:Qe({numRequiredSignatures:je(),numReadonlySignedAccounts:je(),numReadonlyUnsignedAccounts:je()}),instructions:ft(Qe({accounts:ft(je()),data:it(),programIdIndex:je()})),recentBlockhash:it(),addressTableLookups:Kt(ft(LU))})}),BU=Qe({pubkey:Gr,signer:Qu(),writable:Qu(),source:Kt(ao([Hr("transaction"),Hr("lookupTable")]))}),FU=Qe({accountKeys:ft(BU),signatures:ft(it())}),DU=Qe({parsed:e1(),program:it(),programId:Gr}),$U=Qe({accounts:ft(Gr),data:it(),programId:Gr}),U2e=ao([$U,DU]),z2e=ao([Qe({parsed:e1(),program:it(),programId:it()}),Qe({accounts:ft(it()),data:it(),programId:it()})]),UU=mw(U2e,z2e,e=>"accounts"in e?ct(e,$U):ct(e,DU)),zU=Qe({signatures:ft(it()),message:Qe({accountKeys:ft(BU),instructions:ft(UU),recentBlockhash:it(),addressTableLookups:Kt(mt(ft(LU)))})}),Z6=Qe({accountIndex:je(),mint:it(),owner:Kt(it()),programId:Kt(it()),uiTokenAmount:$T}),VU=Qe({writable:ft(Gr),readonly:ft(Gr)}),CE=Qe({err:x0,fee:je(),innerInstructions:Kt(mt(ft(Qe({index:je(),instructions:ft(Qe({accounts:ft(je()),data:it(),programIdIndex:je()}))})))),preBalances:ft(je()),postBalances:ft(je()),logMessages:Kt(mt(ft(it()))),preTokenBalances:Kt(mt(ft(Z6))),postTokenBalances:Kt(mt(ft(Z6))),loadedAddresses:Kt(VU),computeUnitsConsumed:Kt(je()),costUnits:Kt(je())}),Kk=Qe({err:x0,fee:je(),innerInstructions:Kt(mt(ft(Qe({index:je(),instructions:ft(UU)})))),preBalances:ft(je()),postBalances:ft(je()),logMessages:Kt(mt(ft(it()))),preTokenBalances:Kt(mt(ft(Z6))),postTokenBalances:Kt(mt(ft(Z6))),loadedAddresses:Kt(VU),computeUnitsConsumed:Kt(je()),costUnits:Kt(je())}),t1=ao([Hr(0),Hr("legacy")]),v0=Qe({pubkey:it(),lamports:je(),postBalance:mt(je()),rewardType:mt(it()),commission:Kt(mt(je()))}),V2e=Mn(mt(Qe({blockhash:it(),previousBlockhash:it(),parentSlot:je(),transactions:ft(Qe({transaction:Gk,meta:mt(CE),version:Kt(t1)})),rewards:Kt(ft(v0)),blockTime:mt(je()),blockHeight:mt(je())}))),q2e=Mn(mt(Qe({blockhash:it(),previousBlockhash:it(),parentSlot:je(),rewards:Kt(ft(v0)),blockTime:mt(je()),blockHeight:mt(je())}))),H2e=Mn(mt(Qe({blockhash:it(),previousBlockhash:it(),parentSlot:je(),transactions:ft(Qe({transaction:FU,meta:mt(CE),version:Kt(t1)})),rewards:Kt(ft(v0)),blockTime:mt(je()),blockHeight:mt(je())}))),W2e=Mn(mt(Qe({blockhash:it(),previousBlockhash:it(),parentSlot:je(),transactions:ft(Qe({transaction:zU,meta:mt(Kk),version:Kt(t1)})),rewards:Kt(ft(v0)),blockTime:mt(je()),blockHeight:mt(je())}))),G2e=Mn(mt(Qe({blockhash:it(),previousBlockhash:it(),parentSlot:je(),transactions:ft(Qe({transaction:FU,meta:mt(Kk),version:Kt(t1)})),rewards:Kt(ft(v0)),blockTime:mt(je()),blockHeight:mt(je())}))),K2e=Mn(mt(Qe({blockhash:it(),previousBlockhash:it(),parentSlot:je(),rewards:Kt(ft(v0)),blockTime:mt(je()),blockHeight:mt(je())}))),Y2e=Mn(mt(Qe({blockhash:it(),previousBlockhash:it(),parentSlot:je(),transactions:ft(Qe({transaction:Gk,meta:mt(CE)})),rewards:Kt(ft(v0)),blockTime:mt(je())}))),hN=Mn(mt(Qe({blockhash:it(),previousBlockhash:it(),parentSlot:je(),signatures:ft(it()),blockTime:mt(je())}))),B_=Mn(mt(Qe({slot:je(),meta:mt(CE),blockTime:Kt(mt(je())),transaction:Gk,version:Kt(t1)}))),_5=Mn(mt(Qe({slot:je(),transaction:zU,meta:mt(Kk),blockTime:Kt(mt(je())),version:Kt(t1)}))),Z2e=yi(Qe({blockhash:it(),lastValidBlockHeight:je()})),X2e=yi(Qu()),Q2e=Qe({slot:je(),numTransactions:je(),numSlots:je(),samplePeriodSecs:je()}),J2e=Mn(ft(Q2e)),e5e=yi(mt(Qe({feeCalculator:Qe({lamportsPerSignature:je()})}))),t5e=Mn(it()),n5e=Mn(it()),r5e=Qe({err:x0,logs:ft(it()),signature:it()}),i5e=Qe({result:kE(r5e),subscription:je()}),s5e={"solana-client":"js/1.0.0-maintenance"};class z3e{constructor(t,n){this._commitment=void 0,this._confirmTransactionInitialTimeout=void 0,this._rpcEndpoint=void 0,this._rpcWsEndpoint=void 0,this._rpcClient=void 0,this._rpcRequest=void 0,this._rpcBatchRequest=void 0,this._rpcWebSocket=void 0,this._rpcWebSocketConnected=!1,this._rpcWebSocketHeartbeat=null,this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketGeneration=0,this._disableBlockhashCaching=!1,this._pollingBlockhash=!1,this._blockhashInfo={latestBlockhash:null,lastFetch:0,transactionSignatures:[],simulatedSignatures:[]},this._nextClientSubscriptionId=0,this._subscriptionDisposeFunctionsByClientSubscriptionId={},this._subscriptionHashByClientSubscriptionId={},this._subscriptionStateChangeCallbacksByHash={},this._subscriptionCallbacksByServerSubscriptionId={},this._subscriptionsByHash={},this._subscriptionsAutoDisposedByRpc=new Set,this.getBlockHeight=(()=>{const d={};return async h=>{const{commitment:y,config:g}=Nr(h),x=this._buildArgs([],y,void 0,g),_=aN(x);return d[_]=d[_]??(async()=>{try{const S=await this._rpcRequest("getBlockHeight",x),I=ct(S,Mn(je()));if("error"in I)throw new Dt(I.error,"failed to get block height information");return I.result}finally{delete d[_]}})(),await d[_]}})();let r,i,s,o,a,c;n&&typeof n=="string"?this._commitment=n:n&&(this._commitment=n.commitment,this._confirmTransactionInitialTimeout=n.confirmTransactionInitialTimeout,r=n.wsEndpoint,i=n.httpHeaders,s=n.fetch,o=n.fetchMiddleware,a=n.disableRetryOnRateLimit,c=n.httpAgent),this._rpcEndpoint=qwe(t),this._rpcWsEndpoint=r||zwe(t),this._rpcClient=s2e(t,i,s,o,a,c),this._rpcRequest=o2e(this._rpcClient),this._rpcBatchRequest=a2e(this._rpcClient),this._rpcWebSocket=new Fwe(this._rpcWsEndpoint,{autoconnect:!1,max_reconnects:1/0}),this._rpcWebSocket.on("open",this._wsOnOpen.bind(this)),this._rpcWebSocket.on("error",this._wsOnError.bind(this)),this._rpcWebSocket.on("close",this._wsOnClose.bind(this)),this._rpcWebSocket.on("accountNotification",this._wsOnAccountNotification.bind(this)),this._rpcWebSocket.on("programNotification",this._wsOnProgramAccountNotification.bind(this)),this._rpcWebSocket.on("slotNotification",this._wsOnSlotNotification.bind(this)),this._rpcWebSocket.on("slotsUpdatesNotification",this._wsOnSlotUpdatesNotification.bind(this)),this._rpcWebSocket.on("signatureNotification",this._wsOnSignatureNotification.bind(this)),this._rpcWebSocket.on("rootNotification",this._wsOnRootNotification.bind(this)),this._rpcWebSocket.on("logsNotification",this._wsOnLogsNotification.bind(this))}get commitment(){return this._commitment}get rpcEndpoint(){return this._rpcEndpoint}async getBalanceAndContext(t,n){const{commitment:r,config:i}=Nr(n),s=this._buildArgs([t.toBase58()],r,void 0,i),o=await this._rpcRequest("getBalance",s),a=ct(o,yi(je()));if("error"in a)throw new Dt(a.error,`failed to get balance for ${t.toBase58()}`);return a.result}async getBalance(t,n){return await this.getBalanceAndContext(t,n).then(r=>r.value).catch(r=>{throw new Error("failed to get balance of account "+t.toBase58()+": "+r)})}async getBlockTime(t){const n=await this._rpcRequest("getBlockTime",[t]),r=ct(n,Mn(mt(je())));if("error"in r)throw new Dt(r.error,`failed to get block time for slot ${t}`);return r.result}async getMinimumLedgerSlot(){const t=await this._rpcRequest("minimumLedgerSlot",[]),n=ct(t,Mn(je()));if("error"in n)throw new Dt(n.error,"failed to get minimum ledger slot");return n.result}async getFirstAvailableBlock(){const t=await this._rpcRequest("getFirstAvailableBlock",[]),n=ct(t,p2e);if("error"in n)throw new Dt(n.error,"failed to get first available block");return n.result}async getSupply(t){let n={};typeof t=="string"?n={commitment:t}:t?n={...t,commitment:t&&t.commitment||this.commitment}:n={commitment:this.commitment};const r=await this._rpcRequest("getSupply",[n]),i=ct(r,m2e);if("error"in i)throw new Dt(i.error,"failed to get supply");return i.result}async getTokenSupply(t,n){const r=this._buildArgs([t.toBase58()],n),i=await this._rpcRequest("getTokenSupply",r),s=ct(i,yi($T));if("error"in s)throw new Dt(s.error,"failed to get token supply");return s.result}async getTokenAccountBalance(t,n){const r=this._buildArgs([t.toBase58()],n),i=await this._rpcRequest("getTokenAccountBalance",r),s=ct(i,yi($T));if("error"in s)throw new Dt(s.error,"failed to get token account balance");return s.result}async getTokenAccountsByOwner(t,n,r){const{commitment:i,config:s}=Nr(r);let o=[t.toBase58()];"mint"in n?o.push({mint:n.mint.toBase58()}):o.push({programId:n.programId.toBase58()});const a=this._buildArgs(o,i,"base64",s),c=await this._rpcRequest("getTokenAccountsByOwner",a),d=ct(c,g2e);if("error"in d)throw new Dt(d.error,`failed to get token accounts owned by account ${t.toBase58()}`);return d.result}async getParsedTokenAccountsByOwner(t,n,r){let i=[t.toBase58()];"mint"in n?i.push({mint:n.mint.toBase58()}):i.push({programId:n.programId.toBase58()});const s=this._buildArgs(i,r,"jsonParsed"),o=await this._rpcRequest("getTokenAccountsByOwner",s),a=ct(o,b2e);if("error"in a)throw new Dt(a.error,`failed to get token accounts owned by account ${t.toBase58()}`);return a.result}async getLargestAccounts(t){const n={...t,commitment:t&&t.commitment||this.commitment},r=n.filter||n.commitment?[n]:[],i=await this._rpcRequest("getLargestAccounts",r),s=ct(i,x2e);if("error"in s)throw new Dt(s.error,"failed to get largest accounts");return s.result}async getTokenLargestAccounts(t,n){const r=this._buildArgs([t.toBase58()],n),i=await this._rpcRequest("getTokenLargestAccounts",r),s=ct(i,y2e);if("error"in s)throw new Dt(s.error,"failed to get token largest accounts");return s.result}async getAccountInfoAndContext(t,n){const{commitment:r,config:i}=Nr(n),s=this._buildArgs([t.toBase58()],r,"base64",i),o=await this._rpcRequest("getAccountInfo",s),a=ct(o,yi(mt(Jx)));if("error"in a)throw new Dt(a.error,`failed to get info about account ${t.toBase58()}`);return a.result}async getParsedAccountInfo(t,n){const{commitment:r,config:i}=Nr(n),s=this._buildArgs([t.toBase58()],r,"jsonParsed",i),o=await this._rpcRequest("getAccountInfo",s),a=ct(o,yi(mt(zT)));if("error"in a)throw new Dt(a.error,`failed to get info about account ${t.toBase58()}`);return a.result}async getAccountInfo(t,n){try{return(await this.getAccountInfoAndContext(t,n)).value}catch(r){throw new Error("failed to get info about account "+t.toBase58()+": "+r)}}async getMultipleParsedAccounts(t,n){const{commitment:r,config:i}=Nr(n),s=t.map(d=>d.toBase58()),o=this._buildArgs([s],r,"jsonParsed",i),a=await this._rpcRequest("getMultipleAccounts",o),c=ct(a,yi(ft(mt(zT))));if("error"in c)throw new Dt(c.error,`failed to get info for accounts ${s}`);return c.result}async getMultipleAccountsInfoAndContext(t,n){const{commitment:r,config:i}=Nr(n),s=t.map(d=>d.toBase58()),o=this._buildArgs([s],r,"base64",i),a=await this._rpcRequest("getMultipleAccounts",o),c=ct(a,yi(ft(mt(Jx))));if("error"in c)throw new Dt(c.error,`failed to get info for accounts ${s}`);return c.result}async getMultipleAccountsInfo(t,n){return(await this.getMultipleAccountsInfoAndContext(t,n)).value}async getStakeActivation(t,n,r){const{commitment:i,config:s}=Nr(n),o=this._buildArgs([t.toBase58()],i,void 0,{...s,epoch:r??s?.epoch}),a=await this._rpcRequest("getStakeActivation",o),c=ct(a,Mn(_2e));if("error"in c)throw new Dt(c.error,`failed to get Stake Activation ${t.toBase58()}`);return c.result}async getProgramAccounts(t,n){const{commitment:r,config:i}=Nr(n),{encoding:s,...o}=i||{},a=this._buildArgs([t.toBase58()],r,s||"base64",{...o,...o.filters?{filters:lN(o.filters)}:null}),c=await this._rpcRequest("getProgramAccounts",a),d=ft(v2e),h=o.withContext===!0?ct(c,yi(d)):ct(c,Mn(d));if("error"in h)throw new Dt(h.error,`failed to get accounts owned by program ${t.toBase58()}`);return h.result}async getParsedProgramAccounts(t,n){const{commitment:r,config:i}=Nr(n),s=this._buildArgs([t.toBase58()],r,"jsonParsed",i),o=await this._rpcRequest("getProgramAccounts",s),a=ct(o,Mn(ft(E2e)));if("error"in a)throw new Dt(a.error,`failed to get accounts owned by program ${t.toBase58()}`);return a.result}async confirmTransaction(t,n){let r;if(typeof t=="string")r=t;else{const s=t;if(s.abortSignal?.aborted)return Promise.reject(s.abortSignal.reason);r=s.signature}let i;try{i=us.decode(r)}catch{throw new Error("signature must be base58 encoded: "+r)}return zr(i.length===64,"signature has invalid length"),typeof t=="string"?await this.confirmTransactionUsingLegacyTimeoutStrategy({commitment:n||this.commitment,signature:r}):"lastValidBlockHeight"in t?await this.confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:n||this.commitment,strategy:t}):await this.confirmTransactionUsingDurableNonceStrategy({commitment:n||this.commitment,strategy:t})}getCancellationPromise(t){return new Promise((n,r)=>{t!=null&&(t.aborted?r(t.reason):t.addEventListener("abort",()=>{r(t.reason)}))})}getTransactionConfirmationPromise({commitment:t,signature:n}){let r,i,s=!1;const o=new Promise((c,d)=>{try{r=this.onSignature(n,(y,g)=>{r=void 0;const x={context:g,value:y};c({__type:xf.PROCESSED,response:x})},t);const h=new Promise(y=>{r==null?y():i=this._onSubscriptionStateChange(r,g=>{g==="subscribed"&&y()})});(async()=>{if(await h,s)return;const y=await this.getSignatureStatus(n);if(s||y==null)return;const{context:g,value:x}=y;if(x!=null)if(x?.err)d(x.err);else{switch(t){case"confirmed":case"single":case"singleGossip":{if(x.confirmationStatus==="processed")return;break}case"finalized":case"max":case"root":{if(x.confirmationStatus==="processed"||x.confirmationStatus==="confirmed")return;break}case"processed":case"recent":}s=!0,c({__type:xf.PROCESSED,response:{context:g,value:x}})}})()}catch(h){d(h)}});return{abortConfirmation:()=>{i&&(i(),i=void 0),r!=null&&(this.removeSignatureListener(r),r=void 0)},confirmationPromise:o}}async confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:t,strategy:{abortSignal:n,lastValidBlockHeight:r,signature:i}}){let s=!1;const o=new Promise(y=>{const g=async()=>{try{return await this.getBlockHeight(t)}catch{return-1}};(async()=>{let x=await g();if(!s){for(;x<=r;)if(await cy(1e3),s||(x=await g(),s))return;y({__type:xf.BLOCKHEIGHT_EXCEEDED})}})()}),{abortConfirmation:a,confirmationPromise:c}=this.getTransactionConfirmationPromise({commitment:t,signature:i}),d=this.getCancellationPromise(n);let h;try{const y=await Promise.race([d,c,o]);if(y.__type===xf.PROCESSED)h=y.response;else throw new RU(i)}finally{s=!0,a()}return h}async confirmTransactionUsingDurableNonceStrategy({commitment:t,strategy:{abortSignal:n,minContextSlot:r,nonceAccountPubkey:i,nonceValue:s,signature:o}}){let a=!1;const c=new Promise(x=>{let _=s,S=null;const I=async()=>{try{const{context:L,value:D}=await this.getNonceAndContext(i,{commitment:t,minContextSlot:r});return S=L.slot,D?.nonce}catch{return _}};(async()=>{if(_=await I(),!a)for(;;){if(s!==_){x({__type:xf.NONCE_INVALID,slotInWhichNonceDidAdvance:S});return}if(await cy(2e3),a||(_=await I(),a))return}})()}),{abortConfirmation:d,confirmationPromise:h}=this.getTransactionConfirmationPromise({commitment:t,signature:o}),y=this.getCancellationPromise(n);let g;try{const x=await Promise.race([y,h,c]);if(x.__type===xf.PROCESSED)g=x.response;else{let _;for(;;
712){const S=await this.getSignatureStatus(o);if(S==null)break;if(S.context.slot<(x.slotInWhichNonceDidAdvance??r)){await cy(400);continue}_=S;break}if(_?.value){const S=t||"finalized",{confirmationStatus:I}=_.value;switch(S){case"processed":case"recent":if(I!=="processed"&&I!=="confirmed"&&I!=="finalized")throw new ix(o);break;case"confirmed":case"single":case"singleGossip":if(I!=="confirmed"&&I!=="finalized")throw new ix(o);break;case"finalized":case"max":case"root":if(I!=="finalized")throw new ix(o);break;default:}g={context:_.context,value:{err:_.value.err}}}else throw new ix(o)}}finally{a=!0,d()}return g}async confirmTransactionUsingLegacyTimeoutStrategy({commitment:t,signature:n}){let r;const i=new Promise(c=>{let d=this._confirmTransactionInitialTimeout||6e4;switch(t){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":{d=this._confirmTransactionInitialTimeout||3e4;break}}r=setTimeout(()=>c({__type:xf.TIMED_OUT,timeoutMs:d}),d)}),{abortConfirmation:s,confirmationPromise:o}=this.getTransactionConfirmationPromise({commitment:t,signature:n});let a;try{const c=await Promise.race([o,i]);if(c.__type===xf.PROCESSED)a=c.response;else throw new MU(n,c.timeoutMs/1e3)}finally{clearTimeout(r),s()}return a}async getClusterNodes(){const t=await this._rpcRequest("getClusterNodes",[]),n=ct(t,Mn(ft(O2e)));if("error"in n)throw new Dt(n.error,"failed to get cluster nodes");return n.result}async getVoteAccounts(t){const n=this._buildArgs([],t),r=await this._rpcRequest("getVoteAccounts",n),i=ct(r,L2e);if("error"in i)throw new Dt(i.error,"failed to get vote accounts");return i.result}async getSlot(t){const{commitment:n,config:r}=Nr(t),i=this._buildArgs([],n,void 0,r),s=await this._rpcRequest("getSlot",i),o=ct(s,Mn(je()));if("error"in o)throw new Dt(o.error,"failed to get slot");return o.result}async getSlotLeader(t){const{commitment:n,config:r}=Nr(t),i=this._buildArgs([],n,void 0,r),s=await this._rpcRequest("getSlotLeader",i),o=ct(s,Mn(it()));if("error"in o)throw new Dt(o.error,"failed to get slot leader");return o.result}async getSlotLeaders(t,n){const r=[t,n],i=await this._rpcRequest("getSlotLeaders",r),s=ct(i,Mn(ft(Gr)));if("error"in s)throw new Dt(s.error,"failed to get slot leaders");return s.result}async getSignatureStatus(t,n){const{context:r,value:i}
712=await this.getSignatureStatuses([t],n);zr(i.length===1);const s=i[0];return{context:r,value:s}}async getSignatureStatuses(t,n){const r=[t];n&&r.push(n);const i=await this._rpcRequest("getSignatureStatuses",r),s=ct(i,D2e);if("error"in s)throw new Dt(s.error,"failed to get signature status");return s.result}async getTransactionCount(t){const{commitment:n,config:r}=Nr(t),i=this._buildArgs([],n,void 0,r),s=await this._rpcRequest("getTransactionCount",i),o=ct(s,Mn(je()));if("error"in o)throw new Dt(o.error,"failed to get transaction count");return o.result}async getTotalSupply(t){return(await this.getSupply({commitment:t,excludeNonCirculatingAccountsList:!0})).value.total}async getInflationGovernor(t){const n=this._buildArgs([],t),r=await this._rpcRequest("getInflationGovernor",n),i=ct(r,c2e);if("error"in i)throw new Dt(i.error,"failed to get inflation");return i.result}async getInflationReward(t,n,r){const{commitment:i,config:s}=Nr(r),o=this._buildArgs([t.map(d=>d.toBase58())],i,void 0,{...s,epoch:n??s?.epoch}),a=await this._rpcRequest("getInflationReward",o),c=ct(a,Gwe);if("error"in c)throw new Dt(c.error,"failed to get inflation reward");return c.result}async getInflationRate(){const t=await this._rpcRequest("getInflationRate",[]),n=ct(t,u2e);if("error"in n)throw new Dt(n.error,"failed to get inflation rate");return n.result}async getEpochInfo(t){const{commitment:n,config:r}=Nr(t),i=this._buildArgs([],n,void 0,r),s=await this._rpcRequest("getEpochInfo",i),o=ct(s,d2e);if("error"in o)throw new Dt(o.error,"failed to get epoch info");return o.result}async getEpochSchedule(){const t=await this._rpcRequest("getEpochSchedule",[]),n=ct(t,f2e);if("error"in n)throw new Dt(n.error,"failed to get epoch schedule");const r=n.result;return new Lwe(r.slotsPerEpoch,r.leaderScheduleSlotOffset,r.warmup,r.firstNormalEpoch,r.firstNormalSlot)}async getLeaderSchedule(){const t=await this._rpcRequest("getLeaderSchedule",[]),n=ct(t,h2e);if("error"in n)throw new Dt(n.error,"failed to get leader schedule");return n.result}async getMinimumBalanceForRentExemption(t,n){const r=this._buildArgs([t],n),i=await this._rpcRequest("getMinimumBalanceForRentExemption",r),s=ct(i,$2e);return"error"in s?(console.warn("Unable to fetch minimum balance for rent exemption"),0):s.result}async getRecentBlockhashAndContext(t){const{context:n,value:{blockhash:r}}=await this.getLatestBlockhashAndContext(t);return{context:n,value:{blockhash:r,feeCalculator:{get lamportsPerSignature(){throw new Error("The capability to fetch `lamportsPerSignature` using the `getRecentBlockhash` API is no longer offered by the network. Use the `getFeeForMessage` API to obtain the fee for a given message.")},toJSON(){return{}}}}}}async getRecentPerformanceSamples(t){const n=await this._rpcRequest("getRecentPerformanceSamples",t?[t]:[]),r=ct(n,J2e);if("error"in r)throw new Dt(r.error,"failed to get recent performance samples");return r.result}async getFeeCalculatorForBlockhash(t,n){const r=this._buildArgs([t],n),i=await this._rpcRequest("getFeeCalculatorForBlockhash",r),s=ct(i,e5e);if("error"in s)throw new Dt(s.error,"failed to get fee calculator");const{context:o,value:a}=s.result;return{context:o,value:a!==null?a.feeCalculator:null}}async getFeeForMessage(t,n){const r=Eg(t.serialize()).toString("base64"),i=this._buildArgs([r],n),s=await this._rpcRequest("getFeeForMessage",i),o=ct(s,yi(mt(je())));if("error"in o)throw new Dt(o.error,"failed to get fee for message");if(o.result===null)throw new Error("invalid blockhash");return o.result}async getRecentPrioritizationFees(t){const n=t?.lockedWritableAccounts?.map(o=>o.toBase58()),r=n?.length?[n]:[],i=await this._rpcRequest("getRecentPrioritizationFees",r),s=ct(i,l2e);if("error"in s)throw new Dt(s.error,"failed to get recent prioritization fees");return s.result}async getRecentBlockhash(t){try{return(await this.getRecentBlockhashAndContext(t)).value}catch(n){throw new Error("failed to get recent blockhash: "+n)}}async getLatestBlockhash(t){try{return(await this.getLatestBlockhashAndContext(t)).value}catch(n){throw new Error("failed to get recent blockhash: "+n)}}async getLatestBlockhashAndContext(t){const{commitment:n,config:r}=Nr(t),i=this._buildArgs([],n,void 0,r),s=await this._rpcRequest("getLatestBlockhash",i),o=ct(s,Z2e);if("error"in o)throw new Dt(o.error,"failed to get latest blockhash");return o.result}async isBlockhashValid(t,n){const{commitment:r,config:i}=Nr(n),s=this._buildArgs([t],r,void 0,i),o=await this._rpcRequest("isBlockhashValid",s),a=ct(o,X2e);if("error"in a)throw new Dt(a.error,"failed to determine if the blockhash `"+t+"`is valid");return a.result}async getVersion(){const t=await this._rpcRequest("getVersion",[]),n=ct(t,Mn(t2e));if("error"in n)throw new Dt(n.error,"failed to get version");return n.result}async getGenesisHash(){const t=await this._rpcRequest("getGenesisHash",[]),n=ct(t,Mn(it()));if("error"in n)throw new Dt(n.error,"failed to get genesis hash");return n.result}async getBlock(t,n){const{commitment:r,config:i}=Nr(n),s=this._buildArgsAtLeastConfirmed([t],r,void 0,i),o=await this._rpcRequest("getBlock",s);
712try{switch(i?.transactionDetails){case"accounts":{const a=ct(o,H2e);if("error"in a)throw a.error;return a.result}case"none":{const a=ct(o,q2e);if("error"in a)throw a.error;return a.result}default:{const a=ct(o,V2e);if("error"in a)throw a.error;const{result:c}=a;return c?{...c,transactions:c.transactions.map(({transaction:d,meta:h,version:y})=>({meta:h,transaction:{...d,message:L_(y,d.message)},version:y}))}:null}}}catch(a){throw new Dt(a,"failed to get confirmed block")}}async getParsedBlock(t,n){const{commitment:r,config:i}=Nr(n),s=this._buildArgsAtLeastConfirmed([t],r,"jsonParsed",i),o=await this._rpcRequest("getBlock",s);try{switch(i?.transactionDetails){case"accounts":{const a=ct(o,G2e);if("error"in a)throw a.error;return a.result}case"none":{const a=ct(o,K2e);if("error"in a)throw a.error;return a.result}default:{const a=ct(o,W2e);if("error"in a)throw a.error;return a.result}}}catch(a){throw new Dt(a,"failed to get block")}}async getBlockProduction(t){let n,r;if(typeof t=="string")r=t;else if(t){const{commitment:a,...c}=t;r=a,n=c}const i=this._buildArgs([],r,"base64",n),s=await this._rpcRequest("getBlockProduction",i),o=ct(s,i2e);if("error"in o)throw new Dt(o.error,"failed to get block production information");return o.result}async getTransaction(t,n){const{commitment:r,config:i}=Nr(n),s=this._buildArgsAtLeastConfirmed([t],r,void 0,i),o=await this._rpcRequest("getTransaction",s),a=ct(o,B_);if("error"in a)throw new Dt(a.error,"failed to get transaction");const c=a.result;return c&&{...c,transaction:{...c.transaction,message:L_(c.version,c.transaction.message)}}}async getParsedTransaction(t,n){const{commitment:r,config:i}=Nr(n),s=this._buildArgsAtLeastConfirmed([t],r,"jsonParsed",i),o=await this._rpcRequest("getTransaction",s),a=ct(o,_5);if("error"in a)throw new Dt(a.error,"failed to get transaction");return a.result}async getParsedTransactions(t,n){const{commitment:r,config:i}=Nr(n),s=t.map(c=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([c],r,"jsonParsed",i)}));return(await this._rpcBatchRequest(s)).map(c=>{const d=ct(c,_5);if("error"in d)throw new Dt(d.error,"failed to get transactions");return d.result})}async getTransactions(t,n){const{commitment:r,config:i}=Nr(n),s=t.map(c=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([c],r,void 0,i)}));return(await this._rpcBatchRequest(s)).map(c=>{const d=ct(c,B_);if("error"in d)throw new Dt(d.error,"failed to get transactions");const h=d.result;return h&&{...h,transaction:{...h.transaction,message:L_(h.version,h.transaction.message)}}})}async getConfirmedBlock(t,n){const r=this._buildArgsAtLeastConfirmed([t],n),i=await this._rpcRequest("getBlock",r),s=ct(i,Y2e);if("error"in s)throw new Dt(s.error,"failed to get confirmed block");const o=s.result;if(!o)throw new Error("Confirmed block "+t+" not found");const a={...o,transactions:o.transactions.map(({transaction:c,meta:d})=>{const h=new ud(c.message);return{meta:d,transaction:{...c,message:h}}})};return{...a,transactions:a.transactions.map(({transaction:c,meta:d})=>({meta:d,transaction:ql.populate(c.message,c.signatures)}))}}async getBlocks(t,n,r){const i=this._buildArgsAtLeastConfirmed(n!==void 0?[t,n]:[t],r),s=await this._rpcRequest("getBlocks",i),o=ct(s,Mn(ft(je())));if("error"in o)throw new Dt(o.error,"failed to get blocks");return o.result}async getBlockSignatures(t,n){const r=this._buildArgsAtLeastConfirmed([t],n,void 0,{transactionDetails:"signatures",rewards:!1}),i=await this._rpcRequest("getBlock",r),s=ct(i,hN);if("error"in s)throw new Dt(s.error,"failed to get block");const o=s.result;if(!o)throw new Error("Block "+t+" not found");return o}async getConfirmedBlockSignatures(t,n){const r=this._buildArgsAtLeastConfirmed([t],n,void 0,{transactionDetails:"signatures",rewards:!1}),i=await this._rpcRequest("getBlock",r),s=ct(i,hN);if("error"in s)throw new Dt(s.error,"failed to get confirmed block");const o=s.result;if(!o)throw new Error("Confirmed block "+t+" not found");return o}async getConfirmedTransaction(t,n){const r=this._buildArgsAtLeastConfirmed([t],n),i=await this._rpcRequest("getTransaction",r),s=ct(i,B_);if("error"in s)throw new Dt(s.error,"failed to get transaction");const o=s.result;if(!o)return o;const a=new ud(o.transaction.message),c=o.transaction.signatures;return{...o,transaction:ql.populate(a,c)}}async getParsedConfirmedTransaction(t,n){const r=this._buildArgsAtLeastConfirmed([t],n,"jsonParsed"),i=await this._rpcRequest("getTransaction",r),s=ct(i,_5);if("error"in s)throw new Dt(s.error,"failed to get confirmed transaction");return s.result}async getParsedConfirmedTransactions(t,n){const r=t.map(o=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([o],n,"jsonParsed")}));return(await this._rpcBatchRequest(r)).map(o=>{const a=ct(o,_5);if("error"in a)throw new Dt(a.error,"failed to get confirmed transactions");return a.result})}async getConfirmedSignaturesForAddress(t,n,r){let i={},s=await this.getFirstAvailableBlock();for(;!("until"in i)&&(n--,!(n<=0||n<s));)try{const c=await this.getConfirmedBlockSignatures(n,"finalized");c.signatures.length>0&&(i.until=c.signatures[c.signatures.length-1].toString())}catch(c){if(c instanceof Error&&c.message.includes("skipped"))continue;throw c}
vendor: 3,460 bytes, line 712
712let o=await this.getSlot("finalized");for(;!("before"in i)&&(r++,!(r>o));)try{const c=await this.getConfirmedBlockSignatures(r);c.signatures.length>0&&(i.before=c.signatures[c.signatures.length-1].toString())}catch(c){if(c instanceof Error&&c.message.includes("skipped"))continue;throw c}return(await this.getConfirmedSignaturesForAddress2(t,i)).map(c=>c.signature)}async getConfirmedSignaturesForAddress2(t,n,r){const i=this._buildArgsAtLeastConfirmed([t.toBase58()],r,void 0,n),s=await this._rpcRequest("getConfirmedSignaturesForAddress2",i),o=ct(s,S2e);if("error"in o)throw new Dt(o.error,"failed to get confirmed signatures for address");return o.result}async getSignaturesForAddress(t,n,r){const i=this._buildArgsAtLeastConfirmed([t.toBase58()],r,void 0,n),s=await this._rpcRequest("getSignaturesForAddress",i),o=ct(s,T2e);if("error"in o)throw new Dt(o.error,"failed to get signatures for address");return o.result}async getAddressLookupTable(t,n){const{context:r,value:i}=await this.getAccountInfoAndContext(t,n);let s=null;return i!==null&&(s=new uN({key:t,state:uN.deserialize(i.data)})),{context:r,value:s}}async getNonceAndContext(t,n){const{context:r,value:i}=await this.getAccountInfoAndContext(t,n);let s=null;return i!==null&&(s=Hk.fromAccountData(i.data)),{context:r,value:s}}async getNonce(t,n){return await this.getNonceAndContext(t,n).then(r=>r.value).catch(r=>{throw new Error("failed to get nonce for account "+t.toBase58()+": "+r)})}async requestAirdrop(t,n){const r=await this._rpcRequest("requestAirdrop",[t.toBase58(),n]),i=ct(r,t5e);if("error"in i)throw new Dt(i.error,`airdrop to ${t.toBase58()} failed`);return i.result}async _blockhashWithExpiryBlockHeight(t){if(!t){for(;this._pollingBlockhash;)await cy(100);const r=Date.now()-this._blockhashInfo.lastFetch>=Vwe;if(this._blockhashInfo.latestBlockhash!==null&&!r)return this._blockhashInfo.latestBlockhash}return await this._pollNewBlockhash()}async _pollNewBlockhash(){this._pollingBlockhash=!0;try{const t=Date.now(),n=this._blockhashInfo.latestBlockhash,r=n?n.blockhash:null;for(let i=0;i<50;i++){const s=await this.getLatestBlockhash("finalized");if(r!==s.blockhash)return this._blockhashInfo={latestBlockhash:s,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]},s;await cy(Rwe/2)}throw new Error(`Unable to obtain a new blockhash after ${Date.now()-t}ms`)}finally{this._pollingBlockhash=!1}}async getStakeMinimumDelegation(t){const{commitment:n,config:r}=Nr(t),i=this._buildArgs([],n,"base64",r),s=await this._rpcRequest("getStakeMinimumDelegation",i),o=ct(s,yi(je()));if("error"in o)throw new Dt(o.error,"failed to get stake minimum delegation");return o.result}async simulateTransaction(t,n,r){if("message"in t){const S=t.serialize(),I=Nn.from(S).toString("base64");if(Array.isArray(n)||r!==void 0)throw new Error("Invalid arguments");const L=n||{};L.encoding="base64","commitment"in L||(L.commitment=this.commitment),n&&typeof n=="object"&&"innerInstructions"in n&&(L.innerInstructions=n.innerInstructions);const D=[I,L],F=await this._rpcRequest("simulateTransaction",D),$=ct(F,dN);if("error"in $)throw new Error("failed to simulate transaction: "+$.error.message);return $.result}let i;if(t instanceof ql){let _=t;i=new ql,i.feePayer=_.feePayer,i.instructions=t.instructions,i.nonceInfo=_.nonceInfo,i.signatures=_.signatures}else i=ql.populate(t),i._message=i._json=void 0;if(n!==void 0&&!Array.isArray(n))throw new Error("Invalid arguments");const s=n;
712if(i.nonceInfo&&s)i.sign(...s);else{let _=this._disableBlockhashCaching;for(;;){const S=await this._blockhashWithExpiryBlockHeight(_);if(i.lastValidBlockHeight=S.lastValidBlockHeight,i.recentBlockhash=S.blockhash,!s)break;if(i.sign(...s),!i.signature)throw new Error("!signature");const I=i.signature.toString("base64");if(!this._blockhashInfo.simulatedSignatures.includes(I)&&!this._blockhashInfo.transactionSignatures.includes(I)){this._blockhashInfo.simulatedSignatures.push(I);break}else _=!0}}const o=i._compile(),a=o.serialize(),d=i._serialize(a).toString("base64"),h={encoding:"base64",commitment:this.commitment};if(r){const _=(Array.isArray(r)?r:o.nonProgramIds()).map(S=>S.toBase58());h.accounts={encoding:"base64",addresses:_}}s&&(h.sigVerify=!0),n&&typeof n=="object"&&"innerInstructions"in n&&(h.innerInstructions=n.innerInstructions);const y=[d,h],g=await this._rpcRequest("simulateTransaction",y),x=ct(g,dN);if("error"in x){let _;if("data"in x.error&&(_=x.error.data.logs,_&&Array.isArray(_))){const S=`
713    `,I=S+_.join(S);console.error(x.error.message,I)}throw new sN({action:"simulate",signature:"",transactionMessage:x.error.message,logs:_})}return x.result}async sendTransaction(t,n,r){if("version"in t){if(n&&Array.isArray(n))throw new Error("Invalid arguments");const o=t.serialize();return await this.sendRawTransaction(o,n)}if(n===void 0||!Array.isArray(n))throw new Error("Invalid arguments");const i=n;if(t.nonceInfo)t.sign(...i);else{let o=this._disableBlockhashCaching;for(;;){const a=await this._blockhashWithExpiryBlockHeight(o);if(t.lastValidBlockHeight=a.lastValidBlockHeight,t.recentBlockhash=a.blockhash,t.sign(...i),!t.signature)throw new Error("!signature");const c=t.signature.toString("base64");if(this._blockhashInfo.transactionSignatures.includes(c))o=!0;else{this._blockhashInfo.transactionSignatures.push(c);break}}}const s=t.serialize();return await this.sendRawTransaction(s,r)}async sendRawTransaction(t,n){const r=Eg(t).toString("base64");return await this.sendEncodedTransaction(r,n)}async sendEncodedTransaction(t,n){const r={encoding:"base64"},i=n&&n.skipPreflight,s=i===!0?"processed":n&&n.preflightCommitment||this.commitment;n&&n.maxRetries!=null&&(r.maxRetries=n.maxRetries),n&&n.minContextSlot!=null&&(r.minContextSlot=n.minContextSlot),i&&(r.skipPreflight=i),s&&(r.preflightCommitment=s);const o=[t,r],a=await this._rpcRequest("sendTransaction",o),c=ct(a,n5e);if("error"in c){let d;throw"data"in c.error&&(d=c.error.data.logs),new sN({action:i?"send":"simulate",signature:"",transactionMessage:c.error.message,logs:d})}return c.result}_wsOnOpen(){this._rpcWebSocketConnected=!0,this._rpcWebSocketHeartbeat=setInterval(()=>{(async()=>{try{await this._rpcWebSocket.notify("ping")}catch{}})()},5e3),this._updateSubscriptions()}_wsOnError(t){this._rpcWebSocketConnected=!1,console.error("ws error:",t.message)}_wsOnClose(t){if(this._rpcWebSocketConnected=!1,this._rpcWebSocketGeneration=(this._rpcWebSocketGeneration+1)%Number.MAX_SAFE_INTEGER,this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null),this._rpcWebSocketHeartbeat&&(clearInterval(this._rpcWebSocketHeartbeat),this._rpcWebSocketHeartbeat=null),t===1e3){this._updateSubscriptions();return}this._subscriptionCallbacksByServerSubscriptionId={},Object.entries(this._subscriptionsByHash).forEach(([n,r])=>{this._setSubscription(n,{...r,state:"pending"})})}_setSubscription(t,n){const r=this._subscriptionsByHash[t]?.state;if(this._subscriptionsByHash[t]=n,r!==n.state){const i=this._subscriptionStateChangeCallbacksByHash[t];i&&i.forEach(s=>{try{s(n.state)}catch{}})}}_onSubscriptionStateChange(t,n){var s;const r=this._subscriptionHashByClientSubscriptionId[t];if(r==null)return()=>{};const i=(s=this._subscriptionStateChangeCallbacksByHash)[r]||(s[r]=new Set);return i.add(n),()=>{i.delete(n),i.size===0&&delete this._subscriptionStateChangeCallbacksByHash[r]}}async _updateSubscriptions(){if(Object.keys(this._subscriptionsByHash).length===0){this._rpcWebSocketConnected&&(this._rpcWebSocketConnected=!1,this._rpcWebSocketIdleTimeout=setTimeout(()=>{this._rpcWebSocketIdleTimeout=null;try{this._rpcWebSocket.close()}catch(r){r instanceof Error&&console.log(`Error when closing socket connection: ${r.message}`)}},500));return}if(this._rpcWebSocketIdleTimeout!==null&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketConnected=!0),!this._rpcWebSocketConnected){this._rpcWebSocket.connect();return}const t=this._rpcWebSocketGeneration,n=()=>t===this._rpcWebSocketGeneration;await Promise.all(Object.keys(this._subscriptionsByHash).map(async r=>{const i=this._subscriptionsByHash[r];
vendor: 5,526 bytes, line 713
713if(i!==void 0)switch(i.state){case"pending":case"unsubscribed":if(i.callbacks.size===0){delete this._subscriptionsByHash[r],i.state==="unsubscribed"&&delete this._subscriptionCallbacksByServerSubscriptionId[i.serverSubscriptionId],await this._updateSubscriptions();return}await(async()=>{const{args:s,method:o}=i;try{this._setSubscription(r,{...i,state:"subscribing"});const a=await this._rpcWebSocket.call(o,s);this._setSubscription(r,{...i,serverSubscriptionId:a,state:"subscribed"}),this._subscriptionCallbacksByServerSubscriptionId[a]=i.callbacks,await this._updateSubscriptions()}catch(a){if(console.error(`Received ${a instanceof Error?"":"JSON-RPC "}error calling \`${o}\``,{args:s,error:a}),!n())return;this._setSubscription(r,{...i,state:"pending"}),await this._updateSubscriptions()}})();break;case"subscribed":i.callbacks.size===0&&await(async()=>{const{serverSubscriptionId:s,unsubscribeMethod:o}=i;if(this._subscriptionsAutoDisposedByRpc.has(s))this._subscriptionsAutoDisposedByRpc.delete(s);else{this._setSubscription(r,{...i,state:"unsubscribing"}),this._setSubscription(r,{...i,state:"unsubscribing"});try{await this._rpcWebSocket.call(o,[s])}catch(a){if(a instanceof Error&&console.error(`${o} error:`,a.message),!n())return;this._setSubscription(r,{...i,state:"subscribed"}),await this._updateSubscriptions();return}}this._setSubscription(r,{...i,state:"unsubscribed"}),await this._updateSubscriptions()})();break}}))}_handleServerNotification(t,n){const r=this._subscriptionCallbacksByServerSubscriptionId[t];r!==void 0&&r.forEach(i=>{try{i(...n)}catch(s){console.error(s)}})}_wsOnAccountNotification(t){const{result:n,subscription:r}=ct(t,A2e);this._handleServerNotification(r,[n.value,n.context])}_makeSubscription(t,n){const r=this._nextClientSubscriptionId++,i=aN([t.method,n]),s=this._subscriptionsByHash[i];return s===void 0?this._subscriptionsByHash[i]={...t,args:n,callbacks:new Set([t.callback]),state:"pending"}:s.callbacks.add(t.callback),this._subscriptionHashByClientSubscriptionId[r]=i,this._subscriptionDisposeFunctionsByClientSubscriptionId[r]=async()=>{delete this._subscriptionDisposeFunctionsByClientSubscriptionId[r],delete this._subscriptionHashByClientSubscriptionId[r];const o=this._subscriptionsByHash[i];zr(o!==void 0,`Could not find a \`Subscription\` when tearing down client subscription #${r}`),o.callbacks.delete(t.callback),await this._updateSubscriptions()},this._updateSubscriptions(),r}onAccountChange(t,n,r){const{commitment:i,config:s}=Nr(r),o=this._buildArgs([t.toBase58()],i||this._commitment||"finalized","base64",s);return this._makeSubscription({callback:n,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},o)}async removeAccountChangeListener(t){await this._unsubscribeClientSubscription(t,"account change")}_wsOnProgramAccountNotification(t){const{result:n,subscription:r}=ct(t,C2e);this._handleServerNotification(r,[{accountId:n.value.pubkey,accountInfo:n.value.account},n.context])}onProgramAccountChange(t,n,r,i){const{commitment:s,config:o}=Nr(r),a=this._buildArgs([t.toBase58()],s||this._commitment||"finalized","base64",o||(i?{filters:lN(i)}:void 0));return this._makeSubscription({callback:n,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},a)}async removeProgramAccountChangeListener(t){await this._unsubscribeClientSubscription(t,"program account change")}onLogs(t,n,r){const i=this._buildArgs([typeof t=="object"?{mentions:[t.toString()]}:t],r||this._commitment||"finalized");return this._makeSubscription({callback:n,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},i)}async removeOnLogsListener(t){await this._unsubscribeClientSubscription(t,"logs")}_wsOnLogsNotification(t){const{result:n,subscription:r}=ct(t,i5e);this._handleServerNotification(r,[n.value,n.context])}_wsOnSlotNotification(t){const{result:n,subscription:r}=ct(t,R2e);this._handleServerNotification(r,[n])}onSlotChange(t){return this._makeSubscription({callback:t,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}async removeSlotChangeListener(t){await this._unsubscribeClientSubscription(t,"slot change")}_wsOnSlotUpdatesNotification(t){const{result:n,subscription:r}=ct(t,N2e);this._handleServerNotification(r,[n])}onSlotUpdate(t){return this._makeSubscription({callback:t,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}async removeSlotUpdateListener(t){await this._unsubscribeClientSubscription(t,"slot update")}async _unsubscribeClientSubscription(t,n){const r=this._subscriptionDisposeFunctionsByClientSubscriptionId[t];r?await r():console.warn(`Ignored unsubscribe request because an active subscription with id \`${t}\` for '${n}' events could not be found.`)}_buildArgs(t,n,r,i){const s=n||this._commitment;if(s||r||i){let o={};r&&(o.encoding=r),s&&(o.commitment=s),i&&(o=Object.assign(o,i)),t.push(o)}return t}_buildArgsAtLeastConfirmed(t,n,r,i){const s=n||this._commitment;if(s&&!["confirmed","finalized"].includes(s))throw new Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`");return this._buildArgs(t,n,r,i)}_wsOnSignatureNotification(t){const{result:n,subscription:r}=ct(t,j2e);n.value!=="receivedSignature"&&this._subscriptionsAutoDisposedByRpc.add(r),this._handleServerNotification(r,n.value==="receivedSignature"?[{type:"received"},n.context]:[{type:"status",result:n.value},n.context])}onSignature(t,n,r){const i=this._buildArgs([t],r||this._commitment||"finalized"),s=this._makeSubscription({callback:(o,a)=>
713{if(o.type==="status"){n(o.result,a);try{this.removeSignatureListener(s)}catch{}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},i);return s}onSignatureWithOptions(t,n,r){const{commitment:i,...s}={...r,commitment:r&&r.commitment||this._commitment||"finalized"},o=this._buildArgs([t],i,void 0,s),a=this._makeSubscription({callback:(c,d)=>{n(c,d);try{this.removeSignatureListener(a)}catch{}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},o);return a}async removeSignatureListener(t){await this._unsubscribeClientSubscription(t,"signature result")}_wsOnRootNotification(t){const{result:n,subscription:r}=ct(t,P2e);this._handleServerNotification(r,[n])}onRootChange(t){return this._makeSubscription({callback:t,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}async removeRootChangeListener(t){await this._unsubscribeClientSubscription(t,"root change")}}Object.freeze({CreateLookupTable:{index:0,layout:ye.struct([ye.u32("instruction"),_g("recentSlot"),ye.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:ye.struct([ye.u32("instruction")])},ExtendLookupTable:{index:2,layout:ye.struct([ye.u32("instruction"),_g(),ye.seq(Bn(),ye.offset(ye.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:ye.struct([ye.u32("instruction")])},CloseLookupTable:{index:4,layout:ye.struct([ye.u32("instruction")])}});new ln("AddressLookupTab1e1111111111111111111111111");Object.freeze({RequestUnits:{index:0,layout:ye.struct([ye.u8("instruction"),ye.u32("units"),ye.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:ye.struct([ye.u8("instruction"),ye.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:ye.struct([ye.u8("instruction"),ye.u32("units")])},SetComputeUnitPrice:{index:3,layout:ye.struct([ye.u8("instruction"),_g("microLamports")])}});new ln("ComputeBudget111111111111111111111111111111");ye.struct([ye.u8("numSignatures"),ye.u8("padding"),ye.u16("signatureOffset"),ye.u16("signatureInstructionIndex"),ye.u16("publicKeyOffset"),ye.u16("publicKeyInstructionIndex"),ye.u16("messageDataOffset"),ye.u16("messageDataSize"),ye.u16("messageInstructionIndex")]);new ln("Ed25519SigVerify111111111111111111111111111");ywe.utils.isValidPrivateKey;ye.struct([ye.u8("numSignatures"),ye.u16("signatureOffset"),ye.u8("signatureInstructionIndex"),ye.u16("ethAddressOffset"),ye.u8("ethAddressInstructionIndex"),ye.u16("messageDataOffset"),ye.u16("messageDataSize"),ye.u8("messageInstructionIndex"),ye.blob(20,"ethAddress"),ye.blob(64,"signature"),ye.u8("recoveryId")]);new ln("KeccakSecp256k11111111111111111111111111111");var qU;new ln("StakeConfig11111111111111111111111111111111");class HU{constructor(t,n,r){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=n,this.custodian=r}}qU=HU;HU.default=new qU(0,0,ln.default);Object.freeze({Initialize:{index:0,layout:ye.struct([ye.u32("instruction"),Ewe(),_we()])},Authorize:{index:1,layout:ye.struct([ye.u32("instruction"),Bn("newAuthorized"),ye.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:ye.struct([ye.u32("instruction")])},Split:{index:3,layout:ye.struct([ye.u32("instruction"),ye.ns64("lamports")])},Withdraw:{index:4,layout:ye.struct([ye.u32("instruction"),ye.ns64("lamports")])},Deactivate:{index:5,layout:ye.struct([ye.u32("instruction")])},Merge:{index:7,layout:ye.struct([ye.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:ye.struct([ye.u32("instruction"),Bn("newAuthorized"),ye.u32("stakeAuthorizationType"),my("authoritySeed"),Bn("authorityOwner")])}});new ln("Stake11111111111111111111111111111111111111");Object.freeze({InitializeAccount:{index:0,layout:ye.struct([ye.u32("instruction"),Swe()])},Authorize:{index:1,layout:ye.struct([ye.u32("instruction"),Bn("newAuthorized"),ye.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:ye.struct([ye.u32("instruction"),ye.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:ye.struct([ye.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:ye.struct([ye.u32("instruction"),Twe()])}});new ln("Vote111111111111111111111111111111111111111");new ln("Va1idator1nfo111111111111111111111111111111");Qe({name:it(),website:Kt(it()),details:Kt(it()),iconUrl:Kt(it()),keybaseUsername:Kt(it())});new ln("Vote111111111111111111111111111111111111111");ye.struct([Bn("nodePubkey"),Bn("authorizedWithdrawer"),ye.u8("commission"),ye.nu64(),ye.seq(ye.struct([ye.nu64("slot"),ye.u32("confirmationCount")]),ye.offset(ye.u32(),-8),"votes"),ye.u8("rootSlotValid"),ye.nu64("rootSlot"),ye.nu64(),ye.seq(ye.struct([ye.nu64("epoch"),Bn("authorizedVoter")]),ye.offset(ye.u32(),-8),"authorizedVoters"),ye.struct([ye.seq(ye.struct([Bn("authorizedPubkey"),ye.nu64("epochOfLastAuthorizedSwitch"),ye.nu64("targetEpoch")]),32,"buf"),ye.nu64("idx"),ye.u8("isEmpty")],"priorVoters"),ye.nu64(),ye.seq(ye.struct([ye.nu64("epoch"),ye.nu64("credits"),ye.nu64("prevCredits")]),ye.offset(ye.u32(),-8),"epochCredits"),ye.struct([ye.nu64("slot"),ye.nu64("timestamp")],"lastTimestamp")]);const o5e=e=>({request:e,signMessage:t=>e({method:"signMessage",params:{message:t}}),signTransaction:t=>e({method:"signTransaction",params:{transaction:t}}),signAndSendTransaction:t=>e({method:"signAndSendTransaction",params:t})});function pN(e){return cs.from(e.serialize({verifySignatures:!1})).toString("base64")}function a5e(e){const t=cs.from(e,"base64");return Vk.deserializeMessageVersion(t)==="legacy"?qk.deserialize(t):ql.from(t)}function c5e(e){return async n=>{if(n.method==="connect")return await e(n);if(n.method==="signMessage")return await e(n);if(n.method==="signAndSendTransaction"){const{transaction:r}=n.params,i={transaction:pN(r)};return await e({method:"signAndSendTransaction",params:i})}if(n.method==="signTransaction"){const{transaction:r}=n.params,i={transaction:pN(r)},{signedTransaction:s}=await e({method:"signTransaction",params:i});return{signedTransaction:a5e(s)}}}}const u5e="0.1.1";function l5e(){return u5e}
713let d5e=class VT extends Error{constructor(t,n={}){const r=(()=>{if(n.cause instanceof VT){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause?.message?n.cause.message:n.details})(),i=n.cause instanceof VT&&n.cause.docsPath||n.docsPath,o=`https://oxlib.sh${i??""}`,a=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||i?["",r?`Details: ${r}`:void 0,i?`See: ${o}`:void 0]:[]].filter(c=>typeof c=="string").join(`
714`);super(a,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{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,"shortMessage",{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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${l5e()}`}),this.cause=n.cause,this.details=r,this.docs=o,this.docsPath=i,this.shortMessage=t}walk(t){return WU(this,t)}};function WU(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?WU(e.cause,t):t?null:e}function GU(e,t={}){const{raw:n=!1}=t,r=e;if(n)return e;if(r.error){const{code:i}=r.error,s=i===Sg.code?Sg:i===ev.code?ev:i===uv.code?uv:i===av.code?av:i===sv.code?sv:i===cv.code?cv:i===iv.code?iv:i===lv.code?lv:i===tv.code?tv:i===nv.code?nv:i===rv.code?rv:i===ov.code?ov:Do;throw new s(r.error)}return r.result}class Do extends Error{constructor(t){const{code:n,message:r,data:i}=t;super(r),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.BaseError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n,this.data=i}}class ev extends Do{constructor(t={}){super({message:"Missing or invalid parameters.",...t,code:ev.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InvalidInputError"})}}Object.defineProperty(ev,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class tv extends Do{constructor(t={}){super({message:"Requested resource not found.",...t,code:tv.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.ResourceNotFoundError"})}}Object.defineProperty(tv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class nv extends Do{constructor(t={}){super({message:"Requested resource not available.",...t,code:nv.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.ResourceUnavailableError"})}}Object.defineProperty(nv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class rv extends Do{constructor(t={}){super({message:"Transaction creation failed.",...t,code:rv.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.TransactionRejectedError"})}}Object.defineProperty(rv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class iv extends Do{constructor(t={}){super({message:"Method is not implemented.",...t,code:iv.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.MethodNotSupportedError"})}}Object.defineProperty(iv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class sv extends Do{constructor(t={}){super({message:"Rate limit exceeded.",...t,code:sv.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.LimitExceededError"})}}Object.defineProperty(sv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class ov extends Do{constructor(t={}){super({message:"JSON-RPC version not supported.",...t,code:ov.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.VersionNotSupportedError"})}}Object.defineProperty(ov,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class av extends Do{constructor(t={}){super({message:"Input is not a valid JSON-RPC request.",...t,code:av.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InvalidRequestError"})}}Object.defineProperty(av,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class cv extends Do{constructor(t={}){super({message:"Method does not exist.",...t,code:cv.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.MethodNotFoundError"})}}Object.defineProperty(cv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class uv extends Do{constructor(t={}){super({message:"Invalid method parameters.",...t,code:uv.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InvalidParamsError"})}}Object.defineProperty(uv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Sg extends Do{constructor(t={}){super({message:"Internal JSON-RPC error.",...t,code:Sg.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InternalErrorError"})}}Object.defineProperty(Sg,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class lv extends Do{constructor(t={}){super({message:"Failed to parse JSON-RPC response.",...t,code:lv.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.ParseError"})}}Object.defineProperty(lv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});
714class w0 extends Error{constructor(t,n){super(n),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t,this.details=n}}class KU extends w0{constructor({message:t="The user rejected the request."}={}){super(4001,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.UserRejectedRequestError"})}}Object.defineProperty(KU,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class YU extends w0{constructor({message:t="The requested method and/or account has not been authorized by the user."}={}){super(4100,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.UnauthorizedError"})}}Object.defineProperty(YU,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class ZU extends w0{constructor({message:t="The provider does not support the requested method."}={}){super(4200,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.UnsupportedMethodError"})}}Object.defineProperty(ZU,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class XU extends w0{constructor({message:t="The provider is disconnected from all chains."}={}){super(4900,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.DisconnectedError"})}}Object.defineProperty(XU,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class QU extends w0{constructor({message:t="The provider is not connected to the requested chain."}={}){super(4901,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.ChainDisconnectedError"})}}Object.defineProperty(QU,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});function f5e(){const e=new Nv;return{get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}function h5e(e,t={}){const{includeEvents:n=!0}=t;if(!e)throw new p5e;return{...n?{on:e.on?.bind(e),removeListener:e.removeListener?.bind(e)}:{},async request(r){const i=await e.request(r);return i&&typeof i=="object"&&"jsonrpc"in i?GU(i):i}}}class p5e extends d5e{constructor(){super("`provider` is undefined."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.IsUndefinedError"})}}function m5e(e={}){let t=e.id??0;return{prepare(n){return y5e({id:t++,...n})},get id(){return t}}}function y5e(e){return{...e,jsonrpc:"2.0"}}const g5e={postMessage(){},addEventListener:()=>{},removeEventListener:()=>{}},b5e={postMessage:e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e))},addEventListener:(e,t,...n)=>{document.addEventListener("FarcasterFrameCallback",t,...n)},removeEventListener:(e,t)=>{document.removeEventListener("FarcasterFrameCallback",t)}},x5e=typeof window>"u"?g5e:window?.ReactNativeWebView?b5e:Vq(window?.parent??window),or=Wy(x5e),Yk=f5e(),v5e=m5e();function w5e({code:e,details:t}){switch(e){case 4001:return new KU;case 4100:return new YU;case 4200:return new ZU;case 4900:return new XU;case 4901:return new QU;default:return new w0(e,t??"Unknown provider RPC error")}}const JU=h5e({...Yk,async request(e){const t=v5e.prepare(e);try{const n=await or.ethProviderRequestV2(t).then(r=>GU(r,{request:t,raw:!0}));if(n.error)throw w5e(n.error);return n.result}catch(n){if(n instanceof Error&&n.message.match(/cannot read property 'apply'/i))return await or.ethProviderRequest(t);throw n instanceof w0||n instanceof Do?n:new Sg({message:n instanceof Error?n.message:void 0})}}});function ez(e){const t=new CustomEvent("eip6963:announceProvider",{detail:Object.freeze(e)});window.dispatchEvent(t);const n=()=>window.dispatchEvent(t);return window.addEventListener("eip6963:requestProvider",n),()=>window.removeEventListener("eip6963:requestProvider",n)}typeof document<"u"&&(document.addEventListener("eip6963:requestProvider",()=>{or.eip6963RequestProvider()}),document.addEventListener("FarcasterFrameEthProviderEvent",e=>{if(e instanceof MessageEvent){const t=e.data;Yk.emit(t.event,...t.params)}}),document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){const t=e.data;t.event==="eip6963:announceProvider"&&ez({info:t.info,provider:JU})}}));typeof window<"u"&&(window.addEventListener("eip6963:requestProvider",()=>{or.eip6963RequestProvider()}),window.addEventListener("message",e=>
714{if(e instanceof MessageEvent&&e.data.type==="frameEthProviderEvent"){const t=e.data;Yk.emit(t.event,...t.params)}}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){const t=e.data.event;t.event==="eip6963:announceProvider"&&ez({info:t.info,provider:JU})}}));function E5e(){const e=new Nv;return{get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}const Js=E5e(),{solanaProviderRequest:mN}=or;mN&&o5e(c5e(mN));({...Js,getCapabilities:or.getCapabilities,getChains:or.getChains,context:or.context,actions:(or.setPrimaryButton.bind(or),or.close.bind(or),or.viewCast.bind(or),or.viewProfile.bind(or),or.openMiniApp.bind(or),or.viewToken.bind(or),or.sendToken.bind(or),or.swapToken.bind(or),or.requestCameraAndMicrophoneAccess.bind(or)),haptics:(or.impactOccurred.bind(or),or.notificationOccurred.bind(or),or.selectionChanged.bind(or))});typeof document<"u"&&document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){const t=e.data;t.event==="primary_button_clicked"?Js.emit("primaryButtonClicked"):t.event==="miniapp_added"?Js.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?Js.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?Js.emit("miniAppRemoved"):t.event==="notifications_enabled"?Js.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?Js.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&Js.emit("backNavigationTriggered")}});typeof window<"u"&&window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){const t=e.data.event;t.event==="primary_button_clicked"?Js.emit("primaryButtonClicked"):t.event==="miniapp_added"?Js.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?Js.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?Js.emit("miniAppRemoved"):t.event==="notifications_enabled"?Js.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?Js.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&Js.emit("backNavigationTriggered")}});function _5e(){const[e,t]=A.useState(0),n=A.useCallback(()=>t(r=>r+1),[t]);return A.useEffect(()=>{},[]),u.jsxs("div",{className:"mx-auto max-w-screen-sm",children:[u.jsx("h1",{className:"sr-only",children:"Swap"}),u.jsx(qD,{token0Tag:"from",token1Tag:"to",placeholder:u.jsx(A$,{}),children:u.jsx(g$,{reset:n,children:u.jsx(T$,{})},e)})]})}function Ri(e){return A.lazy(()=>e().catch(t=>{const n="forcedReload",r=Number(localStorage.getItem(n));throw(!(Date.now()-r<Wr)||!r)&&(localStorage.setItem(n,Date.now().toString()),setTimeout(window.location.reload,10)),t}))}const S5e=Ri(()=>hr(()=>import("./index-DW-jSMm6.js"),[])),T5e=Ri(()=>hr(()=>import("./index-DQd1q7wr.js"),__vite__mapDeps([11,12,13,14,15,16]))),A5e=Ri(()=>hr(()=>import("./index-CJb_CPRb.js"),__vite__mapDeps([17,14,18,19,16,20,21]))),Wb=Ri(()=>hr(()=>import("./index-DS-Z_vjC.js"),[])),tz=Ri(()=>hr(()=>import("./FlightSchool-BGzSPjQj.js"),[])),k5e=Ri(()=>hr(()=>import("./index-C4lNyI3f.js"),[])),C5e=Ri(()=>hr(()=>import("./NewLock-FJp86rW-.js"),__vite__mapDeps([22,23]))),I5e=Ri(()=>hr(()=>import("./Manage-BYKBaneH.js"),__vite__mapDeps([24,23,25]))),R5e=Ri(()=>hr(()=>import("./index-ymOe-DOF.js"),__vite__mapDeps([26,27,28]))),M5e=Ri(()=>hr(()=>import("./index-C1neC7uH.js"),__vite__mapDeps([29,12,19,13,14]))),N5e=Ri(()=>hr(()=>import("./index-CJCprGQn.js"),__vite__mapDeps([30,27,16,25,28]))),j5e=Ri(()=>hr(()=>import("./index-C4ZhxX9g.js"),__vite__mapDeps([31,14,32]))),P5e=Ri(()=>hr(()=>import("./index-bivMCuaP.js"),[])),O5e=Ri(()=>hr(()=>import("./index-yJ8HwGcY.js"),__vite__mapDeps([33,14,32]))),L5e=Ri(()=>hr(()=>
714import("./index-BrkNMCeJ.js"),__vite__mapDeps([34,15,27]))),B5e=Ri(()=>hr(()=>import("./index-CSeYNOM7.js"),__vite__mapDeps([35,14,32])));Ri(()=>hr(()=>import("./index-Bjhr-BUK.js"),__vite__mapDeps([36,21])));const yN=Ri(()=>hr(()=>import("./index-D-16b794.js").then(e=>e.i),__vite__mapDeps([37,38,19,13,14,18]))),F5e=Ri(()=>hr(()=>import("./index-DIerTuW6.js"),[])),D5e=Ri(()=>hr(()=>import("./index-CeNp7QU-.js"),__vite__mapDeps([39,21]))),gN=[{path:["/","/landing"],component:Hge},{path:"/swap",component:_5e},{path:"/connect",component:Wpe},{path:"/brand",component:S5e},{path:"/legal",component:k5e},{path:"/dash",component:z0e,isConnectedRoute:!0},{path:"/deposit",component:A5e,isConnectedRoute:!0},{path:"/docs",component:Wb},{path:"/docs/superswaps",component:Wb},{path:"/docs/social-media-disclaimer",component:Wb},{path:"/docs/launcher",component:Wb},{path:"/flight-school",component:tz},{path:"/incentivize",component:T5e,isConnectedRoute:!0},{path:"/launch",component:yN,isConnectedRoute:!0},{path:["/liquidity","/liquidity/stocks"],component:y1e},{path:"/migrate",component:k1e},{path:"/locks",component:()=>u.jsx(Z8,{children:u.jsx(R5e,{})}),isConnectedRoute:!0},{path:"/lock",component:()=>u.jsx(Z8,{children:u.jsx(C5e,{})}),isConnectedRoute:!0},{path:"/lock/:id",component:()=>u.jsx(Z8,{children:u.jsx(I5e,{})}),isConnectedRoute:!0},{path:"/pools",component:M5e},{path:"/relay/:id/:tab?",component:N5e,isConnectedRoute:!0},{path:"/security",component:Wb},{path:"/stake",component:j5e,isConnectedRoute:!0},{path:"/tokenlist",component:P5e},{path:"/unstake",component:O5e,isConnectedRoute:!0},{path:"/vote",component:L5e,isConnectedRoute:!0},{path:"/withdraw",component:B5e,isConnectedRoute:!0},{path:"/launcher",component:F5e},{path:"/launch",component:yN},{path:"/autopilot",component:D5e}],$5e=["/connect"],bN=({path:e,children:t})=>u.jsx(A.Suspense,{fallback:u.jsx(Xl,{message:"Loading..."}),children:u.jsx(WS,{path:e,children:t})});function U5e(){const{isConnected:e}=lE(),[t]=Jf();ys(),ppe();const n=A.useMemo(()=>$5e.includes(t),[t]),[r,i]=Jf(),{getConnectUrl:s}=nk(),o=A.useCallback(()=>s(),[s]);wpe(),A.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"instant"})},[t]),A.useEffect(()=>{gN.find(h=>(Array.isArray(h.path)?h.path:[h.path]).some(g=>{const x=g.split("/"),_=t.split("/");return x.length!==_.length?!1:x.every((S,I)=>S.startsWith(":")||S===_[I])}))?.isConnectedRoute&&!e&&i(o(),{replace:!0})},[t,e,o,i]);const{logs:a,pushLog:c}=l0();return A.useEffect(()=>{if(a.length===0){const[d,h]=G9();c("LOAD",window.location.origin+`| ${d} v${h} | v5.0.0+c43409`)}else c("NAV",window.location.href.replace(window.location.origin,""))},[a,r]),u.jsxs("div",{className:"wrapper",children:[u.jsxs("div",{className:"min-h-svh",children:[!n&&u.jsx(Ghe,{}),u.jsx(cD,{}),u.jsxs(rse,{children:[gN.map(d=>{const h=Array.isArray(d.path)?d.path:[d.path],y=d.component.$$typeof===Symbol.for("react.lazy");return h.map(g=>y?u.jsx(bN,{path:g,children:u.jsx(d.component,{})},g):u.jsx(WS,{path:g,children:u.jsx(d.component,{})},g))}),!1,u.jsx(bN,{path:"/flight-school",children:u.jsx(tz,{})}),!1,u.jsx(WS,{children:u.jsx(bD,{})})]})]}),!n&&u.jsx(fhe,{})]})}function z5e({children:e}){const t=iee();return t.supports?u.jsx(u.Fragment,{children:e}):u.jsxs("div",{children:[u.jsx("div",{className:"m-auto opacity-70",children:"Your browser is not supported!"}),u.jsx("div",{children:Gg(t.error)})]})}const V5e=A.createContext(null),F_={didCatch:!1,error:null};let q5e=class extends A.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=F_}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:s,reason:"imperative-api"}),this.setState(F_)}}componentDidCatch(t,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;if(r&&n.error!==null&&H5e(t.resetKeys,i)){var s,o;(s=(o=this.props).onReset)===null||s===void 0||s.call(o,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(F_)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:s,error:o}=this.state;let a=t;if(s){const c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(A.isValidElement(i))a=i;else if(typeof n=="function")a=n(c);else if(r)a=A.createElement(r,c);else throw o}return A.createElement(V5e.Provider,{value:{didCatch:s,error:o,resetErrorBoundary:this.resetErrorBoundary}},a)}};function H5e(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}const W5e=A.memo(function({children:t}){const{pushLog:n,utils:{topicPresent:r}}=l0(),i=A.useMemo(()=>function({error:o}){return r("ERR",!0)||n("ERR","stack"in o?o.stack.toString().split(" at ").slice(0,4).join(" at "):o.toString()),u.jsx(bD,{error:o})},[]);return u.jsx(q5e,{FallbackComponent:i,children:t})});Nie(Xi);x3.setEventListener(e=>{const t=()=>e(document.hasFocus()&&document.visibilityState==="visible");return window.addEventListener("focus",t),window.addEventListener("blur",t),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("focus",t),window.removeEventListener("blur",t),document.removeEventListener("visibilitychange",t)}});const G5e=new Aee({defaultOptions:{queries:{refetchIntervalInBackgroun
714d:!1}}});Po.extend(Yee);ete.createRoot(document.getElementById("root")).render(u.jsx(Be.StrictMode,{children:u.jsx(z5e,{children:u.jsx(W5e,{children:u.jsx(Ehe,{children:u.jsx(Zte,{config:Fc,children:u.jsx(Mee,{client:G5e,children:u.jsx(use,{children:u.jsx(U5e,{})})})})})})})}));export{$9 as $,Gt as A,kT as B,EJ as C,Pt as D,$p as E,pM as F,VR as G,ma as H,Zg as I,jv as J,DR as K,oo as L,wn as M,qn as N,Iv as O,Xf as P,Fo as Q,sge as R,_r as S,ls as T,Fr as U,h3 as V,xJ as W,IO as X,Cn as Y,m0 as Z,hr as _,A as a,zfe as a$,U9 as a0,Pn as a1,p0 as a2,xE as a3,x1e as a4,Ox as a5,Xl as a6,dn as a7,Xp as a8,V6e as a9,yO as aA,zQ as aB,Qp as aC,Y6e as aD,K6e as aE,T3 as aF,zp as aG,e6 as aH,p7 as aI,O6e as aJ,mO as aK,B9 as aL,zre as aM,L6e as aN,jL as aO,Age as aP,F6e as aQ,gh as aR,Jf as aS,$R as aT,d3e as aU,p3e as aV,hJ as aW,dL as aX,Fc as aY,qD as aZ,S3e as a_,pa as aa,sh as ab,EO as ac,HD as ad,SL as ae,fy as af,dh as ag,N3e as ah,Z6e as ai,lme as aj,M3e as ak,aA as al,jD as am,$6e as an,wD as ao,mge as ap,N0e as aq,w1e as ar,yh as as,Mg as at,m$ as au,ox as av,M3 as aw,B6e as ax,Kg as ay,D9 as az,Yg as b,Q6e as b$,Ju as b0,w3e as b1,T3e as b2,ok as b3,ck as b4,_3e as b5,vD as b6,Wf as b7,mD as b8,g3e as b9,$g as bA,Os as bB,mh as bC,u0 as bD,vO as bE,PL as bF,Ufe as bG,S3 as bH,Bx as bI,ak as bJ,Vpe as bK,vJ as bL,Xi as bM,_D as bN,fk as bO,Q8 as bP,jr as bQ,Sy as bR,tse as bS,y3e as bT,ND as bU,b3e as bV,Wg as bW,B3 as bX,Hp as bY,A3e as bZ,hd as b_,x3e as ba,lJ as bb,k3 as bc,xi as bd,OA as be,Be as bf,od as bg,Ku as bh,fn as bi,Oo as bj,Fn as bk,Fe as bl,En as bm,Wv as bn,gn as bo,Hc as bp,ps as bq,tr as br,th as bs,Wc as bt,_t as bu,no as bv,Br as bw,F3 as bx,qc as by,fh as bz,Rie as c,CL as c$,Ns as c0,ow as c1,v3e as c2,lD as c3,dD as c4,Z8 as c5,_0e as c6,C6 as c7,yv as c8,J6e as c9,i1e as cA,Gge as cB,u1e as cC,kJ as cD,hM as cE,Zge as cF,o1e as cG,WD as cH,Lx as cI,E1e as cJ,Nre as cK,qJ as cL,f3 as cM,R0e as cN,C$ as cO,a1e as cP,E3e as cQ,c1e as cR,n1e as cS,fM as cT,d1e as cU,aw as cV,Uf as cW,ide as cX,OF as cY,LF as cZ,The as c_,ume as ca,ZL as cb,Nfe as cc,HF as cd,ade as ce,$ae as cf,Lg as cg,el as ch,hh as ci,Uv as cj,zv as ck,Po as cl,Pv as cm,j0e as cn,OL as co,M$ as cp,LL as cq,BD as cr,v1e as cs,g1e as ct,KD as cu,Qge as cv,p3 as cw,Zu as cx,l3e as cy,FD as cz,ED as d,og as d$,vd as d0,oD as d1,z9 as d2,v0e as d3,LO as d4,iD as d5,Vhe as d6,rk as d7,sD as d8,r0e as d9,z3e as dA,va as dB,Vk as dC,ql as dD,qk as dE,ye as dF,GT as dG,iN as dH,wP as dI,eo as dJ,kg as dK,Dl as dL,To as dM,Ea as dN,Qi as dO,Wne as dP,rg as dQ,Nx as dR,Xu as dS,A3 as dT,G6e as dU,W6e as dV,T6e as dW,H6e as dX,q6e as dY,lh as dZ,eA as d_,$re as da,XF as db,C3e as dc,I3e as dd,R3e as de,k3e as df,Kr as dg,_O as dh,Hg as di,pd as dj,z6e as dk,U6e as dl,Sf as dm,ik as dn,X6e as dp,fd as dq,Ms as dr,LD as ds,L3e as dt,Ire as du,D6e as dv,uA as dw,Nv as dx,ln as dy,cs as dz,jN as e,MO as e0,VS as e1,qx as e2,ST as e3,OD as e4,C0e as e5,e3e as e6,sre as e7,IN as e8,ZD as e9,G5 as eA,UH as eB,WH as eC,R6e as eD,KW as eE,Ye as eF,n9 as eG,la as eH,uG as eI,K5 as eJ,o3 as eK,Hu as eL,sx as eM,nd as eN,WL as eO,q0e as eP,VQ as eQ,m3e as eR,j3e as eS,O3e as eT,$2 as ea,P3e as eb,vre as ec,xre as ed,i3e as ee,s3e as ef,o3e as eg,a3e as eh,cI as ei,_L as ej,iA as ek,mre as el,hme as em,c3e as en,qM as eo,wE as ep,hU as eq,Fte as er,Zy as es,JT as et,Gy as eu,l6e as ev,gj as ew,e9 as ex,u6e as ey,c6e as ez,xd as f,aY as g,dme as h,Cpe as i,u as j,Zn as k,en as l,jX as m,Sr as n,o0 as o,ys as p,Qf as q,a3 as r,Zf as s,It as t,Rr as u,Is as v,eme as w,lk as x,ad as y,sd as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.